summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-09-06 17:13:48 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-06 17:14:48 -0700
commit12fc3f17478dedd7acf8cca3e714142c24509f45 (patch)
tree21a4eb614b0d2a6a959da35f105d3aa9f57ff0c8
parente71b049498eaae05f7686445be320e90ca2f630e (diff)
downloadsubsurface-12fc3f17478dedd7acf8cca3e714142c24509f45.tar.gz
Revert "core/tests: add loadFromCloud var to qPrefCloudStorage"
This reverts commit b7a1bb670ce11b22e52361f4152b4853b97e13f5. Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--core/settings/qPrefCloudStorage.cpp10
-rw-r--r--core/settings/qPrefCloudStorage.h4
-rw-r--r--tests/testqPrefCloudStorage.cpp14
-rw-r--r--tests/testqPrefCloudStorage.h1
4 files changed, 1 insertions, 28 deletions
diff --git a/core/settings/qPrefCloudStorage.cpp b/core/settings/qPrefCloudStorage.cpp
index dc12ad633..5571f709f 100644
--- a/core/settings/qPrefCloudStorage.cpp
+++ b/core/settings/qPrefCloudStorage.cpp
@@ -7,6 +7,7 @@ static const QString group = QStringLiteral("CloudStorage");
qPrefCloudStorage::qPrefCloudStorage(QObject *parent) : QObject(parent)
{
}
+
qPrefCloudStorage *qPrefCloudStorage::instance()
{
static qPrefCloudStorage *self = new qPrefCloudStorage;
@@ -113,12 +114,3 @@ void qPrefCloudStorage::disk_userid(bool doSync)
}
}
}
-
-bool qPrefCloudStorage::loadFromCloud(const QString& email)
-{
- return qPrefPrivate::propValue(QString("loadFromCloud") + email, false).toBool();
-}
-void qPrefCloudStorage::set_loadFromCloud(const QString& email, bool done)
-{
- qPrefPrivate::propSetValue(QString("loadFromCloud") + email, done, "");
-}
diff --git a/core/settings/qPrefCloudStorage.h b/core/settings/qPrefCloudStorage.h
index 4684399a0..91864afbc 100644
--- a/core/settings/qPrefCloudStorage.h
+++ b/core/settings/qPrefCloudStorage.h
@@ -45,8 +45,6 @@ public:
static bool save_userid_local() { return prefs.save_userid_local; }
static QString userid() { return prefs.userid; }
- static bool loadFromCloud(const QString& email);
-
public slots:
static void set_cloud_base_url(const QString &value);
static void set_cloud_storage_email(const QString &value);
@@ -61,8 +59,6 @@ public slots:
static void set_save_userid_local(bool value);
static void set_userid(const QString &value);
- static void set_loadFromCloud(const QString& email, bool done);
-
signals:
void cloud_base_url_changed(const QString &value);
void cloud_storage_email_changed(const QString &value);
diff --git a/tests/testqPrefCloudStorage.cpp b/tests/testqPrefCloudStorage.cpp
index 2c6a4449f..2ca2bb81a 100644
--- a/tests/testqPrefCloudStorage.cpp
+++ b/tests/testqPrefCloudStorage.cpp
@@ -266,18 +266,4 @@ void TestQPrefCloudStorage::test_oldPreferences()
TEST(cloud->cloud_verification_status(), 1);
}
-void TestQPrefCloudStorage::test_loadFromCloud_var()
-{
- auto cloud = qPrefCloudStorage::instance();
-
- cloud->set_loadFromCloud("mail1", true);
- cloud->set_loadFromCloud("mail2", false);
- cloud->set_loadFromCloud("mail3", true);
-
- QCOMPARE(cloud->loadFromCloud("mail1"), true);
- QCOMPARE(cloud->loadFromCloud("mail2"), false);
- QCOMPARE(cloud->loadFromCloud("mail3"), true);
- QCOMPARE(cloud->loadFromCloud("mail_unknown"), false);
-}
-
QTEST_MAIN(TestQPrefCloudStorage)
diff --git a/tests/testqPrefCloudStorage.h b/tests/testqPrefCloudStorage.h
index e853c11ae..077ca74b6 100644
--- a/tests/testqPrefCloudStorage.h
+++ b/tests/testqPrefCloudStorage.h
@@ -15,7 +15,6 @@ private slots:
void test_struct_disk();
void test_multiple();
void test_oldPreferences();
- void test_loadFromCloud_var();
};
#endif // TESTQPREFCLOUDSTORAGE_H