[auth] Added debug messages

This commit is contained in:
Alessandro Pasotti 2017-09-27 15:15:49 +02:00
parent 40b7f7914a
commit 385cca6036
2 changed files with 4 additions and 2 deletions

View File

@ -1467,7 +1467,7 @@ bool QgsAuthManager::updateNetworkProxy( QNetworkProxy &proxy, const QString &au
{
if ( !( authmethod->supportedExpansions() & QgsAuthMethod::NetworkProxy ) )
{
QgsDebugMsg( QString( "Proxy updating not supported by authcfg: %1" ).arg( authcfg ) );
QgsDebugMsg( QStringLiteral( "Proxy updating not supported by authcfg: %1" ).arg( authcfg ) );
return true;
}
@ -1476,6 +1476,7 @@ bool QgsAuthManager::updateNetworkProxy( QNetworkProxy &proxy, const QString &au
authmethod->clearCachedConfig( authcfg );
return false;
}
QgsDebugMsg( QStringLiteral( "Proxy updated successfully from authcfg: %1" ).arg( authcfg ) );
return true;
}

View File

@ -359,7 +359,7 @@ void QgsNetworkAccessManager::setupDefaultProxyAndCache()
{
proxyType = QNetworkProxy::FtpCachingProxy;
}
QgsDebugMsg( QString( "setting proxy %1 %2:%3 %4/%5" )
QgsDebugMsg( QStringLiteral( "setting proxy %1 %2:%3 %4/%5" )
.arg( proxyType )
.arg( proxyHost ).arg( proxyPort )
.arg( proxyUser, proxyPassword )
@ -372,6 +372,7 @@ void QgsNetworkAccessManager::setupDefaultProxyAndCache()
QString authcfg = settings.value( QStringLiteral( "proxy/authcfg" ), "" ).toString();
if ( !authcfg.isEmpty( ) )
{
QgsDebugMsg( QStringLiteral( "setting proxy from stored authentication configuration %1" ).arg( authcfg ) );
QgsAuthManager::instance()->updateNetworkProxy( proxy, authcfg );
}