Commit graph

350 commits

Author SHA1 Message Date
Berthold Stoeger
f3e1187e65 Cleanup: move parse-function declarations out of "dive.h"
Move the declaration of these functions to "file.h" and "parse.h"
according to the translation unit they are defined in. Thus, not
all users of "dive.h" have to suck in "sqlite3.h".

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-12 18:19:07 +03:00
Berthold Stoeger
82af1b2377 Undo: make undo-system dive site-aware
As opposed to dive trips, dive sites were always directly added
to the global table, even on import. Instead, parse the divesites
into a distinct table and merge them on import.

Currently, this does not do any merging of dive sites, i.e. dive
sites are considered as either equal or different. Nevertheless,
merging of data should be rather easy to implement and simply
follow the code of the dive merging.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-12 18:19:07 +03:00
Berthold Stoeger
37146c5742 Parser: parse into custom dive site table
To extend the undo system to dive sites, the importers and downloaders
must not parse directly into the global dive site table. Instead,
pass a dive_site_table argument to parse into.

For now, always pass the global dive_site_table so that this commit
should not cause any functional change.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-12 18:19:07 +03:00
Berthold Stoeger
f6e7bdc5ef Dive site: add dive site table parameter to dive site functions
To enable undo of dive site functions, it is crucial to work
with different dive site tables. Therefore add a dive site table
parameter to dive site functions. For now, always pass the global
dive site table. Thus, this commit shouldn't alter any functionality.

After this change, a simple search for dive_site_table reveals all
places where the global dive site table is accessed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-12 18:19:07 +03:00
Rolf Eike Beer
1f4777a287 CMake: move enable_testing() to the top level
This allows calling ctest from the main build directory instead of having to
change one level down. As a bonus the unittests now show up in my KDevelop so I
can directly run them from the IDE.

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-04-12 12:59:17 +03:00
Rolf Eike Beer
2b9ca488fd tests: use new style syntax to connect QSignalSpy
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-04-12 12:59:17 +03:00
Berthold Stoeger
e9fa298d06 Cleanup: make qPref::registerQML() static
This member function does not access any other member of the object.
Make it static.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-04 09:29:45 -07:00
Berthold Stoeger
2ead52b139 Cleanup: remove qPref::canonical_version() and qPref::mobile_version()
These two member functions were never used, but cause frequent
recompilation of the qPref.cpp file. Remove them for now until
their usefulness becomes evident.

These were the only functions tested in test_qPref.qml. Therefore
remove this test-file.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-04-04 09:29:45 -07:00
Rolf Eike Beer
8526fea973 CMake: use function instead of macro
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-27 14:07:32 -07:00
Lubomir I. Ivanov
a1ffe115cf facebook: remove the featute from the code base
Remove from:
- unit tests
- desktop widgets
- preferences
- core intergration
- cmakefiles
- build scripts
- icons
- docs

Also remove the plugins and social network integration.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2019-02-01 17:16:43 -08:00
Berthold Stoeger
891fcbf520 Import: control process_imported_dives() by flags
process_imported_dives() takes four boolean parameters. Replace these
by flags. This makes the function calls much more descriptive. Morover,
it becomes easier to add or remove flags.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-01-19 13:48:17 -08:00
Berthold Stoeger
1cd0863cca Import: add add_to_new_trip flag to process_imported_dives()
If this flag is set, dives that are not assigned to a trip will
be assigned to a new trip. This flag is set if the user checked
"add to new trip" in the download dialog of the desktop version.

Currently this is a no-op as the dives will already have been
added to a new trip by the downloading code. This will be removed
in a subsequent commit.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-01-19 13:48:17 -08:00
Berthold Stoeger
0249e12589 Import: split process_imported_dives() function
Split the process_imported_dives() function in two:
1) process_imported_dives() processes the dives and generates
   a list of dives and trips to be added and removed.
2) add_imported_dives() calls process_imported_dives() and
   does the actual removal / addition of dives and trips.

The goal is to split preparation and actual work, to
make dive import undo-able.

The code adds extra checks to never merge into the same
dive twice, as this would lead to a double-free() bug.
This should in principle never happen, as dives that
compare equal according to is_same_dive() are merged
in the imported-dives list, but perhaps in some pathologival
corner-cases is_same_dive() turns out to be non-transitive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-01-09 20:58:04 -08:00
Berthold Stoeger
0dfc59f38c Import: add merge_all_trips parameter to process_imported_dives()
When importing log-files we generally want to merge trips. But
when downloading and the user chose "generate new trip", that
new trip should not be merged into existing trips.

