diff options
author | jan Iversen <jani@apache.org> | 2018-08-15 13:26:09 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-08-25 11:49:47 -0700 |
commit | 69f21d9aedcea8713cf5af6463ebacba5832162e (patch) | |
tree | 7a345586bd1a4caa311e99679b766681e03aeb41 /core/settings/qPrefGeneral.cpp | |
parent | c3a54826a2ddb17ac00ec4fdbbd18eea8a0ecbe1 (diff) | |
download | subsurface-69f21d9aedcea8713cf5af6463ebacba5832162e.tar.gz |
core: make methods in qPrefPrivate static
Small cleanup, using static methods is simpler and faster
Added propSetValue and propValue instead of exposing setting
variable.
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core/settings/qPrefGeneral.cpp')
-rw-r--r-- | core/settings/qPrefGeneral.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/settings/qPrefGeneral.cpp b/core/settings/qPrefGeneral.cpp index 81a3eb0fe..b092232f5 100644 --- a/core/settings/qPrefGeneral.cpp +++ b/core/settings/qPrefGeneral.cpp @@ -57,9 +57,9 @@ void qPrefGeneral::set_default_file_behavior(enum def_file_behavior value) void qPrefGeneral::disk_default_file_behavior(bool doSync) { if (doSync) { - qPrefPrivate::instance()->setting.setValue(group + "/default_file_behavior", prefs.default_file_behavior); + qPrefPrivate::propSetValue(group + "/default_file_behavior", prefs.default_file_behavior); } else { - prefs.default_file_behavior = (enum def_file_behavior)qPrefPrivate::instance()->setting.value(group + "/default_file_behavior", default_prefs.default_file_behavior).toInt(); + prefs.default_file_behavior = (enum def_file_behavior)qPrefPrivate::propValue(group + "/default_file_behavior", default_prefs.default_file_behavior).toInt(); if (prefs.default_file_behavior == UNDEFINED_DEFAULT_FILE) // undefined, so check if there's a filename set and // use that, otherwise go with no default file |