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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
We had a couple of instances of names being incorrectly merged with their
group, this should handle that better. It's a bit of a big hammer to use, but
it seems to work (and it makes it easy to then git grep for cases that don't
use the new helper function.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
These were pointers into the global prefs object. The user must
not use these to modify the settings, therefore make them
pointers-to-const.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
get_units() returns a pointer to the units struct in the preferences.
Callers should not modify the preferences via this struct, therefore
make the return value point to const.
This is a small step in constifying the global preferences structure.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
subsurface_webservice_uid ends up in the wrong group due missing
/. Notice that this does not fix the issues I mentioned in #1648.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
We had a special-case for the Shearwater case, let's just make it
slightly more generic and add Garmin to the list of vendors that want a
random BLE address rather than a static one.
The Bluez model of having to state this explicitly - but not giving the
information to the user - is completely broken and this is all very
annoying, credit goes to Wojciech Więckowski for pointing this out.
Of course, right now we don't actually know how to parse the BLE stream
from the Garmin Descent, but with this (and some libdivecomputer
hackery) I actually get connected and start receiving data. That we
then can't parse, but that's hopefully just a libdivecomputer update
away.
Pointed-out-by: Wojciech Więckowski <xplwowi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When installing for the first time cloudCredentials needs to be added,
this commit a problem with updating them correctly
this problem was caused by
da6e8a4cd5
Signed-off-by: Jan Iversen <jani@apache.org>