summaryrefslogtreecommitdiffstats
path: root/core/settings/qPrefGeneral.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-20 12:50:21 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-25 11:49:47 -0700
commit5f4a040dd217c07a341bd03fe80fe19747d1541e (patch)
tree6c8d480dabf65ff15a721c3dccfc152b946b1cd8 /core/settings/qPrefGeneral.cpp
parentda6e8a4cd5d80a4288129bf44b1efad69de1704f (diff)
downloadsubsurface-5f4a040dd217c07a341bd03fe80fe19747d1541e.tar.gz
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>
Diffstat (limited to 'core/settings/qPrefGeneral.cpp')
-rw-r--r--core/settings/qPrefGeneral.cpp14
1 files changed, 14 insertions, 0 deletions
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);