From bca2c2a101b344079d77abc2e7f5a9e986046c93 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 30 Apr 2016 10:16:00 -0700 Subject: Connect to the reply, not the manager This way if there are other pending connections we don't get triggered by the wrong completion. Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 56c99be80..a0ed9873c 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -302,7 +302,6 @@ void QMLManager::checkCredentialsAndExecute(execute_function_type execute) CloudStorageAuthenticate *csa = new CloudStorageAuthenticate(this); csa->backend(prefs.cloud_storage_email, prefs.cloud_storage_password); connect(manager(), &QNetworkAccessManager::authenticationRequired, this, &QMLManager::provideAuth, Qt::UniqueConnection); - connect(manager(), &QNetworkAccessManager::finished, this, execute, Qt::UniqueConnection); QUrl url(CLOUDREDIRECTURL); request = QNetworkRequest(url); request.setRawHeader("User-Agent", getUserAgent().toUtf8()); @@ -310,6 +309,7 @@ void QMLManager::checkCredentialsAndExecute(execute_function_type execute) reply = manager()->get(request); connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(handleError(QNetworkReply::NetworkError))); connect(reply, &QNetworkReply::sslErrors, this, &QMLManager::handleSslErrors); + connect(reply, &QNetworkReply::finished, this, execute, Qt::UniqueConnection); } } -- cgit v1.2.3-70-g09d2