cloudstorage: add API to just update on-disk setting

This way we can change the host that we will use next time the app runs.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2021-04-11 13:53:39 -07:00
parent c5eb806adb
commit e22b33795b
2 changed files with 8 additions and 0 deletions

View file

@ -37,6 +37,13 @@ void qPrefCloudStorage::set_cloud_base_url(const QString &value)
emit instance()->cloud_base_urlChanged(value);
}
}
void qPrefCloudStorage::store_cloud_base_url(const QString &value)
{
// this is used if we want to update the on-disk settings without changing
// the runtime preference
qPrefPrivate::propSetValue(keyFromGroupAndName(group, "cloud_base_url"), value, default_prefs.cloud_base_url);
}
void qPrefCloudStorage::disk_cloud_base_url(bool doSync)
{
if (doSync) {

View file

@ -57,6 +57,7 @@ public:
public slots:
static void set_cloud_auto_sync(bool value);
static void set_cloud_base_url(const QString &value);
static void store_cloud_base_url(const QString &value);
static void set_cloud_storage_email(const QString &value);
static void set_cloud_storage_email_encoded(const QString &value);
static void set_cloud_storage_password(const QString &value);