core: make methods in qPref* static

Make methods static to allow fast and esay access
use qPrefXYZ::foo() instead of qPrefXYZ::instance()->foo()

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-08-14 10:30:07 +02:00 committed by Dirk Hohndel
parent 0825f644e0
commit 9b8a6fa855
22 changed files with 349 additions and 348 deletions

View file

@ -40,7 +40,7 @@ void qPrefCloudStorage::set_cloud_base_url(const QString &value)
}
disk_cloud_base_url(true);
emit cloud_base_url_changed(value);
emit instance()->cloud_base_url_changed(value);
}
}
void qPrefCloudStorage::disk_cloud_base_url(bool doSync)
@ -65,7 +65,7 @@ void qPrefCloudStorage::set_cloud_storage_newpassword(const QString &value)
qPrefPrivate::copy_txt(&prefs.cloud_storage_newpassword, value);
// NOT saved on disk, because it is only temporary
emit cloud_storage_newpassword_changed(value);
emit instance()->cloud_storage_newpassword_changed(value);
}
void qPrefCloudStorage::set_cloud_storage_password(const QString &value)
@ -73,7 +73,7 @@ void qPrefCloudStorage::set_cloud_storage_password(const QString &value)
if (value != prefs.cloud_storage_password) {
qPrefPrivate::copy_txt(&prefs.cloud_storage_password, value);
disk_cloud_storage_password(true);
emit cloud_storage_password_changed(value);
emit instance()->cloud_storage_password_changed(value);
}
}
void qPrefCloudStorage::disk_cloud_storage_password(bool doSync)