Therefore, add a "merge_all_trips" parameter to process_imported_dives().
If false only autogenerated trips [via autogroup] will be merged.
In the future we might want to let the user choose if trips
should be merged when importing log-files.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-01-09 20:58:04 -08:00
Berthold Stoeger
1593f2ebad Import: merge dives trip-wise
The old way of merging log-files was not well defined: Trips
were recognized as the same if and only if the first dives
started at the same instant. Later dives did not matter.

Change this to merge dives if they are overlapping.
Moreover, on parsing and download generate trips in a separate
trip-table.

This will be fundamental for undo of dive-import: Firstly, we
don't want to mix trips of imported and not-yet imported dives.
Secondly, by merging trip-wise, we can autogroup the dives
in the import-data to trips and merge these at once. This will
simplify the code to decide to which trip dives should be
autogrouped.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-01-09 20:58:04 -08:00
Berthold Stoeger
7e33369dc8 Parser: add trip_table parameter to parsing functions
To allow parsing into arbitrary trip_tables, add the corresponding
parameter to the parsing functions and the parser state. Currently,
all callers pass the global trip_table so there should be no change
in functionality. These arguments will be replaced in subsequent commits.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-01-09 20:58:04 -08:00
Berthold Stoeger
3cdc2661d2 Dive media: add media to closest dive
Currently, when selecting "Load media files even if time does not
match the dive time", the media are added to *all* selected dives.
Instead add it to the closest dive.

This seems like the less surprising behavior. Of course now if the
user really wants to add a media file to multiple dives, they will
have to do it manually.

To avoid a messy interface, this is solved by moving the iterate-
over-selected-dives loop to the core. Thus, a helper-function can
be made local to its translation unit.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-12-13 08:11:22 +01:00
Robert C. Helling
7e4c8c387b A test for gases used in the planner
This tests for the planner getting the gases in the
manually entered part of the dive wrong (as here: from
incorrect value returned by get_gasmix_at_time.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-10-30 15:33:43 +01:00
Linus Torvalds
28e3413ff6 Add 'location_t' data structure
Instead of having people treat latitude and longitude as separate
things, just add a 'location_t' data structure that contains both.

Almost all cases want to always act on them together.

This is really just prep-work for adding a few more locations that we
track: I want to add a entry/exit location to each dive (independent of
the dive site) because of how the Garmin Descent gives us the
information (and hopefully, some day, other dive computers too).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-10-21 19:55:09 +03:00
Dirk Hohndel
a6e4de6b5e Tests: remove testing of download_mode
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-15 19:46:18 +02:00
Dirk Hohndel
1491616dcf Tests: only compile TestHelper if BT support is enabled
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-12 08:22:44 -07:00
Dirk Hohndel
34e68d34dd Tests: allow compilation with older Qt versions
Comparisons of QString results with C strings didn't always exist.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-12 08:22:44 -07:00
Dirk Hohndel
c8fec97695 Bluetooth: add helper to separate BT name and address
And restructure the existing "isBtAddress()" function in the process.
Also add more tests.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-12 08:22:44 -07:00
Dirk Hohndel
c6b62cbe5c tests: add test for the BT/BLE address recognition
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-12 08:22:44 -07:00
Jan Mulder
91c8a2fa5c Prefs: add bool preference cloud_auto_sync [1/3]
With removal of the git_local_only from the preferences (see
ae653703a5), the users choice, in the mobile app, was not
stored any more in between sessions. This resulted in issue
1725.

So, in order to store that user preference, we need a new
preference. This is added here, but its not yet hooked up
in the app yet. This deals only with the preference handling.
And adapted tests are included.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-09 10:03:21 -07:00
Berthold Stoeger
6dc1dcaea5 Import: pass "downloaded" parameter to process_imported_dives()
process_imported_dives() is more efficient for downloaded than for
imported (from a file) dives, because it checks only the divecomputer
of the first dive.

This condition is checked via the "downloaded" flag of the first
dive. Instead, pass an argument to process_imported_dives().

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-06 19:47:06 -07:00
Berthold Stoeger
ab14889563 Core: remove preexisting field from struct dive_table
Dives are now in all cases imported via distinct dive_tables.
Therefore the "preexisting" marker is useless. Remove.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-06 19:47:06 -07:00
Berthold Stoeger
810903bdb9 Import: pass a dive table to process_imported_dives()
Dives were directly imported into the global dive table and then
merged in process_imported_dives(). Make this interface more flexible,
by passing an independent dive table.

The dive table of the to-be-imported dives will be sorted and merged.
Then each dive is inserted in a one-by-one manner to into the global
dive table.

This actually introduces (at least) two functional changes:
1) If a new dive spans two old dives, it will only be merged to the
   first dive. But this seems like a pathological case, which is of
   dubious value anyway.
