summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-09-02 16:22:16 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-11 17:25:00 -0700
commit684e334fb6098e604a91d140c1e2ea0883dff081 (patch)
tree99dd5050bb53385125aa5fa6dc69514acbc2b40e /tests
parent4d57b52062ab902dee8d82e453eda586ce78ab3e (diff)
downloadsubsurface-684e334fb6098e604a91d140c1e2ea0883dff081.tar.gz
core: declare cloud_status in qPrefCloudStorage
qml declaration of cloud_status (defined in pref.h) does not belong in qPref.h but in qPrefCloudStorage Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/testqPrefCloudStorage.cpp18
-rw-r--r--tests/testqPrefDisplay.cpp1
-rw-r--r--tests/tst_qPrefCloudStorage.qml4
3 files changed, 12 insertions, 11 deletions
diff --git a/tests/testqPrefCloudStorage.cpp b/tests/testqPrefCloudStorage.cpp
index 15d8a9cfd..7e67966b3 100644
--- a/tests/testqPrefCloudStorage.cpp
+++ b/tests/testqPrefCloudStorage.cpp
@@ -27,7 +27,7 @@ void TestQPrefCloudStorage::test_struct_get()
prefs.cloud_storage_password = copy_qstring("more secret");
prefs.cloud_storage_pin = copy_qstring("a pin");
prefs.cloud_timeout = 117;
- prefs.cloud_verification_status = qPref::CS_NOCLOUD;
+ prefs.cloud_verification_status = qPrefCloudStorage::CS_NOCLOUD;
prefs.save_password_local = true;
QCOMPARE(tst->cloud_base_url(), QString(prefs.cloud_base_url));
@@ -53,7 +53,7 @@ void TestQPrefCloudStorage::test_set_struct()
tst->set_cloud_storage_password("t2 pass2");
tst->set_cloud_storage_pin("t2 pin");
tst->set_cloud_timeout(123);
- tst->set_cloud_verification_status(qPref::CS_VERIFIED);
+ tst->set_cloud_verification_status(qPrefCloudStorage::CS_VERIFIED);
tst->set_save_password_local(false);
QCOMPARE(QString(prefs.cloud_base_url), QString("t2 base"));
@@ -62,7 +62,7 @@ void TestQPrefCloudStorage::test_set_struct()
QCOMPARE(QString(prefs.cloud_storage_password), QString("t2 pass2"));
QCOMPARE(QString(prefs.cloud_storage_pin), QString("t2 pin"));
QCOMPARE((int)prefs.cloud_timeout, 123);
- QCOMPARE((int)prefs.cloud_verification_status, (int)qPref::CS_VERIFIED);
+ QCOMPARE((int)prefs.cloud_verification_status, (int)qPrefCloudStorage::CS_VERIFIED);
QCOMPARE(prefs.save_password_local, false);
// remark is set with set_base_url
@@ -82,7 +82,7 @@ void TestQPrefCloudStorage::test_set_load_struct()
tst->set_cloud_storage_password("t3 pass2");
tst->set_cloud_storage_pin("t3 pin");
tst->set_cloud_timeout(321);
- tst->set_cloud_verification_status(qPref::CS_NOCLOUD);
+ tst->set_cloud_verification_status(qPrefCloudStorage::CS_NOCLOUD);
prefs.cloud_base_url = copy_qstring("error1");
prefs.cloud_git_url = copy_qstring("error1");
@@ -91,7 +91,7 @@ void TestQPrefCloudStorage::test_set_load_struct()
prefs.cloud_storage_password = copy_qstring("error1");
prefs.cloud_storage_pin = copy_qstring("error1");
prefs.cloud_timeout = 324;
- prefs.cloud_verification_status = qPref::CS_VERIFIED;
+ prefs.cloud_verification_status = qPrefCloudStorage::CS_VERIFIED;
prefs.save_password_local = false;
tst->load();
@@ -101,7 +101,7 @@ void TestQPrefCloudStorage::test_set_load_struct()
QCOMPARE(QString(prefs.cloud_storage_password), QString("t3 pass2"));
QCOMPARE(QString(prefs.cloud_storage_pin), QString("t3 pin"));
QCOMPARE((int)prefs.cloud_timeout, 321);
- QCOMPARE((int)prefs.cloud_verification_status, (int)qPref::CS_NOCLOUD);
+ QCOMPARE((int)prefs.cloud_verification_status, (int)qPrefCloudStorage::CS_NOCLOUD);
QCOMPARE(prefs.save_password_local, true);
// remark is set with set_base_url
@@ -121,7 +121,7 @@ void TestQPrefCloudStorage::test_struct_disk()
prefs.cloud_storage_password = copy_qstring("t4 pass2");
prefs.cloud_storage_pin = copy_qstring("t4 pin");
prefs.cloud_timeout = 123;
- prefs.cloud_verification_status = qPref::CS_VERIFIED;
+ prefs.cloud_verification_status = qPrefCloudStorage::CS_VERIFIED;
tst->sync();
@@ -132,7 +132,7 @@ void TestQPrefCloudStorage::test_struct_disk()
prefs.cloud_storage_password = copy_qstring("error1");
prefs.cloud_storage_pin = copy_qstring("error1");
prefs.cloud_timeout = 324;
- prefs.cloud_verification_status = qPref::CS_VERIFIED;
+ prefs.cloud_verification_status = qPrefCloudStorage::CS_VERIFIED;
prefs.save_password_local = false;
tst->load();
@@ -143,7 +143,7 @@ void TestQPrefCloudStorage::test_struct_disk()
QCOMPARE(QString(prefs.cloud_storage_password), QString("t4 pass2"));
QCOMPARE(QString(prefs.cloud_storage_pin), QString("t4 pin"));
QCOMPARE((int)prefs.cloud_timeout, 123);
- QCOMPARE((int)prefs.cloud_verification_status, (int)qPref::CS_VERIFIED);
+ QCOMPARE((int)prefs.cloud_verification_status, (int)qPrefCloudStorage::CS_VERIFIED);
QCOMPARE(prefs.save_password_local, true);
// remark is set with set_base_url
diff --git a/tests/testqPrefDisplay.cpp b/tests/testqPrefDisplay.cpp
index 9347e252f..cf111f6e3 100644
--- a/tests/testqPrefDisplay.cpp
+++ b/tests/testqPrefDisplay.cpp
@@ -7,6 +7,7 @@
#include <QDate>
#include <QTest>
+#include <QSignalSpy>
void TestQPrefDisplay::initTestCase()
{
diff --git a/tests/tst_qPrefCloudStorage.qml b/tests/tst_qPrefCloudStorage.qml
index 02d5f9d21..a48fa672d 100644
--- a/tests/tst_qPrefCloudStorage.qml
+++ b/tests/tst_qPrefCloudStorage.qml
@@ -43,8 +43,8 @@ TestCase {
compare(tst.cloud_timeout, 137)
var x9 = tst.cloud_verification_status
- tst.cloud_verification_status = SsrfPrefs.CS_VERIFIED
- compare(tst.cloud_verification_status, SsrfPrefs.CS_VERIFIED)
+ tst.cloud_verification_status = tst.CS_VERIFIED
+ compare(tst.cloud_verification_status, tst.CS_VERIFIED)
var x11 = tst.save_password_local
tst.save_password_local = true