Commit graph

562 commits

Author SHA1 Message Date
Lubomir I. Ivanov
956b45ddfd map-widget: move the widget and its resources to 'map-widget'
Move all the map widget platform agnostic files to the
<subsurface-root>/map-widget folder.

This avoids the confusion about the desktop version of subsurface
using mobile components. The map widget is planned as a shared
component between the mobile and desktop versions.

desktop-widgets/mapwidget[.h/.cpp] still remain as those are specific
to the desktop version.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-11-05 14:48:56 -08:00
Berthold Stoeger
92ba4b9cc7 Replace QMap::operator[] with QMap::value()
QMap::operator[] creates a new default constructed entry in the map
if no entry with the given key exists. While not problematic (since
typically nullptrs are inserted) this is usually not what you want
for read access.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-04 14:26:21 +01:00
Jan Mulder
15cdcdbc69 QML UI: show divelist from the top
In commit bdf6dc7828, we pulled in some changes from Kirigami.
I checked all the new commits and they seemed just fine, and a
test (on desktop) on both Qt 5.9.1. and 5.9.2 showed no obvious
problems.

However, some time later, working on something else, I compiled
from Android to test, and saw some strange behavior in the dive
list. The topmost dive is partially hidden behind the application
header on startup of the app, but can be pulled down. Not a big
deal, but is does not look right.

After tedious testing, bisecting, etc, I found commit
d0f3941a4d7f4d4c6 in Kirigami (obviosuly, it was not clear from
the start that it was in Kirigami, as I could well have been
some error in Subsurface, or even Qt). Mentioned commit is
trivial, and handles with the wideScreen property of the
application window. With wideScreen = false, the bug is
visible, when true the bug is gone.

This all said. Just set the wideScreen to true, which can
definitely be considered a workaround. I exspect that this
commit can be reverted later on when Kirigami is fixed.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-30 18:42:58 +01:00
Jan Mulder
cf75e6451d QML UI: Scrolling in dive details
While testing the mobile app on Qt 5.9.2, I encounted a show stopping
issue. Select a dive in the dive list, go back to the dive list (as
selecting a dive opens the details), now scroll down to a different
dive, and select one. The app starts enumerating (moved smoothly
according to the specs) all the dives between the old and the new
selected dive. So, depending on the distance, this could take forever.
Explicitly: on 5.9.2. only.

From the Qt docs:

highlightFollowsCurrentItem : bool

If this property is true (the default value), the highlight is moved
smoothly to follow the current item. Otherwise, the highlight is not
moved by the view, and any movement must be implemented by the highlight.

End Qt docs.

Setting this property to false solves the issue. Tested on both Qt 5.9.1
and 5.9.2.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-29 11:08:10 -07:00
Lubomir I. Ivanov
9367610220 mapwidget: add the 'isReady' flag to the Map component
The 'isReady' boolean flag is now set to 'true' only
once the Component.onCompleted slot is reached.

The flag is then used as a safe-guard in the
onZoomLevelChanged slot. Calculate the small circle radius
(mapHelper.calculateSmallCircleRadius()) only if 'isReady'
is set to true.

Prevents a crash if the Map widget is not ready, yet a zoom
level is set via the 'zoomLevel' property. The crash happens
because mapHelper.calculateSmallCircleRadius() has a callback
to the Map component to estimate some points and distances of the
small circle.

Reported-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-10-29 08:26:11 +01:00
Jan Mulder
6d81e19eae map widget: start with normal zoomlevel
Commit 344d976593 resulted in the start of Subsurface with a map of
the whole world. The user has to zoom in (assuming the case that the
first selected dive has a position), in evenry session. This is solved
by setting the zoomlevel at startup at the default value. Ok, this
results in a map of central London, UK, when starting Subsurface with
a dive without location, but is this as good as any map.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-29 08:26:11 +01:00
Jan Mulder
6bd5312dfa QML UI: prevent full overflow of bottom buttons
A not perfect improvement, but way better IMHO. Prevent the list of
downloaded dives to grow over the buttons at the bottom. Just a simple
change by adding a bottomMargin to the list.

Notice that there is still some overlap, but for now I consider this a
trade-off between the scarce screen real-estate and the wish to present
and much as possible dowloaded dives.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-27 19:28:42 +02:00
Jan Mulder
f25cc3a67f QML UI: repair long trip headers
Trip headers spanning more than one line where broken at incorrect
locations in the string. Not exactly sure, but I think this came with
the newest Kirigami SHA, and especially the Label change.

