mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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 <dirk@hohndel.org>
This commit is contained in:
parent
879482e977
commit
bca2c2a101
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue