mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove function-call indirection in qmlmanager.cpp
QMLManager::tryRetrieveDataFromBackend() was a one-liner calling void QMLManager::checkCredentialsAndExecute() with a pointer-to-member. The latter was never called with a different pointer, therefore fold the latter into the former and remove the indirection. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b9ac89574e
commit
a07b6b4d97
2 changed files with 2 additions and 9 deletions
|
@ -426,7 +426,7 @@ void QMLManager::saveCloudCredentials()
|
|||
}
|
||||
}
|
||||
|
||||
void QMLManager::checkCredentialsAndExecute(execute_function_type execute)
|
||||
void QMLManager::tryRetrieveDataFromBackend()
|
||||
{
|
||||
// if the cloud credentials are present, we should try to get the GPS Webservice ID
|
||||
// and (if we haven't done so) load the dive list
|
||||
|
@ -477,15 +477,10 @@ 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);
|
||||
connect(reply, &QNetworkReply::finished, this, &QMLManager::retrieveUserid, Qt::UniqueConnection);
|
||||
}
|
||||
}
|
||||
|
||||
void QMLManager::tryRetrieveDataFromBackend()
|
||||
{
|
||||
checkCredentialsAndExecute(&QMLManager::retrieveUserid);
|
||||
}
|
||||
|
||||
void QMLManager::provideAuth(QNetworkReply *reply, QAuthenticator *auth)
|
||||
{
|
||||
if (auth->user() == QString(prefs.cloud_storage_email) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue