summaryrefslogtreecommitdiffstats
path: root/core/subsurface-qt
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-30 12:40:52 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-30 12:40:52 -0700
commit241dd7cb81364521d78250f800e8508211575254 (patch)
tree1ea443fe4589f0f247db4304de38e857e18100f6 /core/subsurface-qt
parent2e6588dc0ef8d7698cc5dbe831f524a6e394145d (diff)
parentba9288fab6d7aa8527f7a75a717cdc88a68facd9 (diff)
downloadsubsurface-241dd7cb81364521d78250f800e8508211575254.tar.gz
Merge branch 'offlineDefault'
Diffstat (limited to 'core/subsurface-qt')
-rw-r--r--core/subsurface-qt/SettingsObjectWrapper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp
index e43be1a9b..ed305ef28 100644
--- a/core/subsurface-qt/SettingsObjectWrapper.cpp
+++ b/core/subsurface-qt/SettingsObjectWrapper.cpp
@@ -1315,6 +1315,7 @@ int GeneralSettingsObjectWrapper::pscrRatio() const
void GeneralSettingsObjectWrapper::setDefaultFilename(const QString& value)
{
QSettings s;
+ s.beginGroup(group);
s.setValue("default_filename", value);
prefs.default_filename = copy_string(qPrintable(value));
emit defaultFilenameChanged(value);
@@ -1323,6 +1324,7 @@ void GeneralSettingsObjectWrapper::setDefaultFilename(const QString& value)
void GeneralSettingsObjectWrapper::setDefaultCylinder(const QString& value)
{
QSettings s;
+ s.beginGroup(group);
s.setValue("default_cylinder", value);
prefs.default_cylinder = copy_string(qPrintable(value));
emit defaultCylinderChanged(value);
@@ -1331,6 +1333,7 @@ void GeneralSettingsObjectWrapper::setDefaultCylinder(const QString& value)
void GeneralSettingsObjectWrapper::setDefaultFileBehavior(short value)
{
QSettings s;
+ s.beginGroup(group);
s.setValue("default_file_behavior", value);
prefs.default_file_behavior = value;
if (prefs.default_file_behavior == UNDEFINED_DEFAULT_FILE) {
@@ -1347,6 +1350,7 @@ void GeneralSettingsObjectWrapper::setDefaultFileBehavior(short value)
void GeneralSettingsObjectWrapper::setUseDefaultFile(bool value)
{
QSettings s;
+ s.beginGroup(group);
s.setValue("use_default_file", value);
prefs.use_default_file = value;
emit useDefaultFileChanged(value);
@@ -1355,6 +1359,7 @@ void GeneralSettingsObjectWrapper::setUseDefaultFile(bool value)
void GeneralSettingsObjectWrapper::setDefaultSetPoint(int value)
{
QSettings s;
+ s.beginGroup(group);
s.setValue("defaultsetpoint", value);
prefs.defaultsetpoint = value;
emit defaultSetPointChanged(value);
@@ -1363,6 +1368,7 @@ void GeneralSettingsObjectWrapper::setDefaultSetPoint(int value)
void GeneralSettingsObjectWrapper::setO2Consumption(int value)
{
QSettings s;
+ s.beginGroup(group);
s.setValue("o2consumption", value);
prefs.o2consumption = value;
emit o2ConsumptionChanged(value);
@@ -1371,6 +1377,7 @@ void GeneralSettingsObjectWrapper::setO2Consumption(int value)
void GeneralSettingsObjectWrapper::setPscrRatio(int value)
{
QSettings s;
+ s.beginGroup(group);
s.setValue("pscr_ratio", value);
prefs.pscr_ratio = value;
emit pscrRatioChanged(value);