Commit graph

8 commits

Author SHA1 Message Date
Dirk Hohndel
76136010bf preferences: remove pointless member
This could never have worked the way it was used.

Some whitespace fixes snuck into this commit.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-06 10:18:23 -08:00
jan Iversen
90b8ccb705 core/settings: remove Q_PROPERTY warning in qPref headers
Q_PROPERTY contains an internal ";", making clang produce a warning
when ending the line with a ;

Remove ; at the end of Q_PROPERTY lines.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-05 11:48:26 -08:00
jan Iversen
653a2baf11 core/settings: make qPref* constructors private
Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-05 11:48:26 -08: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 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
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
jan Iversen
9b8a6fa855 core: make methods in qPref* static
Make methods static to allow fast and esay access
use qPrefXYZ::foo() instead of qPrefXYZ::instance()->foo()

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-15 16:11:39 -07:00
jan Iversen
e673a3558e core: create qPrefUpdateManager from SettingsObjectWrapper
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-09 08:45:02 -07:00