summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-03-31mobile/user-manual: update to remove reference to 'map it' buttonGravatar Dirk Hohndel
It's still in the screen shot, but I'll fix that some other time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-details: remove the redundant 'map it' buttonGravatar Dirk Hohndel
You can already get to the map by either clicking on the location text or on the left action button. This third way to get there reduces the available space for the location text, and can cause positioning issues with very long location texts creating three or more lines of text, which then overwrites the dateRow below. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile/dive-list: avoid using undefined value as booleanGravatar Dirk Hohndel
This gets rid of an annoying and noisy warning. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31cleanup: remove loadFromCloud() declaration from QMLManager.hGravatar Berthold Stoeger
This getter functions was not defined anywhere. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30cleanup: use setPointSizeF() in themeInterface::set_currentScale()Gravatar Berthold Stoeger
The compiler complained that we were passing a float to the QFont::setPointSize() function, which expects an integer. Solve this by using the QFont::setPointSizeF() function. This might introduce a user-visible change, albeit very unlikely: We now may set the point-size to a non-integer number. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30cleanup: fix initialization order in QMLProfile constructorGravatar Berthold Stoeger
The compiler complains that members were initialized out-of-order. Even though this is not an issue here it is correct to emit a warning, since only then it is guaranteed that the objects are destructed in reverse-order with respect to construction. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30cleanup: un-slotify QMLManager functionsGravatar Berthold Stoeger
Some slots in QMLManager were not called from the outside, some only directly from C++-code. Make the former private and the latter public member functions. The idea here is to document which functions are actually called from the outside and which are called from QML or connected to signals. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30cleanup: replace REGISTER_TYPE macro by templateGravatar Berthold Stoeger
Arguably easier to read. By using the qWarning("...") instead of the qWarning() << "..." version, we can remove the <QDebug> include. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30cleanup: move initialization of QMLInterfaceGravatar Berthold Stoeger
QMLInterface was initialized in the register_qml_types function. Therein, it was in an if branch that tested whether the passed-in engine argument was not NULL. However, on mobile this could never be NULL. Let's just move the initialization out of that function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30cleanup: move initialization of ThemeInterfaceGravatar Berthold Stoeger
The ThemeInterface was initialized and connected to QML in the register_qml_types() function. However, it is not a type. Move the initialization to a place where we create the other global QML objects. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30cleanup: fold ThemeInterface::setup() into constructorGravatar Berthold Stoeger
There appears to be no reason for two-phase initialization. Let's keep things simple: let the constructor produce a functioning object. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30cleanup: don't send values in changed-signals of ThemeInterfaceGravatar Berthold Stoeger
According to the Qt-docs you *may* send the new values in the NOTIFY signal of Q_PROPERTYs. However, since changes will lead to a reevaluation of a whole expression, this argument will be unused. All it does is make the code more verbose and brittle: What happens if you send the wrong value? Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30coding style: rename themeInterface to ThemeInterfaceGravatar Berthold Stoeger
As per coding style, class names are PascalCase. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30cleanup: make color-constants in themeinterface.cpp staticGravatar Berthold Stoeger
There were no outside users - no point in exporting them. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30cleanup: make members of ThemeInterface non-staticGravatar Berthold Stoeger
We have a singleton class ThemeInterface, which means that it is global and exists only once. It's members are static, i.e. also global. A message from the department of redundancy department? In any case, that makes no sense. Let's just make these members local to the class. I would even rip out the whole singleton thing, since the object is not accessed anywhere outside from QML. Let's keep it for now. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-30CHANGELOG updateGravatar Dirk Hohndel
This remove the old pre-3.0 entries and adds entries for 3.0.0->master Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile UI: don't exit when using back button to close drawersGravatar Dirk Hohndel
An Android user might reasonably assume that they can use the back button to close the global or context drawers. So act accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30Increment mobile versionGravatar Dirk Hohndel
That's needed to be able to push out new binaries to the stores. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile/dive-list: add indicator that dive list is being processedGravatar Dirk Hohndel
This should deal with the rather confusing 'No dive in dive list' shown while loading and processing the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30message handler: make the log output less verboseGravatar Dirk Hohndel
Skip truly identical / repetitive messages. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile/dive-list: show/hide virtual keyboard as needed for filterGravatar Dirk Hohndel
This should happen automatically, but for some reason it doesn't. So let's try to force it manually. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile/dive-list: make sure filter input area is visibleGravatar Dirk Hohndel
Since apparently the header property of the ListView isn't reliably making sure that our filter input line is visible, let's move the filter header to be it's own visual element and manually manage the relationship between that and the ListView. The obvious idea was to anchor the ListView to the bottom of the filterHeader, but that didn't work in my tests. So instead we are using the topMargin to make sure that there is space to show the header. Because this re-indents the whole filterHeader, 'git show -w' gives a much better idea what this commit actually changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-29mobile/cleanup: use a mutex to protect storage accessGravatar Dirk Hohndel
Instead of the crude and error prone bool, let's just use the right tool for this job. In order to avoid issues with a goto across a mutex boundary, this slightly restructures the code in one place - 'git show -w' makes it clear that this is really rather simple in its changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-28Increment mobile versionGravatar Dirk Hohndel
That's needed to be able to push out new binaries to the stores. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-28mobile/save-changes: untangle the handling of alreadySavingGravatar Dirk Hohndel
I'm suspicious that an issue that some people have seen around changes not being saved is caused by our handling of alreadySaving. When starting with Subsurface-mobile in no-autosync mode, we were able to end in a scenario where alreadySaving was true, even though there were no unsaved changes. And in that case no changes made during such a session were saved unless the user forced a manual sync with the server. This commit radically changes our approach to handling the flag. It moves it right next to the actual calls into code that could modify git storage, and ensures that the flag can never stay set. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-28mobile/cleanup: tiny coding style issue that bugged meGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-28mobile: when editing dives update the fulltext filterGravatar Berthold Stoeger
In the mobile version of the dive-editing command, the fulltext filter was not updated. Thus, when editing a dive while the filter was active, the dive would disappear. Unregister the old and register the new version. Reported-by: Chirana Gheorghita Eugeniu Theodor <office@adaptcom.ro> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-28mobile: fix filter flag when editing divesGravatar Berthold Stoeger
When editing dives, the undo-command sends a filte changed signal. The models catch the signal and check whether the filter status changed. The mobile-version of the dive-edit command simply exchanged the dives. This could lead to inconsistencies when the filter flag was overwritten. Therefore, make sure that the filter flag is not overwritten by the dive-exchange. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-27ReleaseNotes: start independent MobileReleaseNotes fileGravatar Dirk Hohndel
Only having release notes for the desktop version really doesn't make sense anymore. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-27Latest translationsGravatar Dirk Hohndel
With this, international Portuguese, Swedish, Finnish, Hebrew, Spanish, Romanian, Dutch, and German are 100% translated. Catalan, Chinese, and Bulgarian are more than 90% translated as well. A HUGE thank you to the translators once again stepping up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-27mobile/user-manual: update bundled htmlGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-27mobile/user-manual: add hyperlinks where usefulGravatar Dirk Hohndel
Suggested-by: Martin de Weger <martin@deweger.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-27mobile/user-manual: small language tweaksGravatar Crawford Currie
[Dirk Hohndel: added another fix to Crawford's commit] Signed-off-by: Crawford Currie <curriedot@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-27mobile UI: disable action button / drawer interactionsGravatar Dirk Hohndel
This is a feature that I never fully understood, but that apparently is causing the drawers to show up for people who are just trying to interact with the action button. The approach here is really drastic and crude, but in my testing it seems to work. Reported-by: Hartley Horwitz <hhrwtz@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile UI: add create trip to DiveDetails context menuGravatar Dirk Hohndel
Should have done that in the first place. That's what happens when you are rushing it... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26iOS: ensure changes are saved locallyGravatar Dirk Hohndel
This was disabled in the past because it was deemed to slow. A lot of time has passed, since. Maybe on current phones / iPads this is acceptable again? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26Update translation source stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26cleanup: remove dead codeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile/dive-list: add ability to create tripGravatar Dirk Hohndel
This adds a context menu entry for top level dives that allows the user to create a trip for that dive. Unfortunately this creates a new string to translate right before a release... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile/cleanup: pageStack.pop() doesn't take a string argumentGravatar Dirk Hohndel
This happens to do the expected thing, anyway, but let's not keep this broken code around. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile UI: undo partial dive add when cancelingGravatar Dirk Hohndel
When we start adding a dive, we actually create a diveAdd undo command so we have a dive that the user can edit. Which means we need to undo this action if we cancel. Also, for a more consistent UI, we should pop the dive details page that we used to edit this dive and bring the user back to the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile/page-selection: consistently use showPage to select a pageGravatar Dirk Hohndel
We still used pageStack.push() all over the place. Also, in showPage, disable the map hack if the user actively picks a different page. This should fix an issue where the user picked the map and then tried to add a dive to the dive list - and instead of the dive edit was shown the map again. Reported-by: Hartley Horwitz <hhrwtz@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-25mobile/profile: ensure profile opacity resets when zoomingGravatar Dirk Hohndel
It's possible for our code to think that the user wants to pan the profile before realizing that the user actually is making a pinch gesture. In that case the profile could get stuck in semi-transparent mode. This prevents that from happening by explicitly resetting the opacity to 1.0 when we start a pinch. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-25mobile/profile: adjust offsets when scalingGravatar Dirk Hohndel
If the user is scaling out again we need to make sure that our offsets are adjusted so that we always show a subset of the profile and not 'empty space' outside of it. Instead of reimplementing the offset logic, let's just trigger another paint() call. This requires a trampoline function because of different signal and slot signatures. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-25mobile/profile: don't pan outside the actual profileGravatar Dirk Hohndel
When zooming and panning the profile, make sure we always show a subset of the profile and don't end up showing the empty space outside of the profile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-25mobile/debug: simulate zooming through mouse wheel on desktopGravatar Dirk Hohndel
And allow touchpad gestures to be recognized as well. This has no negative impact on the mobile platforms, but makes it much easier to test profile scaling / panning on the desktop. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-24cleanup: fix unitialized valueGravatar Dirk Hohndel
Fixes CID 355179 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-24mobile/user-manual: some tuning of the textGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-24mobile/user-manual: typo fixesGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-24divelist: don't initialize invalidFont at startupGravatar Berthold Stoeger
To mark invalid dives, we use a struck-out font, which was a static variable at translation unit scope, i.e. initialized at application startup. Sadly, this crashes on iOS. It is unclear when we can initialize fonts. Try to move initialization to the constructore of DiveTripModelBase and make the font a member of that class. For consistency, also make the invalidBrush a member of this class. This now means that the diveData function cannot be static anymore, since it needs access to the font and brush. But OK. Reported-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>