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
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue