From 5f4a040dd217c07a341bd03fe80fe19747d1541e Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Mon, 20 Aug 2018 12:50:21 +0200 Subject: core/tests: add class var to qPrefGeneral Add static class variables to qPrefGeneral (and remove QSettings from desktop-widgets) Signed-off-by: Jan Iversen --- core/settings/qPrefGeneral.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'core/settings/qPrefGeneral.cpp') diff --git a/core/settings/qPrefGeneral.cpp b/core/settings/qPrefGeneral.cpp index b092232f5..8dfe67668 100644 --- a/core/settings/qPrefGeneral.cpp +++ b/core/settings/qPrefGeneral.cpp @@ -5,6 +5,12 @@ static const QString group = QStringLiteral("GeneralSettings"); +QString qPrefGeneral::st_diveshareExport_uid; +static const QString st_diveshareExport_uid_default = ""; + +bool qPrefGeneral::st_diveshareExport_private; +static const bool st_diveshareExport_private_default = false; + qPrefGeneral::qPrefGeneral(QObject *parent) : QObject(parent) { } @@ -29,6 +35,10 @@ void qPrefGeneral::loadSync(bool doSync) disk_o2consumption(doSync); disk_pscr_ratio(doSync); disk_use_default_file(doSync); + if (!doSync) { + load_diveshareExport_uid(); + load_diveshareExport_private(); + } } HANDLE_PREFERENCE_BOOL(General, "/auto_recalculate_thumbnails", auto_recalculate_thumbnails); @@ -80,3 +90,7 @@ HANDLE_PREFERENCE_INT(General, "/o2consumption", o2consumption); HANDLE_PREFERENCE_INT(General, "/pscr_ratio", pscr_ratio); HANDLE_PREFERENCE_BOOL(General, "/use_default_file", use_default_file); + +HANDLE_PROP_QSTRING(General, "diveshareExport/uid", diveshareExport_uid); + +HANDLE_PROP_BOOL(General, "diveshareExport/private", diveshareExport_private); -- cgit v1.2.3-70-g09d2