2) Dives unrelated to the import will not be merged. The old code
   would happily merge dives that were not even close to the
   newly imported dives. A surprising behavior.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-06 19:47:06 -07:00
Berthold Stoeger
32a4ce6169 Parser: parse text-based files into arbitrary table
In d815e0c947 a dive_table pointer
was added to the parsing functions to allow parsing into tables
other than the global dive table. This will be necessary for undo of
import and implementation a cleaner interface. A few cases, notably
CSV and proprietary formats were forgotten.

Implement parsing into arbitrary tables also for these cases.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-28 15:06:00 -07:00
Berthold Stoeger
3137fbe973 Cleanup: remove redundant prototypes from dive.h
A few of these prototypes were already in import-csv.h.
Put them in an 'extern "C" { ... }' block.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-28 07:47:39 -07:00
Berthold Stoeger
35b8a4f404 Core: split process_dives() in post-import and post-load versions
process_dives() is used to post-process the dive table after loading
or importing. The first parameter states whether this was after
load or import.

Especially in the light of undo, load and import are fundamentally
different things. Notably, that latter should be undo-able, whereas
the former is not. Therefore, as a first step to make import undo-able,
split the function in two versions and remove the first parameter.

It turns out the the load-version is very light. It only sets the
DC nicknames and sorts the dive-table. There seems to be no reason
to merge dives.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-23 11:50:53 -07:00
Robert C. Helling
afe363fa85 Optional anonymization upon export
Add a checkbox that triggers replacement of all English characters by
x's in notes, buddy, dive guide and (while we are at it) suit.

