From 69f21d9aedcea8713cf5af6463ebacba5832162e Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Wed, 15 Aug 2018 13:26:09 +0200 Subject: 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 --- core/settings/qPrefGeneral.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/settings/qPrefGeneral.cpp') 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 -- cgit v1.2.3-70-g09d2