aboutsummaryrefslogtreecommitdiffstats
path: root/core/settings
AgeCommit message (Collapse)Author
2018-08-23core: correct error in qPrefUpdateManagerGravatar jan Iversen
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-23core: correct error in qPrefLanguageGravatar jan Iversen
Correct mangled disk names Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-15core: qPref limit header includesGravatar jan Iversen
replace qPref.h with qPrefFoo.h to limit header includes Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-15core: make methods in qPref* staticGravatar jan Iversen
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-15core: make qPref.* use staticGravatar jan Iversen
Prepare qPref.* to run load/sync Make variables and methods static to give easy access Make getter inline to give faster access Signed-off-by: Jan Iversen <jani@apache.org>:wq
2018-08-15core: qPrefPrivate allow setters to be staticGravatar jan Iversen
static setters are easier to reference qPrefFoo::set_xyz() instead for qPrefFoo::instance()->set_xyz() Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-14core: activate qPrefGeneralGravatar jan Iversen
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-14core: create qPrefGeneral 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-14core: activate qPrefPartialPressureGasGravatar jan Iversen
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-14core: create qPrefPartialPressureGas 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-13core: activate qPrefGeocodingGravatar jan Iversen
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-13core: create qPrefGeocoding from SettingsObjectWrapperGravatar jan Iversen
Update set/get functions to follow common name scheme: - get function have same name as in struct preferences - 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-13core: activate qPrefLanguageGravatar jan Iversen
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-13core: create qPrefLanguage from SettingsObjectWrapperGravatar jan Iversen
Update set/get functions to follow common name scheme: - get function have same name as in struct preferences - 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-12core: activate qPrefLocationServiceGravatar jan Iversen
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-12core: create qPrefLocationService from SettingsObjectWrapperGravatar jan Iversen
Update set/get functions to follow common name scheme: - get function have same name as in struct prefs - 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-12core: activate qPrefTechnicalDetailsGravatar jan Iversen
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-12core: create qPrefTechnicalDetails 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-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-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-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-02core: qPref, remove inline and ; for inline functionsGravatar jan Iversen
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-07-30core: activate qPrefProxyGravatar jan Iversen
remove Proxy from SettingsObjectWrapper and reference qPrefProxy update files using SettingsObjectWrapper/Proxy to use qPrefProxy this activated qPrefProxy and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-30core: create qPrefProxy from SettingsObjectWrapperGravatar jan Iversen
Update set/get functions to follow common name scheme: - get function have same name as in struct prefs - 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-07-30core: qPrefPrivate.h added HANDLE_PREFERENCE_INT_DEF_EXTGravatar jan Iversen
Add missing type macro, needed for qPrefProxy Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-27core: create qPrefFacebook 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-07-27core: fix qPrefCloudStorage to derive git_urlGravatar jan Iversen
remove set_git_url and git_url_changed, because it is not possible to set git_url, this is done inderectly through set_base_url Update disk_base_url to generated git_url for both load/sync Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-26Whitespace cleanup core/settingsGravatar Dirk Hohndel
We can argue about any of the changes here, but they are the result of our whitespace.pl script - so if any of this is offensive to you, part of the resolution will be fixing the script... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-25core: qPrefCloudStorage save userid to new locationGravatar jan Iversen
userid was saved outside all groups, even though it belongs to cloudStorage Add code to save in new location and read from new/old location Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: activate qPrefDiveComputerGravatar jan Iversen
remove DiveComputer from SettingsObjectWrapper and reference qPrefDiveComputer update files using SettingsObjectWrapper/DiveComputer to use qPrefDiveComputer this activated qPrefDiveComputer and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: update qPrefDisplay to new consensusGravatar jan Iversen
add inline to load/sync remove const from QString getters Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: update qPrefCloudStorage to new consensusGravatar jan Iversen
make load/sync inline remove const from QString getters Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: make load/sync inline in qPrefGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: make load/sync inline in qPrefAnimationsGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: create qPrefDiveComputer 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-07-25core: add qPrefAnimations to SettingsObjectWrapper/qPref loadGravatar jan Iversen
correct missng qPrefAnimations in global load functions Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: expand qPref macros to handle sub structureGravatar jan Iversen
Expand SET_, DISK_ and HANDLE_ macros with field for substructure Structure prefs contains e.g. prefs.dive_computer.vendor an extra field are added to the macros to allow this. Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: remove LOADSYNC* macrosGravatar jan Iversen
expend LOADSYNC* into DISK_* macros remove LOADSYNC* from qPrefPrivate.h update qPrefDisplay to not use LOADSYNC* Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: make qPrefAnimations/CloudStorage getters static and inlineGravatar jan Iversen
Add static and inline to getter in all qPref header files Remove call to GET_PREFERENCE_* in qPrefDisplay.cpp Remove GET_PREFERENCE_* from qPrefPrivate.h static inline is slightly faster than a function call, but it saves a lot of coding lines (no lines in qPref*.cpp). Getters are a direct reference to struct preferences, so they will normally only be used from QML. Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: make qPrefDisplay getters static and inlineGravatar jan Iversen
Add static and inline to getter in all qPref header files Remove call to GET_PREFERENCE_* in qPrefDisplay.cpp static inline is slightly faster than a function call, but it saves a lot of coding lines (no lines in qPref*.cpp). Getters are a direct reference to struct preferences, so they will normally only be used from QML. Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: isolate qPrefPrivate to qPref* classesGravatar jan Iversen
Make functions in qPrefPrivate private and add qPref* as friends Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-25core: qPref replace COPY_TXT with copy_txt in qPrefPrivateGravatar jan Iversen
Add copy_txt function to qPrefPrivate class Remove macro COPY_TXT from qPrefPrivate.h Replace use of COPY_TXT with copy_txt in qPref classes copy_txt is only once, COPY_TXT was expanded approx. 160 times, so this commit saves space (and removes a macro). Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-21core: activate qPrefCloudStorageGravatar jan Iversen
remove CloudStorage from SettingsObjectWrapper and reference qPrefCloudStorage update files using SettingsObjectWrapper/CloudStorage to use qPrefCloudStorage this activated qPrefCloudStorage and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-21core: create qPrefCloudStorage from SettingsObjectWrapperGravatar jan Iversen
Update set/get functions to follow common name scheme: - get function have same name as in struct preferences - set function have set_<name> (from struct preferences>) - signal function have <name>_changed (from struct preferences>) 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-07-18core: remove QSettings in qPref* and use a shared variableGravatar jan Iversen
Add qPrefPrivate class which contains one QSettings variable, delete QSettings from qPref* class definitions this secures there are only instance of QSettings (QSettings needs to be in a QObject class to work) Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-18core: remove include QSettings from QPrefGravatar jan Iversen
remove QSettings header file from qPref.h (which is included in many files) to isolate the use of QSettings in the total system. Signed-off-by: Jan Iversen <jani@apache.org>