Skip to content

Commit e85897c

Browse files
committedNov 10, 2017
Skip proxy auth settings if proxy is disabled
This does not really change anything but it makes more sense
1 parent d8fc6e8 commit e85897c

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed
 

‎src/core/qgsnetworkaccessmanager.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class QgsNetworkProxyFactory : public QNetworkProxyFactory
6666
return proxies;
6767
}
6868

69-
// no proxies from the proxy factor list check for excludes
69+
// no proxies from the proxy factory list check for excludes
7070
if ( query.queryType() != QNetworkProxyQuery::UrlRequest )
7171
return QList<QNetworkProxy>() << nam->fallbackProxy();
7272

@@ -364,16 +364,15 @@ void QgsNetworkAccessManager::setupDefaultProxyAndCache()
364364
);
365365
proxy = QNetworkProxy( proxyType, proxyHost, proxyPort, proxyUser, proxyPassword );
366366
}
367-
}
368-
369-
// Setup network proxy authentication configuration
370-
QString authcfg = settings.value( QStringLiteral( "proxy/authcfg" ), "" ).toString();
371-
if ( !authcfg.isEmpty( ) )
372-
{
373-
QgsDebugMsg( QStringLiteral( "setting proxy from stored authentication configuration %1" ).arg( authcfg ) );
374-
// Never crash! Never.
375-
if ( QgsApplication::authManager() )
376-
QgsApplication::authManager()->updateNetworkProxy( proxy, authcfg );
367+
// Setup network proxy authentication configuration
368+
QString authcfg = settings.value( QStringLiteral( "proxy/authcfg" ), "" ).toString();
369+
if ( !authcfg.isEmpty( ) )
370+
{
371+
QgsDebugMsg( QStringLiteral( "setting proxy from stored authentication configuration %1" ).arg( authcfg ) );
372+
// Never crash! Never.
373+
if ( QgsApplication::authManager() )
374+
QgsApplication::authManager()->updateNetworkProxy( proxy, authcfg );
375+
}
377376
}
378377

379378
setFallbackProxyAndExcludes( proxy, excludes );

0 commit comments

Comments
 (0)
Please sign in to comment.