Carefully reading the code for the trip heading shows a "strange"
negative margin. So the margin is on the outside. This margin was
used to split the string, allowing for a small invisible part of
the string to present as trip header.

This is solved by this commit.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-27 19:27:47 +02:00
Linus Torvalds
344d976593 Make the map widget more pleasant to use
This does two main things to the map widget:

 - if there are no coordinates, do *not* zoom out to the whole-world
   view. Just leave the map alone.

 - when zooming out to move to a new dive site, zoom back in to the same
   zoom level it was before.

These two changes make it much more pleasant to move between dives,
particularly as you move back-and-forth without losing the zoom level.

NOTE! The zoom level gets reset if you move dives _while_ zooming is
happening, and so moving quickly between dives will still end up losing
the original zoom level, replacing it with a bigger zoom-out that was
active _during_ a previous zoom.

That could be seen as a feature (moving incrementally to an "overview"
zoom when moving quickly between dive sites), but honestly it smells
more like a bug to me.  But regardless of that feature/bug, this new
zoom behavior is more pleasant than our older "always reset when
moving".

But it might be a matter of taste, so people should try this out and
comment.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation,org>
Cc: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-23 10:34:19 -04:00
Jan Mulder
a9b692f0c3 QML-UI: Download screen fixup
Again, mostly related to label change. First, the top button was "glued"
to the top of the screen, so added a little margin there. It
appeared that all the other items on the screen (progressbar,
2 button rows, and the downloaded dive list) where not moving down
due to the add of that little top margin. This was solved by
anchor-ing the items together. Finally, the text of a downloaded
dive was on the top of the delegate lines. Not sure where that came
from, but easily solved by centering it explicitly.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-19 14:55:30 -04:00
Jan Mulder
53ed1c7326 QML-UI: some more layout repair (dive details)
As in a525fff112, also the dive details top data was not nicely positioned
any more due to the deprecated and removed Kirigami.Label.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-19 14:55:30 -04:00
Jan Mulder
a525fff112 QML-UI: repair DiveList
The new SHA for Kirigami did all kinds of nasty things to our DiveList.
This commit tries to repair most of the damage. Nothing more than
some margins, anchors, and even a font that changed.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-18 06:30:51 -04:00
Jan Mulder
d623eccdef mobile: silence deprecated messages in logging about Kirigami.Label
Commit 8f6827ab12 brought a new SHA for Kirigami, but that introduces
a very noisy logging of "Kirigami.Label is deprecated. Use
QtQuickControls2.Label instead".

So, thats what done here.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-17 15:32:27 +02:00
Jan Mulder
f7da06c76b mobile: fix initial setup with no repo or meta info
First, obviously, I could have squashed this small commit into
the previous one, but I explicly decided not to. It shows
the fragility of all this credential processing code, and
the complex flow control troughout the code.

Testing on a brand new install, and immediately going for
a no cloud setup, the PIN screen was shown, instead of an
empty divelist. Looking at this small code change shows why.
In case of a no cloud situation, there is no PIN to verify
(or email and passwd rules checked). So just do not force us
there.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-17 14:29:17 +02:00
Jan Mulder
16b395a898 mobile: No cloud repo creation more explicit
Before this change, there was only one way to create the local
no cloud repo on the device. The user needed to add at least
one dive to the no cloud account (so that there is something
to save). While this worked in some scenarios, it could also
get things in an inconsistent state: credential status = CS_NOCLOUD
but no local repo. This was a dead end.

In this commit, the creation of the no cloud repo is made more
explicit. When asking for no cloud mode, just create an (empty)
repo for it when it does not yet exist, and otherwise, just
open the existing (possibly empty) repo.

Now, a user can have no cloud repo, next to (any number of)
cloud accounts.

This leaves one functional aspect left: how does a user abandon
the no cloud repo, by merging his data into a true cloud
account. This is code for this, that tries to do this merge in
a smart way. This seems to be broken (too). To be clear: this
is no part of this commit.

Fixes: #667

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-17 14:29:17 +02:00
Dirk Hohndel
ea577aa8f2 Fix stupid syntax errors
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-16 05:27:30 -04:00
Dirk Hohndel
a48a42efe0 Make sure we can still build without BT_SUPPORT
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-15 21:43:38 -04:00
Lubomir I. Ivanov
49c8c966fc qml-icons: add a third, grayed-out map marker
It can be difficult to distinguish the new marker
which is added on the map and has to be dragged
when editing a new dive location.