This is ment for people sharing logs for debugging that are concious
about privacy issues. It leaves the lenth of strings in tact as well
as special charcters as those might be needed to track down a particular
parsing problem.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-09-13 08:16:54 -07: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
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
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
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 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 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
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
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
12fc3f1747 Revert "core/tests: add loadFromCloud var to qPrefCloudStorage"
This reverts commit b7a1bb670c.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-06 17:14:48 -07:00
Dirk Hohndel
78cd2f4e09 Add performance test case
This requires the user to manually copy the large test file into the
dives directory (because I really don't want to add this to the repo);
instructions how to do that are displayed if the file is missing.

Next it uses the git version of that same file (but prefetches it to
try and remove the network speed from what is being measured).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-31 06:33:46 -07:00
jan Iversen
5f4a040dd2 core/tests: add class var to qPrefGeneral
Add static class variables to qPrefGeneral
(and remove QSettings from desktop-widgets)

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25 11:49:47 -07:00
jan Iversen
b7a1bb670c core/tests: add loadFromCloud var to qPrefCloudStorage
Add special property loadFromCloud + mail to qPrefCloudStorage
this variable is used by qmlmanager.cpp

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25 11:49:47 -07:00
jan Iversen
5dd0981961 core/tests: remove QSettings from testgitstorage
update testgitstorage.cpp to use qPrefProxy and qPrefCloudStorage
remove core/prefs-macros.h since it is unused

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25 11:49:47 -07:00
jan Iversen
ebc0e6d3f3 core/tests: merge Animations and add vars. to qPrefDisplay
Add class variable tooltip_position to qPrefDisplay
Add class variable lastDir to qPrefDisplay
qPrefDisplay is updated to use new qPrefPrivate functions
Adjust test cases incl. qml tests

qPrefAnimations only has 1 variable, that really is a display variable
Merge the variable into qPrefDisplay, to simplify setup (and avoid loading
extra page in qml).

correct theme to save in correct place, and make it a static
class variable

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25 11:49:47 -07:00
jan Iversen
1bc361b2ea core/tests: add uuidString to qPrefUpdateManager
add static class variable uuidString to qPrefUpdateManager
correct test cases

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25 11:49:47 -07:00
Berthold Stoeger
d815e0c947 Parse: pass dive_table argument to parse_file()
To enable undo of divelog-importing it is crucial that parse_file()
can parse into arbitrary dive tables.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-23 10:17:12 -07:00
jan Iversen
62672276d0 core: correct error in qPrefUpdateManager
make next_check (in qPrefUpdateManager) long instead of string

Correct test cases (compare time_t not strings)
Add test case to check time_t works as expected

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-23 05:19:16 -07:00
Berthold Stoeger
360f07e453 Cleanup: pass gasmix by value
In a previous commit, the get_gasmix_* functions were changed to
return by value. For consistency, also pass gasmix by value.

Note that on common 64-bit platforms struct gasmix is the size
of a pointer [2 * 32 bit vs. 64 bit] and therefore uses the
same space on the stack. On 32-bit platforms, the stack use
is probably doubled, but in return a dereference is avoided.

Supporting arbitrary gas-mixes (H2, Ar, ...) will be such an
invasive change that going back to pointers is probably the
least of our worries.

This commit is a step in const-ifying input parameters (passing
by value is the ultimate way of signaling that the input parameter
will not be changed [unless there are references to said parameter]).

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-08-23 05:16:38 -07:00
jan Iversen
bac6456ee6 tests: remove testpreferences
remove the now empty testpreferences

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-15 16:11:39 -07:00
jan Iversen
f2c45c8187 tests: add General qml test cases
Add tst_qPrefGeneral qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 09:09:06 -07:00
jan Iversen
91ec0fe8d4 tests: move General test from testpreferences
Remove General test in testpreferences
add the same General tests to testqPrefGeneral

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 09:09:06 -07:00
jan Iversen
4ba458318c tests: add qPrefGeneral testcases
add test cases to secure struct preferences and qPrefGeneral work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 09:09:06 -07:00
jan Iversen
691025fa24 core: activate qPrefGeneral
remove General from SettingsObjectWrapper and reference qPrefGeneral

update files using SettingsObjectWrapper/General to use qPrefGeneral

this activated qPrefGeneral and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 09:09:06 -07:00
jan Iversen
98ab006211 tests: add PartialPressureGas qml test cases
Add tst_qPrefPartialPressureGas qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 07:12:41 -07:00
jan Iversen
b70e002728 tests: move PartialPressureGas test from testpreferences
Remove PartialPressureGas test in testpreferences
add the same PartialPressureGas tests to testqPrefPartialPressureGas

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 07:12:41 -07:00
jan Iversen
1e8e9f345a tests: add qPrefPartialPressureGas testcases
add test cases to secure struct preferences and qPrefPartialPressureGas work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 07:12:41 -07:00
jan Iversen
9d005888fb core: activate qPrefPartialPressureGas
remove PartialPressureGas from SettingsObjectWrapper and reference qPrefPartialPressureGas

update files using SettingsObjectWrapper/PartialPressureGas to use qPrefPartialPressureGas

this activated qPrefPartialPressureGas and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14 07:12:41 -07:00
jan Iversen
c912ac053e tests: add Geocoding qml test cases
Add tst_qPrefGeocoding qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 15:04:50 -07:00
jan Iversen
80583e63b5 tests: move Geocoding test from testpreferences
Remove Geocoding test in testpreferences
add the same Geocoding tests to testqPrefGeocoding

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 15:04:50 -07:00
jan Iversen
859f08a358 tests: add qPrefGeocoding testcases
add test cases to secure struct preferences and qPrefGeocoding work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 15:04:50 -07:00
jan Iversen
af22015452 core: activate qPrefGeocoding
remove Geocoding from SettingsObjectWrapper and reference qPrefFacebook

update files using SettingsObjectWrapper/Geocoding to use qPrefFacebook

this activated qPrefGeocoding and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 15:04:50 -07:00
jan Iversen
d72546e799 tests: add Language qml test cases
Add tst_qPrefLanguage qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 11:49:32 -07:00
jan Iversen
526c1324fc tests: move Language test from testpreferences
Remove Language test in testpreferences
add the same Language tests to testqPrefLanguage

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 11:49:32 -07:00
jan Iversen
dfa3f5e0e7 tests: add qPrefLanguage testcases
add test cases to secure struct preferences and qPrefLanguage work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 11:49:32 -07:00
jan Iversen
72d87364c0 core: activate qPrefLanguage
remove Language from SettingsObjectWrapper and reference qPrefLanguage

update files using SettingsObjectWrapper/Language to use qPrefLanguage

this activated qPrefLanguage and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-13 11:49:32 -07:00
jan Iversen
612f1b478f tests: add LocationService qml test cases
Add tst_qPrefLocationService qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 11:30:19 -07:00
jan Iversen
c97bb239b2 tests: move LocationService test from testpreferences
Remove LocationService test in testpreferences
add the same LocationService tests to testqPrefLocationService

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 11:30:19 -07:00
jan Iversen
3174c71563 tests: add qPrefLocationService testcases
add test cases to secure struct preferences and qPrefLocationService work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 11:30:19 -07:00
jan Iversen
75ce813a27 core: activate qPrefLocationService
remove LocationService from SettingsObjectWrapper and reference qPrefLocationService

update files using SettingsObjectWrapper/LocationService to use qPrefLocationService

this activated qPrefLocationService and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 11:30:19 -07:00
jan Iversen
c42a6e4027 tests: add TechnicalDetails qml test cases
Add tst_qPrefTechnicalDetails qml file to test C++ qml connection
(needs to enhanced later, due to enum)

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
bfafb51649 tests: move TechnicalDetails test from testpreferences
Remove TechnicalDetails test in testpreferences
add the same TechnicalDetails tests to testqPrefTechnicalDetails

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
863c04f3f7 tests: add qPrefTechincalDetails testcases
add test cases to secure struct preferences and qPrefTechnicalDetails work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
cb2dc7515b core: activate qPrefTechnicalDetails
remove TechnicalDetails from SettingsObjectWrapper and reference qPrefTechnicalDetails

update files using SettingsObjectWrapper/TechnicalDetails to use qPrefTechnicalDetails

this activated qPrefTechnicalDetails and removed the similar class from
SettingsObjectWrapper.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
3c69c8299b core: SettingsObjectWrapper remove buehlmann property
remove buehlmann(), setBuehlmann(bool)

buehlmann() is really planner_deco_mode == BUEHLMANN, so no need for a function
setBuehlmann is dangerous, because buehlmann is saved on disk, but not in prefs.* and thus can lead to inconsistency between bool buehlmann and planner_deco_moce.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12 07:36:10 -07:00
jan Iversen
607012cccb tests: add UpdateManager qml test cases
Add tst_qPrefUpdateManager qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-09 08:45:02 -07:00
jan Iversen
9341ea6eef tests: move UpdateManager test from testpreferences
Remove UpdateManager test in testpreferences
add the same UpdateManager tests to testqPrefUpdateManager

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-09 08:45:02 -07:00
jan Iversen
4ce7a2e30c tests: add qPrefUpdateManager testcases
add test cases to secure struct preferences and qPrefUpdateManager work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-09 08:45:02 -07:00
jan Iversen
e33545afd0 core: activate qPrefUpdateManager
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-09 08:45:02 -07:00
jan Iversen
e3008c893a tests: add DivePlanner qml test cases
Add tst_qPrefDivePlanner qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-08 14:29:50 +02:00
jan Iversen
fff0e54593 tests: move DivePlanner test from testpreferences
Remove DivePlanner test in testpreferences
add the same DivePlanner tests to testqPrefDivePlanner

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-08 14:29:50 +02:00
jan Iversen
9c26a491a7 tests: add qPrefDivePlanner testcases
add test cases to secure struct preferences and qPrefDivePlanner work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-08 14:29:50 +02:00
jan Iversen
21243ec4f7 core: activate qPrefDivePlanner
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-08 14:29:50 +02:00
jan Iversen
27b005b76d tests: update qPrefUnits test cases (remove unsupported vars)
Currently structs and enums are not supported, hence block these
tests

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-08 14:29:50 +02:00
jan Iversen
d6983391c6 tests: add Units qml test cases
Add tst_qPrefUnits qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02 08:59:56 -07:00
jan Iversen
ccfd14211a tests: move Units test from testpreferences
Remove Units test in testpreferences
add the same Units tests to testqPrefUnits

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02 08:59:56 -07:00
jan Iversen
d9b7aaef76 tests: add qPrefUnits testcases
add test cases to secure struct preferences and qPrefUnits work together

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-02 08:59:56 -07:00
jan Iversen
affdc9d394 core: activate qPrefUnits
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-02 08:59:56 -07:00
jan Iversen
d3f3d82abd tests: add Proxy qml test cases
Add tst_qPrefProxy qml file to test C++ qml connection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-30 07:43:22 -07:00
jan Iversen
7acd489891 tests: move Proxy test from testpreferences
Remove Proxy test in testpreferences
add the same Proxy tests to testqPrefProxy

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-30 07:43:22 -07:00