aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-08-11QML UI: set indices when showing Download pageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: expose vendor/product/connection index as propertiesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11core: add indexOf member to ConnectionListModelGravatar Dirk Hohndel
This will allow us to programatically set the connection in the QML UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: show download page when device was plugged inGravatar Dirk Hohndel
Unless, of course, the user was editing or adding a dive - that would be annoying to have interrupted (even though, of course, it's the user plugging in the device which would trigger this in the first place). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: create separate function to show download pageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: notify the UI a dive computer was plugged inGravatar Dirk Hohndel
And try to guess which one from the device string we get from the Intent. The function is named to indicate its future use (because once the user plugs in such a device, we should show the download page). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: add property to pass detected device name to UIGravatar Dirk Hohndel
If the user plugs in a device on Android we get a device string that should allow us to figure out which dive computer was plugged in. Make that string available to the QML UI. Right now all we do is log it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: more FTDI debuggingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: add more verbose logging when trying to open USBGravatar Dirk Hohndel
The goal is to be able to tell what's actually going wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: log both for mobile and full appGravatar Dirk Hohndel
We don't usually build the full app on Android, but it's still possible. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: add callback from IntentGravatar Dirk Hohndel
Right now all this does is add the device string to the log. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: add Java class to receive IntentsGravatar Dirk Hohndel
We want to be able to respond to a USB device being plugged in. This simply logs the information we get from the device. Sadly the really useful getProductName and getManufacturerName require API level 21 (so Android 5.0 or newer) and we still have a couple hundred users on 4.1-4.4. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-09Allow zero length segments in plannerGravatar Robert C. Helling
Those are needed to indicate bailout or set point switches at the beginning of the ascend. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-08-09tests: add UpdateManager qml test casesGravatar jan Iversen
Add tst_qPrefUpdateManager qml file to test C++ qml connection Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-09tests: move UpdateManager test from testpreferencesGravatar jan Iversen
Remove UpdateManager test in testpreferences add the same UpdateManager tests to testqPrefUpdateManager Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-09tests: add qPrefUpdateManager testcasesGravatar jan Iversen
add test cases to secure struct preferences and qPrefUpdateManager work together Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-09core: activate qPrefUpdateManagerGravatar jan Iversen
remove UpdateManager from SettingsObjectWrapper and reference qPrefUpdateManager update files using SettingsObjectWrapper/UpdateManager to use qPrefUpdateManager this activated qPrefUpdateManager and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-09core: create qPrefUpdateManager from SettingsObjectWrapperGravatar jan Iversen
Update set/get functions to follow common name scheme: - get function have same name as in struct diveComputer - set function have set_<name> - signal function have <name>_changed one class one .h/.cpp is the C++ idiom. Having load/sync of each variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper handles it) secures the same storage name is used. Having the set/get/load/sync functions grouped together makes it easier to get an overview. REMARK: this commit only defines the class, it is not active in production Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-08tests: add DivePlanner qml test casesGravatar jan Iversen
Add tst_qPrefDivePlanner qml file to test C++ qml connection Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-08tests: move DivePlanner test from testpreferencesGravatar jan Iversen
Remove DivePlanner test in testpreferences add the same DivePlanner tests to testqPrefDivePlanner Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-08tests: add qPrefDivePlanner testcasesGravatar jan Iversen
add test cases to secure struct preferences and qPrefDivePlanner work together Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-08core: activate qPrefDivePlannerGravatar jan Iversen
remove DivePlanner from SettingsObjectWrapper and reference qPrefDivePlanner update files using SettingsObjectWrapper/DivePlanner to use qPrefDivePlanner this activated qPrefDivePlanner and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-08core: create qPrefDivePlanner from SettingsObjectWrapperGravatar jan Iversen
Update set/get functions to follow common name scheme: - get function have same name as in struct diveComputer - set function have set_<name> - signal function have <name>_changed one class one .h/.cpp is the C++ idiom. Having load/sync of each variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper handles it) secures the same storage name is used. Having the set/get/load/sync functions grouped together makes it easier to get an overview. REMARK: this commit only defines the class, it is not active in production Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-08tests: update qPrefUnits test cases (remove unsupported vars)Gravatar jan Iversen
Currently structs and enums are not supported, hence block these tests Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-08core: qPref add STRUCT macroGravatar jan Iversen
In order to solve use of e.g. depth_t a new macro is added Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-07Move DC download icons used by mobile app to mobile-widgets/qml/icons/Gravatar Martin Měřinský
Signed-off-by: Martin Měřinský <mermar@centrum.cz>
2018-08-07profilewidget: remove warning of unused varGravatar jan Iversen
SUBSURFACE_MOBILE does not include the single function that uses the variable add #ifndef SUBSURFACE_MOBILE to avoid warning Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-05Android: remove unused defineGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05Android: whitespace change to build.shGravatar Dirk Hohndel
This indents the code that is only executed when we aren't in 'quick' mode. git show -w will show that there is no code change in this commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05Android: add -quick flag to build.shGravatar Dirk Hohndel
This allows us to skip all the checking / building of dependency libraries. This also allows us to pass extra arguments to the make command by separating them from the arguments to build.sh with '--'. This commit is easier to understand because it didn't increase the indent in the large block of code that is now only executed if we aren't in 'quick' mode. That will be fixed in the next commit that is whitespace only. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05iOS: quiet verbose warnings for libzipGravatar Dirk Hohndel
And don't try to build manuals, regression tests and examples, while we are at it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05Android: use our fork of qt-android-cmakeGravatar Dirk Hohndel
This tells androiddeployqt to look at the qml modules to find all dependencies. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05Android: build latest libzipGravatar Dirk Hohndel
Small hacks needed, but otherwise this seems to work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05Update to latest libdcGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-04iOS: fix libzip build instructionsGravatar Dirk Hohndel
Recent libzip no longer supports autotools. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-04Android: build libzip 1.1.3Gravatar Dirk Hohndel
Switching to GitHub as source for libzip means that we need to encode the version number differently. Newer versions of libzip don't compile cleanly on Android and this one seems new enough. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-04build-system: update libzip to 1.5.1Gravatar Dirk Hohndel
This also switches us to libzip's new official home on GitHub, and takes into account that libzip no longer supports autotools and instead now is cmake based. Building against that, on my Mac build system, Subsurface once again correctly opens DLD files downloaded from divelogs.de. Fixes #1534 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-04divelogs.de import: improve export for temperatureGravatar Miika Turkia
Add support for exporting dive temperatures if they are user entered instead coming from a DC. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-08-02core: qPref, remove inline and ; for inline functionsGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02tests: add Units qml test casesGravatar jan Iversen
Add tst_qPrefUnits qml file to test C++ qml connection Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02tests: move Units test from testpreferencesGravatar jan Iversen
Remove Units test in testpreferences add the same Units tests to testqPrefUnits Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02tests: add qPrefUnits testcasesGravatar jan Iversen
add test cases to secure struct preferences and qPrefUnits work together Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02core: activate qPrefUnitsGravatar jan Iversen
remove Units from SettingsObjectWrapper and reference qPrefUnits update files using SettingsObjectWrapper/Units to use qPrefUnits this activated qPrefUnits and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02core: create qPrefUnit from SettingsObjectWrapperGravatar jan Iversen
Update set/get functions to follow common name scheme: - get function have same name as in struct diveComputer - set function have set_<name> - signal function have <name>_changed one class one .h/.cpp is the C++ idiom. Having load/sync of each variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper handles it) secures the same storage name is used. Having the set/get/load/sync functions grouped together makes it easier to get an overview. REMARK: this commit only defines the class, it is not active in production Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02core: change type of unit_system to enumGravatar jan Iversen
unit_system is an enum, but was declared as short, correct declaration. Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02Cleanup: shrink size of three-letter month name strings to 4Gravatar Berthold Stoeger
There was a comment reading /*++GETTEXT: these are three letter months - we allow up to six code bytes*/ but this is not valid (anymore), since the array contains only untranslated strings, which will be translated on-the-fly. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-02Cleanup: move sort_table() from subsurface_startup.c to divelist.cGravatar Berthold Stoeger
The function is not only used at startup and arguably belongs the the file with the rest of the low-level divelist functions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-01Cleanup: remove all override modifiersGravatar Berthold Stoeger
Commit df156a56c08a56eb380711a507ef739d8150a71f replaced "virtual" by "override" where appropriate. Unfortunately, this had the unintended consequence of producing numerous clang warnings. If clang finds a override-modified function in a class definition, it warns for *all* overriden virtual functions without the override modifier. To solve this, go the easy route and remove all overrides. At least it is consistent. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-01Cleanup: remove silly " != 0" expressionGravatar Berthold Stoeger
In metadata.cpp, replace a silly "if (!memcmp(...) != 0)" by the intended "if (!memcmp(...))" Obviously, both have the same effect. Fixes a warning. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-31Cleanup: replace virtual by override where appropriateGravatar Berthold Stoeger
The keyword "virtual" signalizes that the function is virtual, i.e. the function of the derived class is called, even if the call is on the parent class. It is not necessary to repeat the "virtual" keyword in derived classes. To highlight derived virtual functions, the keyword "override" should be used instead. It results in a hard compile- error, if no function is overridden, thus avoiding subtle bugs. Replace "virtual" by "override" where appropriate. Moreover, replace Q_DECL_OVERRIDE by override, since we require reasonably recent compilers anyway. Likewise, replace /* reimp */ by "override" for consistency and compiler support. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>