Commit graph

14650 commits

Author SHA1 Message Date
Dirk Hohndel
c3bd10e36a Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-12 05:49:27 -07:00
Miika Turkia
3bd574ea89 DLF import: record starting battery level
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-09-12 05:31:29 -07:00
Miika Turkia
37e417c28a DLF import: use battery_end in preparation
Prepare for recording both start and end pressures.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-09-12 05:31:29 -07:00
jan Iversen
32eeb51305 Ssrf: correct mapWidget registration for desktop version
Registration was after the mainwindow was created.
Move registration back to before creation.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-12 05:29:34 -07:00
Stefan Fuchs
56fda691ec Fix broken translations in dive list filter plus simplify strings
Fix some broken translations in the dive list filter UI by adding
Q_OBJECT line to the class definitions of filter classes.

Plus simplify some strings given to translation by separating parts
like ": ".

Suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Suggested-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-09-12 10:24:48 +02:00
Dirk Hohndel
d1060319d7 Clean up merge issues
Remove tests for removed properties.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-11 18:00:44 -07:00
jan Iversen
848d277951 tests: add signal test to call tst_qPref*qml
Add signal testing of all variables

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
c01d9f60c1 tests: add signal test to call testqPref*cpp
Add signal testing of all variables
this commit contains all qPref* that work directly
followup commit will do changes to qPref* to make signals work

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
Dirk Hohndel
93ba8c583a smtk2ssrf: build fix
This allows building on Mac and deals with the new dependency in the core
library.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-11 17:25:00 -07:00
jan Iversen
7e243fe363 core/settings: correct UserSurvey -> userSurvey in qPrefDisplay
QML is quite special, the variables needs to start with lower case in C++
and are used starting with upper case in QML

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
7129ad92a4 core/settings: optimize base_url functions.
Remove unused variable and create of QString.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
178c01baf5 core/settings: use instance() in qPref macros
use instance() instead of <class>::instance()

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
a037578015 core/settings: change bestmixend to int, to allow qml to work
depth_t is a good struct in C, but bad in QML.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
c0b78d69d9 core/settings: correct wrong emit in qPrefFacebook
Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
2385f48c6a core/settings ... : remove qPref* includes in qPref.h
reduce number of includes by removing qPref* includes in qPref.h

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
1ee7265972 tests: update qml test cases
use new qml registration

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
684e334fb6 core: declare cloud_status in qPrefCloudStorage
qml declaration of cloud_status (defined in pref.h) does not
belong in qPref.h but in qPrefCloudStorage

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:25:00 -07:00
jan Iversen
4d57b52062 core/tests: change short to int in pref.h
Simplify structure preferences by removing short. Update test cases to not
do (int).

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:22:58 -07:00
jan Iversen
d5bbfac6a3 tests: change testqml to allow direct register of C++ objects
Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:22:58 -07:00
jan Iversen
d0edc29636 core,tests: change qml register function
In order to address the C++ object directy in qml, a different
registration is needed.

qmlRegisterType, registers the C++ class, allowing qml code to inherit
from it and make qml objects. This is needed for graphical elemnets
like profile and map

setContentProperty, registers the C++ object, thus allowing signals to be
catched.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:22:58 -07:00
jan Iversen
a71afd31ee core: add auto registration to qPref*
Instead of having all register calls in subsurface-helper.cpp let
qPref.cpp handle all qPref registration, since they also need to be
different

update subsurface-helper and testqml accordingly.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:22:58 -07:00
jan Iversen
7940e45c4c core/settings: add missing empty line.
Standard is to have 1 empty line between functions

correct missing static in qPrefGeocoding.h

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:22:58 -07:00
jan Iversen
1a130ec461 desktop/profile-widget: update signal from _changed to Changed
Update connect calls to use Changed from qPref, due to QML demands

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:22:58 -07:00
jan Iversen
c72add5721 core/setting: change *_changed to *Changed for the sake of QML.
QML demands signals to be of the form
<name>Changed

Changing all of qPref

REMARK: this commit is not compileable, since it only change qPref and not
the rest of the system

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 17:22:58 -07:00
Jan Mulder
740fcce338 cleanup[6/6]: remove actual preferences
And finnaly, get rid of the definition in the overall struct.
And one usage of the preferences was still around.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-11 15:38:20 -07:00
Jan Mulder
19e8fa4eaf Cleanup[5/6]: remove unused preferences
Remove all the code to handle the preferences itself.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-11 15:38:20 -07:00
Jan Mulder
bb0ac5f778 cleanup[4/6], mobile: remove superfluous code from gpslocation
Despite the fast that this code is sitting in core, its used mainly
from mobile. In 987e221f8e, the buttons to interact with the GPS
webservice were deleted from the UI.  Now, delete all the code that
was used under these buttons.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-11 15:38:20 -07:00
Jan Mulder
cc72a606bb cleanup[3/6]: do not save the userid any more
Do not save the to be deleted prefences any more.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-11 15:38:20 -07:00
Jan Mulder
3c8506e1b8 cleanup[2/6]: remove set_userid()
This code is not used any more.

Signed-off-by: Jan Mlder <jlmulder@xs4all.nl>
2018-09-11 15:38:20 -07:00
Jan Mulder
226161ee44 cleanup[1/6]: do not set userid/save_userid_local from storage
This the first of a set of cleanups related to the removal of 2
preferences: save_userid_local and userid. The commits are
ordered so that a sane running state remains, should a
bisect ever lands here.

