Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Use QNetworkReply::errorOccurred on Qt 5.15+
- Loading branch information
|
@@ -1145,7 +1145,11 @@ void QgsAuthOAuth2Edit::registerSoftStatement( const QString ®istrationUrl ) |
|
|
registerReply = QgsNetworkAccessManager::instance()->post( registerRequest, json ); |
|
|
mDownloading = true; |
|
|
connect( registerReply, &QNetworkReply::finished, this, &QgsAuthOAuth2Edit::registerReplyFinished, Qt::QueuedConnection ); |
|
|
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) |
|
|
connect( registerReply, qOverload<QNetworkReply::NetworkError>( &QNetworkReply::error ), this, &QgsAuthOAuth2Edit::networkError, Qt::QueuedConnection ); |
|
|
#else |
|
|
connect( registerReply, &QNetworkReply::errorOccurred, this, &QgsAuthOAuth2Edit::networkError, Qt::QueuedConnection ); |
|
|
#endif |
|
|
} |
|
|
|
|
|
void QgsAuthOAuth2Edit::getSoftwareStatementConfig() |
|
@@ -1163,7 +1167,11 @@ void QgsAuthOAuth2Edit::getSoftwareStatementConfig() |
|
|
QNetworkReply *configReply = QgsNetworkAccessManager::instance()->get( configRequest ); |
|
|
mDownloading = true; |
|
|
connect( configReply, &QNetworkReply::finished, this, &QgsAuthOAuth2Edit::configReplyFinished, Qt::QueuedConnection ); |
|
|
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) |
|
|
connect( configReply, qOverload<QNetworkReply::NetworkError>( &QNetworkReply::error ), this, &QgsAuthOAuth2Edit::networkError, Qt::QueuedConnection ); |
|
|
#else |
|
|
connect( configReply, &QNetworkReply::errorOccurred, this, &QgsAuthOAuth2Edit::networkError, Qt::QueuedConnection ); |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
@@ -312,7 +312,11 @@ void QgsO2::onVerificationReceived( QMap<QString, QString> response ) |
|
|
QNetworkReply *tokenReply = getManager()->post( tokenRequest, data ); |
|
|
timedReplies_.add( tokenReply ); |
|
|
connect( tokenReply, &QNetworkReply::finished, this, &QgsO2::onTokenReplyFinished, Qt::QueuedConnection ); |
|
|
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) |
|
|
connect( tokenReply, qOverload<QNetworkReply::NetworkError>( &QNetworkReply::error ), this, &QgsO2::onTokenReplyError, Qt::QueuedConnection ); |
|
|
#else |
|
|
connect( tokenReply, &QNetworkReply::errorOccurred, this, &QgsO2::onTokenReplyError, Qt::QueuedConnection ); |
|
|
#endif |
|
|
} |
|
|
else if ( grantFlow_ == GrantFlowImplicit ) |
|
|
{ |
|
|
|
@@ -4603,7 +4603,13 @@ void QgsWmsLegendDownloadHandler::startUrl( const QUrl &url ) |
|
|
|
|
|
mReply = mNetworkAccessManager.get( request ); |
|
|
mSettings.authorization().setAuthorizationReply( mReply ); |
|
|
|
|
|
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) |
|
|
connect( mReply, static_cast < void ( QNetworkReply::* )( QNetworkReply::NetworkError ) >( &QNetworkReply::error ), this, &QgsWmsLegendDownloadHandler::errored ); |
|
|
#else |
|
|
connect( mReply, &QNetworkReply::errorOccurred, this, &QgsWmsLegendDownloadHandler::errored ); |
|
|
#endif |
|
|
|
|
|
connect( mReply, &QNetworkReply::finished, this, &QgsWmsLegendDownloadHandler::finished ); |
|
|
connect( mReply, &QNetworkReply::downloadProgress, this, &QgsWmsLegendDownloadHandler::progressed ); |
|
|
} |
|
|