By adding a new grayed-out marker it becomes
possible to gray out all other markers, while
the current marker which is being edited is still
bright red.

Suggested-by: Dietrich Meyer <dietrich@sunnynames.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-10-15 17:28:39 -08:00
Lubomir I. Ivanov
07c91805d9 qml-icons: make mapwidget-marker.png even darker
This is done so that a de-selected marker is better
distinguished from the selected marker.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-10-15 17:28:39 -08:00
Lubomir I. Ivanov
4c7ce5c1aa mapwidget.qml: fix weird MouseArea bug in MapItemView
The QML map uses MapItemView. MapItemView needs a delagate
in the form of a MapQuickItem. The MapQuickItem needs a
'sourceItem' which would be used as the visual (e.g. marker)
on the map.

If the root sourceItem is of type Item, the marker becomes
non-clickable. If the root sourceItem is an Image, the clicks
work.

This patch removes the root Item, which makes the code
less organized, but at the same time it fixes the bug.

Bug reproduced on the following Qt versions on Ubuntu:
5.5.x, 5.7.x

Bug cannot be reproduced on Qt 5.9.x on Windows.

Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-10-15 17:28:39 -08:00
Jan Mulder
ba4058667a mobile: enable switching BT on/off during session.
This commit implements possible switching BT on and off during a session,
so not needing a restart of the app when the user forgot to switch
it on when starting the app.

For this, the following needed to be done: 1) create a handler that
reacts on local BT device status changes. 2) repopulate the connection
list in the download screen when a BT status change is detected.

Notice the subtile change of the Q_INVOKABLE btEnabled() function
to a Q_PROPERTY. This gives a nice dynamic behaviour when
switching BT on/off with the app open.

Fixes: #556

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-12 09:43:40 +02:00
Dirk Hohndel
6578588ad9 QML UI: add missing icon
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-09 22:01:12 -07:00
Lubomir I. Ivanov
56e755b711 Use lrint() for all degrees_t related rounding
In certain places the '(int)' cast is used, while in other the
llrint() or lrint() functions. Make the conversation from degrees
in the 'double' form to the 'int' degrees_t consistent using lrint().

lrint() is the function which should give the best results,
because it accepts a 'double' and results in a 'long'
even if degrees_t is 'int'. If the truncation from 'long' to 'int'
is discarding some of the precision then the next step
would be to turn degrees_t into a 64bit signed integer type.

Possible fix for #625.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-10-09 13:38:58 +03:00
Jan Mulder
fb42213111 mobile: do not clear email and passwd when cancelling
Commit cf8e87545f implemented a way to cancel pin setup,
and this also has effects on an exit from the app after pressing
the android exit. The change button started with clearing the
email and passwd in order to get the credentail page(s) active
again. While this worked ok, it confuses users that exit the
app from the credential pages, resulting in the need to enter
the credentials again after a restart. It appears that clearing
the credential state is sufficient to get the pages active.

Notice that the android exit is still not working (it seems
a no-op), but the interaction with the buttons in the app
preserves the email/passwd.

Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-08 19:45:40 +03:00
Jan Mulder
f4165a9eea mobile: only set old credential status in one place
The old credential status should only be set when changing the
actual credential status using the setCredentialStatus function.
Setting it here is just wrong. It sets the old status to the
current, and than adds the current to the prefences,
obviously, resulting in old = current, which can not be right
and results in a wrong flow of control in the credential state
processing.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-08 19:45:40 +03:00
Dirk Hohndel
56c82081a5 Make compile succeed without BT_SUPPORT
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-07 10:06:47 -07:00
Lubomir I. Ivanov
174b414436 map-widget: don't crash if the map QML failed to load
If the QML modules for QtLocation and QtPositioning are
missing the QML in mapwidget.cpp will fail to load,
which can lead to crashes.

To solve the issue check if the QML has loaded and set
a flag 'isReady' to true. If the loading has failed
load another QML which is for showing a red error text
in the lines of `MapWidget.qml failed to load!`.

If the map QML has failed, use a macro in all relevant
MapWidget members to turn them into a NOP. This approach
leaves the rest of the codebase intact - e.g. no checks
in classes which connect to the MapWidget class.