Here, just read a git or XML logbook including the to be removed
preferences, as existing users can have this data sitting around.
The only thing done here is not to store the possibly read data
for the mentioned preferences.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-11 15:38:20 -07:00
jan Iversen
62a8bc7391 test: remove git_local_only from qml test
tst_qPrefCloudStorage.qml still refered to git_local_ony, remove it

Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11 11:54:07 -07:00
Dirk Hohndel
619a52635a prefs: use correct way to set the cloud storage password preference
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-10 16:26:49 -07:00
Dirk Hohndel
2b3f6c607b prefs: cloud_new_password is not a preference
It's a mamber of the cloud storage authentication class, used to hold the
proposed new password until the backend has accepted it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-10 16:26:49 -07:00
Dirk Hohndel
ae653703a5 prefs: git_local_only is not a preference
It's the current state of the app, so it should be a global variable, not a
preference.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-10 16:26:49 -07:00
Berthold Stoeger
6e4a253896 Profile: fix SAC calculation for air dives
Commit f5b11daffd changed gasmix
arguments and return values to be passed by value instead of
using pointers.

Notably, get_gasmix() is fed a default-value and returns a
new value. In the old code, NULL was passed in in a first
loop iteration and non-NULL was always returned in the first
iteration. Thus, an equality comparison of passed-in an
returned gasmix would always fail in the first loop iteration.

The new code passed in air as default. Now if air was also
returned, then the matching gases were not calculated in
calculate_sac(). To revert to the old behavior, pass in
an invalid gasmix.

Moreover, give names to the invalid and air gasmixes.

Reported-by: tormento <turment@gmail.com>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-10 14:23:59 -07:00
Jan Mulder
c75f53a7a8 CHANGELOG: not UI any more in mobile for GPS webservice
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-10 07:50:50 -07:00
Jan Mulder
987e221f8e Mobile: Remove webservice, remove UI components
This is the first commit related to the removal of the GPS
webservice. It is nothing more then removing 2 buttons from the
menu to upload and download from the server, so technically
a trivial change.

As with the desktop application: Be very careful here as this
forces our users to use Subsurface-mobile, and a online cloud
account as that is the way to transfer GPS data from a mobile
device to the desktop.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-10 07:50:50 -07:00
Dirk Hohndel
dc68c3e7bd Travis: build export-html on Mac and Linux
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-09 19:52:14 -07:00
Dirk Hohndel
889cfb8116 Fix export-html
In commit d815e0c947 ("Parse: pass dive_table argument to parse_file()")
a syntax error was introduced and never caught since we don't test compile
export-html on Travis.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-09 19:52:14 -07:00
Alexander Wilms
12d75001a0 Set desktop file name to avoid a broken icon under KDE Wayland
Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
2018-09-09 18:44:40 -07:00
Alexander Wilms
bcf568586d Fix appdata
Use correct format, create script to update the version and release date in the
appdata.

[Dirk Hohndel: call said script during the build process]

Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-09 18:43:30 -07:00
Jan Mulder
39b52d8abf CHANGELOG: remove GPS import from webservice
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-09 18:28:08 -07:00
Jan Mulder
876e6adf74 Desktop: Remove webservice, remove UI components (2)
Actually remove the Subsurface webservice UI from the source, and
deal with all the fallout.

Notice that a part of the change in subsurfacewebservices.cpp is
a block of code that becomes unused, but might contain some valid
logic to be used later. Very similar code is in core/gpslocation.cpp.
And as I earlier broke something here, the unused code is ifdef-ed for
now.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-09 18:28:08 -07:00
Jan Mulder
90fb34baab Desktop: Remove webservice, remove UI components (1)
The very first part of the full removal of the GPS webservice. This
removes the UI artefacts and a tiny bit fallout. This leaves in place
all the background processing.

Be very careful here as this can break workflow of users that currently
have unapplied GPS coordinates sitting in the webservice, and do upgrade
to the version where this commit goes in. They have no clean UI way any more
to apply those GPS fixes from the desktop.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-09 18:28:08 -07:00
Miika Turkia
97f75472e8 Update changelog
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-09-09 12:26:45 -07:00
Miika Turkia
3c9897d247 DLF import: document deco event
These are Deco N2 Low/High and Deco He Low/High events. They all appear
to be recorded at the same time, different events at same second.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-09-09 12:26:45 -07:00
Miika Turkia
dac90e3fde DLF import: comment measured He
Measured He is documented (in comment). Will need information if all
measurements are needed or just start/end. First case would be added to
dive prifle, possibly cluttering it, second would be extra data.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-09-09 12:26:45 -07:00
Miika Turkia
aae2403ddd DLF import: Record battery status
This will record the ending battery status to extra data. Would need
info from CCR divers whether this suffices or if we should record also
the starting volatage or even every single reading.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-09-09 12:26:45 -07:00
jan Iversen
a93ecf3912 tests: update qPref* to the shadow variable
The shadow variable causes properties only to be saved when
actual changed, therefore some test cases need update

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-07 14:37:18 -07:00
jan Iversen
ee6b5643b5 core/settings: only sync values that are actually changed
Add a variable reflecting the current_state to all DISK_* macros, in order to
check if the original variable in struct preferences is changed.

Only save to disk if actually changed

[Dirk Hohndel: merged Jan's commit and renamed the variable and adjusted the
               commit message... but fundamentally the commit is still what Jan
               wrote, so he should get the credit]

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-07 14:37:18 -07:00