diff options
Diffstat (limited to 'qt-ui/subsurfacewebservices.cpp')
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 1deb3099c..dfaf69468 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -974,14 +974,21 @@ QNetworkReply* CloudStorageAuthenticate::authenticate(QString email, QString pas void CloudStorageAuthenticate::uploadFinished() { + static QString myLastError; + QString cloudAuthReply(reply->readAll()); qDebug() << "Completed connection with cloud storage backend, response" << cloudAuthReply; if (cloudAuthReply == "[VERIFIED]" || cloudAuthReply == "[OK]") { prefs.cloud_verification_status = CS_VERIFIED; + NotificationWidget *nw = MainWindow::instance()->getNotificationWidget(); + if (nw->getNotificationText() == myLastError) + nw->hideNotification(); + myLastError.clear(); } else if (cloudAuthReply == "[VERIFY]") { prefs.cloud_verification_status = CS_NEED_TO_VERIFY; } else { prefs.cloud_verification_status = CS_INCORRECT_USER_PASSWD; + myLastError = cloudAuthReply; report_error("%s", qPrintable(cloudAuthReply)); MainWindow::instance()->getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error); } |