diff options
author | jan Iversen <jani@apache.org> | 2018-09-11 07:56:50 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-11 17:25:00 -0700 |
commit | 178c01baf584fa6ec18d7802393ebe0c415d73ca (patch) | |
tree | 567a4f5047e3a6540f2fd1de4664834b66c98649 | |
parent | a03757801583ee8fa637b1a236b70554a033bfde (diff) | |
download | subsurface-178c01baf584fa6ec18d7802393ebe0c415d73ca.tar.gz |
core/settings: use instance() in qPref macros
use instance() instead of <class>::instance()
Signed-off-by: Jan Iversen <jani@apache.org>
-rw-r--r-- | core/settings/qPrefPrivate.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/core/settings/qPrefPrivate.h b/core/settings/qPrefPrivate.h index 4d8aea5ce..76bb8d77b 100644 --- a/core/settings/qPrefPrivate.h +++ b/core/settings/qPrefPrivate.h @@ -155,7 +155,7 @@ extern QString keyFromGroupAndName(QString group, QString name); if (value != prefs.usestruct field) { \ prefs.usestruct field = value; \ disk_##field(true); \ - emit qPref##usegroup::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } #define SET_PREFERENCE_BOOL(usegroup, field) \ @@ -167,7 +167,7 @@ extern QString keyFromGroupAndName(QString group, QString name); if (value != prefs.usestruct field) { \ prefs.usestruct field = value; \ disk_##field(true); \ - emit qPref##usegroup::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } #define SET_PREFERENCE_DOUBLE(usegroup, field) \ @@ -179,7 +179,7 @@ extern QString keyFromGroupAndName(QString group, QString name); if (value != prefs.usestruct field) { \ prefs.usestruct field = value; \ disk_##field(true); \ - emit qPref##usegroup::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } #define SET_PREFERENCE_ENUM(usegroup, type, field) \ @@ -191,19 +191,19 @@ extern QString keyFromGroupAndName(QString group, QString name); if (value != prefs.usestruct field) { \ prefs.usestruct field = value; \ disk_##field(true); \ - emit qPref##usegroup::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } #define SET_PREFERENCE_INT(usegroup, field) \ SET_PREFERENCE_INT_EXT(usegroup, field, ) -#define SET_PREFERENCE_STRUCT_EXT(usegroup, type, field, var, usestruct) \ - void qPref##usegroup::set_##field(type value) \ +#define SET_PREFERENCE_STRUCT_EXT(usegroup, field, var, usestruct) \ + void qPref##usegroup::set_##field(int value) \ { \ - if (value. var != prefs.usestruct field . var) { \ - prefs.usestruct field . var = value . var; \ + if (value != prefs.usestruct field . var) { \ + prefs.usestruct field . var = value; \ disk_##field(true); \ - emit qPref##usegroup::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } #define SET_PREFERENCE_STRUCT(usegroup, type, field, var) \ @@ -215,7 +215,7 @@ extern QString keyFromGroupAndName(QString group, QString name); if (value != prefs.usestruct field) { \ qPrefPrivate::copy_txt(&prefs.usestruct field, value); \ disk_##field(true); \ - emit qPref##usegroup::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } #define SET_PREFERENCE_TXT(usegroup, field) \ @@ -252,11 +252,11 @@ extern QString keyFromGroupAndName(QString group, QString name); #define HANDLE_PREFERENCE_INT_DEF(usegroup, name, field, defval) \ HANDLE_PREFERENCE_INT_DEF_EXT(usegroup, name, field, defval, ) -#define HANDLE_PREFERENCE_STRUCT_EXT(usegroup, type, name, field, var, usestruct) \ - SET_PREFERENCE_STRUCT_EXT(usegroup, type, field, var, usestruct) \ +#define HANDLE_PREFERENCE_STRUCT_EXT(usegroup, name, field, var, usestruct) \ + SET_PREFERENCE_STRUCT_EXT(usegroup, field, var, usestruct) \ DISK_LOADSYNC_STRUCT_EXT(usegroup, name, field, var, usestruct) -#define HANDLE_PREFERENCE_STRUCT(usegroup, type, name, field, var) \ - HANDLE_PREFERENCE_STRUCT_EXT(usegroup, type, name, field, var, ) +#define HANDLE_PREFERENCE_STRUCT(usegroup, name, field, var) \ + HANDLE_PREFERENCE_STRUCT_EXT(usegroup, name, field, var, ) #define HANDLE_PREFERENCE_TXT_EXT(usegroup, name, field, usestruct) \ SET_PREFERENCE_TXT_EXT(usegroup, field, usestruct); \ @@ -270,7 +270,7 @@ extern QString keyFromGroupAndName(QString group, QString name); if (value != st_##field) { \ st_##field = value; \ qPrefPrivate::propSetValue(name, st_##field, QPointF()); \ - emit qPref##useclass::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } \ void qPref##useclass::load_##field() \ @@ -284,7 +284,7 @@ extern QString keyFromGroupAndName(QString group, QString name); if (value != st_##field) { \ st_##field = value; \ qPrefPrivate::propSetValue(name, st_##field, ""); \ - emit qPref##useclass::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } \ void qPref##useclass::load_##field() \ @@ -298,7 +298,7 @@ extern QString keyFromGroupAndName(QString group, QString name); if (value != st_##field) { \ st_##field = value; \ qPrefPrivate::propSetValue(name, st_##field, false); \ - emit qPref##useclass::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } \ void qPref##useclass::load_##field() \ @@ -312,7 +312,7 @@ extern QString keyFromGroupAndName(QString group, QString name); if (value != st_##field) { \ st_##field = value; \ qPrefPrivate::propSetValue(name, st_##field, 0.0); \ - emit qPref##useclass::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } \ void qPref##useclass::load_##field() \ @@ -326,7 +326,7 @@ extern QString keyFromGroupAndName(QString group, QString name); if (value != st_##field) { \ st_##field = value; \ qPrefPrivate::propSetValue(name, st_##field, 0); \ - emit qPref##useclass::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } \ void qPref##useclass::load_##field() \ @@ -340,7 +340,7 @@ extern QString keyFromGroupAndName(QString group, QString name); if (value != st_##field) { \ st_##field = value; \ qPrefPrivate::propSetValue(name, st_##field, QByteArray()); \ - emit qPref##useclass::instance()->field##Changed(value); \ + emit instance()->field##Changed(value); \ } \ } \ void qPref##useclass::load_##field() \ |