mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
c3a54826a2
commit
69f21d9aed
7 changed files with 65 additions and 74 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue