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:
jan Iversen 2018-08-15 13:26:09 +02:00 committed by Dirk Hohndel
parent c3a54826a2
commit 69f21d9aed
7 changed files with 65 additions and 74 deletions

View file

@ -21,7 +21,7 @@ void qPrefFacebook::loadSync(bool doSync)
void qPrefFacebook::set_access_token(const QString &value)
{
if (value != prefs.facebook.access_token) {
qPrefPrivate::instance()->copy_txt(&prefs.facebook.access_token, value);
qPrefPrivate::copy_txt(&prefs.facebook.access_token, value);
emit instance()->access_token_changed(value);
}
}
@ -29,7 +29,7 @@ void qPrefFacebook::set_access_token(const QString &value)
void qPrefFacebook::set_album_id(const QString &value)
{
if (value != prefs.facebook.album_id) {
qPrefPrivate::instance()->copy_txt(&prefs.facebook.album_id, value);
qPrefPrivate::copy_txt(&prefs.facebook.album_id, value);
emit instance()->album_id_changed(value);
}
}
@ -37,7 +37,7 @@ void qPrefFacebook::set_album_id(const QString &value)
void qPrefFacebook::set_user_id(const QString &value)
{
if (value != prefs.facebook.user_id) {
qPrefPrivate::instance()->copy_txt(&prefs.facebook.user_id, value);
qPrefPrivate::copy_txt(&prefs.facebook.user_id, value);
emit instance()->access_token_changed(value);
}
}