Fixes #596

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-10-07 08:09:05 -07:00
Dirk Hohndel
d1a18b36b4 QML UI: open v2 user manual
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-07 12:14:08 +03:00
Dirk Hohndel
deff17fa36 Whitespace
This commit is empty when shown with '-w' - it just updates the
indentation after commit c00804eff6 ("QML UI: always start edit at top
of page").

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-05 13:40:31 -07:00
Dirk Hohndel
c00804eff6 QML UI: always start edit at top of page
When starting to edit / add a dive, the Flickable needs to be positioned
at the top of the page, not the last position shown.

For clarity I'll do the re-indentation in the next commit.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-05 13:38:32 -07:00
Dirk Hohndel
3487612337 QML UI: add transition when switching to edit mode
The hard switch was not ideal. This isn't perfect, yet, but a step in
the right direction. The 'transitions' to change the visibility
properties are a bit odd, but that's how it's done in the examples as
well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-05 08:21:55 -07:00
Dirk Hohndel
2dd8a2ad7b QML UI: download icon in main menu
We need a white path drawn on the dark action button, but a black path
drawn for the main menu.

(looks like a white space change snuck in here)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-04 17:13:46 -07:00
Dirk Hohndel
636904e078 QML UI: make edit page scrollable
And have a tiny bit of space around it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-04 17:08:58 -07:00
Dirk Hohndel
7f0c7eeb24 QML UI: change the dive edit to not be an overlay
This way the accidental closing of the edit (and loss of data)
should no longer happen.

See: #495

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-04 17:08:58 -07:00
Dirk Hohndel
41f24f2859 QML UI: top padding for dive details
This used to work without manually adding space here.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-04 17:08:58 -07:00
Dirk Hohndel
ec7a878149 QML UI: avoid warning before currentTheme is set
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-04 17:08:58 -07:00
Dirk Hohndel
b4b3864f50 QML UI: adjust icon names
These changed in Kirigami.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-04 17:08:52 -07:00
Jan Mulder
e2aaa43d8c QML UI: cleanup some whitespace and string formatting
This addresses some review comment on whitespace and translated
string formatting.

In the string formatting, a tiny additional change is made.
I wanted the email address in the explanation text in a bold
font. Using the HTML <b> for this, removed the /n newline
characters in the output. Apparantly, mixing these two
formatting styles does not work. No problem, replaced the
/n to HTML style too.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29 08:13:25 -07:00
Jan Mulder
dbed88bd81 QML UI: rework single credential page to two pages
This commit tries to implement most of issue #515. It reworks the
one credential page, which its dynamic PIN part, into two pages.
Main driver of selecting one of the two pages is the showPin
boolean. Page 1 contains the email/passwd field (and the
option to use a no cloud setup). Page 2 only contains the PIN
part (and the option to cancel the process).

The Kirigami central button does not seem very handy here. We
need, for example, a cancel, sign-in and register, only register,
etc. buttons, which are not easy to handle in specific icons.
Therefore, normal pushbuttons are chosen to deal with user
interaction, and the Kirigami button is removed from these
pages.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29 08:13:25 -07:00
Jan Mulder
81eb8466b2 QML UI: rework cloud credentials block
Previously, we could edit the cloud credentials in basically two
places. At startup of the app from a fresh install (and no previous
data on the device), and from the settings. Issue #515 proposes
only one way.

However, we need a way to access the new credential UI pages, so
that the pages at a fresh install of the app can be reused,
for example for account switching.

This commit replaces the settings cloud credentials block by
a simple (not editable) display of the current credentials, and
a button to access the initial pages, for all management tasks
on the credentials.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29 08:13:25 -07:00
Jan Mulder
0af64e4986 mobile: make sure that the old credential status is correct
This commit is just a precaution. It makes sure that the old
(aka previous) credential status is correctly set on all changes
of this status.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29 08:13:25 -07:00
Jan Mulder
85dfdaa3e5 mobile: only deal with localrepo in NOCLOUD mode
This is a very subtile bug. Testing/developing on the desktop for mobile,
with a normal logbook in a git repo, resulted in a surprising effect.
When swichting from a cloud account to a NOCLOUD situation, the no cloud
repo was (not always) reset to the NOCLOUD_LOCALSTORAGE, but to the
normal logbook. Resuling in commits in the wrong repo.

This can easily be solved by setting the filename to NOCLOUD_LOCALSTORAGE,
when switching to NOCLOUD mode.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29 08:13:25 -07:00
Jan Mulder
6ea3fd3d92 mobile: do not care about email/passwd when NOCLOUD
In case the credential state is NOCLOUD, the saving of credentials
in the preferences was suppressed in case of invalid data in the
email/passwd fields.

There is no reason to check these fields for correct input, as they
are not used in case of NOCLOUD mode. A simple if statement is added.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29 08:13:25 -07:00
Jan Mulder
cf8e87545f mobile: add helper function cancelCredentialsPinSetup()
As written in 8d9ad3cfea7e4c0875, the user needs to be able
to exit the PIN entry UI, in case no PIN can be received due
to a wrong email address.

The simplest way seems to just clear the cloud credential data,
and let the user try again. Obviously, we could argue if the
exact previous state of the 1st credentials screen could
be restored, but as it is only 2 simple fields, of which
it is higly likely that the email adress is misspelled (and
the password hidden), it seems overly complex to implement.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29 08:13:25 -07:00
Jan Mulder
801b1bc5f5 mobile: propagate "still PIN required status"
Makes sure that the CS_NEED_TO_VERIFY status is carried forward
and sets the showPin flag that triggers the 2 different states
in de QML UI.

The new credential UI will have one page for username/passwd,
used for setting up an account or switchting to a different
account, and a second page to enter a PIN only.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29 08:13:25 -07:00
Jan Mulder
46f10362fc mobile: do not go to NO_CLOUD status from UNKNOWN
In case the credential status is UNKNOWN, and the cloud username
and password are empty, do not go automatically to NO_CLOUD status.
This is (again) preparation for future work on credential management.

For example, the user entered an email address with a spelling
error, so does not receive a PIN code email. This user needs a
way out, so there needs to be a <cancel> button on the PIN code
screen. And the most logic was of cancelling is emptying the
entered username/passwd and let the user try again.

Without this change, the user immediately gets into the (somewhat)
final NO_CLOUD state, which will result in (very) confused users.

With this change, there is exacly one way (left) to get into a
NO_CLOUD setup: hitting the proper button, so a deliberate user
action.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29 08:13:25 -07:00
Jan Mulder
2e91de9d95 mobile: initialize credential data in one place
It appears that the onCompleted of the StartPage item is triggered
before the onCompleted of the rootItem. This is logical as the
Startpage is a child of the rootItem. And, yes, this does matter.
As the divelist also contains the logic for initial cloud
registration (and is the default page shown in a state where
the cloud credentials are valid (CS_VERIFIED state)), we need to
know the correct credential state at start of the app.

The move of this one line of code makes sure of that, in addition
to setting the credential state from the preferences. Now, the
setupActions function can reference correct credential data.

This is further preparation for a better cloud creation
process from mobile.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-29 08:13:25 -07:00
Lubomir I. Ivanov
5e9bdce195 mapwidgethelper: support Qt 5.5.x
MapWidgetHelper::calculateSmallCircleRadius() uses
the second argument (boolean) of QDeclarativeGeoMap::toCoordinate()
and QDeclarativeGeoMap::fromCoordinate(), which isn't supported
in Qt 5.5.x and errors will be thrown on runtime.

This argument usage is redundant for the calculateSmallCircleRadius()
use case.

If the argument is set to "false" it tells the map to avoid
clipping the viewport and always return a valid QPointF/QGeoCoordinate.
Given that calculateSmallCircleRadius() only works with the
map center - i.e it's called like so in MapWidget.qml:
    onZoomLevelChanged: mapHelper.calculateSmallCircleRadius(map.center)

The only way for the radius estimation to fail is if the map widget
width is smaller than SMALL_CIRCLE_RADIUS_PX * 2 = 52px, which is not
possible as the MainWindow splitter prevents it.

If the map widget becomes that small it would be hardly usable,
yet no errors should be thrown related to this change.

Tested-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-09-20 08:53:41 -07:00
Lubomir I. Ivanov
5eeefbff8b mapwidgetcontextmenu: use a QtQuick 2.0 import
Following on beb0d5703a, the context menu seems to work fine
with a much older QtQuick import - version 2.0.

The 2.7 import is technically a development leftover
and a minimal version should have been considered earlier.

On older Qt setups (e.g. 5.5.x) this might throw a:
'module "QtQuick" version 2.6 is not installed'

Reported-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-09-16 08:35:29 -07:00
Jan Mulder
9a2d503d3b Unify credential states
Having two different enums around with more or less the same
definition has lead to unclear code. After removing two not needed
states on the mobile end, the remaining step to one enum for the
credential state becomes almost is simple rename operation.

Unfortunately, I do not know a way to embed a plain C enum
from pref.h into the QMLManager object. So after this, there
are still 2 enums around, but now identical.

This commit is not changing any functionality.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-09-04 07:38:30 -07:00