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>
This commit is contained in:
jan Iversen 2018-08-14 11:01:29 +02:00 committed by Dirk Hohndel
parent bac6456ee6
commit 253d868328

View file

@ -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) \