summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-14 11:01:29 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-15 16:11:39 -0700
commit253d868328a8c43aacff3ad9e40c923881cae862 (patch)
tree5716b6e8117794c2347d3b5bbbde859243135681 /core
parentbac6456ee6b77231d23b20150d0f0cdfc5398784 (diff)
downloadsubsurface-253d868328a8c43aacff3ad9e40c923881cae862.tar.gz
core: qPrefPrivate allow setters to be static
static setters are easier to reference qPrefFoo::set_xyz() instead for qPrefFoo::instance()->set_xyz() Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core')
-rw-r--r--core/settings/qPrefPrivate.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/settings/qPrefPrivate.h b/core/settings/qPrefPrivate.h
index 9d0849402..07a22f1a5 100644
--- a/core/settings/qPrefPrivate.h
+++ b/core/settings/qPrefPrivate.h
@@ -127,7 +127,7 @@ private:
if (value != prefs.usestruct field) { \
prefs.usestruct field = value; \
disk_##field(true); \
- emit field##_changed(value); \
+ emit qPref##usegroup::instance()->field##_changed(value); \
} \
}
#define SET_PREFERENCE_BOOL(usegroup, field) \
@@ -139,7 +139,7 @@ private:
if (value != prefs.usestruct field) { \
prefs.usestruct field = value; \
disk_##field(true); \
- emit field##_changed(value); \
+ emit qPref##usegroup::instance()->field##_changed(value); \
} \
}
#define SET_PREFERENCE_DOUBLE(usegroup, field) \
@@ -151,7 +151,7 @@ private:
if (value != prefs.usestruct field) { \
prefs.usestruct field = value; \
disk_##field(true); \
- emit field##_changed(value); \
+ emit qPref##usegroup::instance()->field##_changed(value); \
} \
}
#define SET_PREFERENCE_ENUM(usegroup, type, field) \
@@ -163,7 +163,7 @@ private:
if (value != prefs.usestruct field) { \
prefs.usestruct field = value; \
disk_##field(true); \
- emit field##_changed(value); \
+ emit qPref##usegroup::instance()->field##_changed(value); \
} \
}
#define SET_PREFERENCE_INT(usegroup, field) \
@@ -175,7 +175,7 @@ private:
if (value. var != prefs.usestruct field . var) { \
prefs.usestruct field . var = value . var; \
disk_##field(true); \
- emit field##_changed(value); \
+ emit qPref##usegroup::instance()->field##_changed(value); \
} \
}
#define SET_PREFERENCE_STRUCT(usegroup, type, field, var) \
@@ -187,7 +187,7 @@ private:
if (value != prefs.usestruct field) { \
qPrefPrivate::instance()->copy_txt(&prefs.usestruct field, value); \
disk_##field(true); \
- emit field##_changed(value); \
+ emit qPref##usegroup::instance()->field##_changed(value); \
} \
}
#define SET_PREFERENCE_TXT(usegroup, field) \