diff options
author | jan Iversen <jani@apache.org> | 2018-07-14 16:52:25 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-21 07:49:25 -0700 |
commit | b9b1f03f0d77f1eea86efeed8776a623bd5b30ee (patch) | |
tree | 1804b5204b538d082673ed0223768de2f602bb95 /core/cloudstorage.cpp | |
parent | 4b68329c9db7ed13eaed7dd36ce6c82b1d7d11ca (diff) | |
download | subsurface-b9b1f03f0d77f1eea86efeed8776a623bd5b30ee.tar.gz |
core: activate qPrefCloudStorage
remove CloudStorage from SettingsObjectWrapper and reference qPrefCloudStorage
update files using SettingsObjectWrapper/CloudStorage to use qPrefCloudStorage
this activated qPrefCloudStorage and removed the similar class from
SettingsObjectWrapper.
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core/cloudstorage.cpp')
-rw-r--r-- | core/cloudstorage.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/cloudstorage.cpp b/core/cloudstorage.cpp index 8c4da4791..51bdf5994 100644 --- a/core/cloudstorage.cpp +++ b/core/cloudstorage.cpp @@ -3,7 +3,6 @@ #include "pref.h" #include "qthelper.h" #include "settings/qPref.h" -#include "core/subsurface-qt/SettingsObjectWrapper.h" #include <QApplication> CloudStorageAuthenticate::CloudStorageAuthenticate(QObject *parent) : @@ -49,10 +48,10 @@ void CloudStorageAuthenticate::uploadFinished() QString cloudAuthReply(reply->readAll()); qDebug() << "Completed connection with cloud storage backend, response" << cloudAuthReply; - CloudStorageSettings csSettings(parent()); + qPrefCloudStorage csSettings(parent()); if (cloudAuthReply == QLatin1String("[VERIFIED]") || cloudAuthReply == QLatin1String("[OK]")) { - csSettings.setVerificationStatus(qPref::CS_VERIFIED); + csSettings.set_cloud_verification_status(qPref::CS_VERIFIED); /* TODO: Move this to a correct place NotificationWidget *nw = MainWindow::instance()->getNotificationWidget(); if (nw->getNotificationText() == myLastError) @@ -61,7 +60,7 @@ void CloudStorageAuthenticate::uploadFinished() myLastError.clear(); } else if (cloudAuthReply == QLatin1String("[VERIFY]") || cloudAuthReply == QLatin1String("Invalid PIN")) { - csSettings.setVerificationStatus(qPref::CS_NEED_TO_VERIFY); + csSettings.set_cloud_verification_status(qPref::CS_NEED_TO_VERIFY); report_error(qPrintable(tr("Cloud account verification required, enter PIN in preferences"))); } else if (cloudAuthReply == QLatin1String("[PASSWDCHANGED]")) { free((void *)prefs.cloud_storage_password); @@ -70,7 +69,7 @@ void CloudStorageAuthenticate::uploadFinished() emit passwordChangeSuccessful(); return; } else { - csSettings.setVerificationStatus(qPref::CS_INCORRECT_USER_PASSWD); + csSettings.set_cloud_verification_status(qPref::CS_INCORRECT_USER_PASSWD); myLastError = cloudAuthReply; report_error("%s", qPrintable(cloudAuthReply)); } |