Skip to content
Permalink
Browse files
Also read proxyFactories of main NAM
  • Loading branch information
manisandro committed Jul 9, 2021
1 parent f083876 commit 523135ebb710b3e418384461642fac1bc240eaef
Showing with 9 additions and 1 deletion.
  1. +7 −1 src/core/network/qgsnetworkaccessmanager.cpp
  2. +2 −0 src/core/network/qgsnetworkaccessmanager.h
@@ -67,7 +67,13 @@ class QgsNetworkProxyFactory : public QNetworkProxyFactory
QgsNetworkAccessManager *nam = QgsNetworkAccessManager::instance();

// iterate proxies factories and take first non empty list
const auto constProxyFactories = nam->proxyFactories();
QList<QNetworkProxyFactory *> proxyFactories = QgsNetworkAccessManager::sMainNAM->proxyFactories();
if ( nam != QgsNetworkAccessManager::sMainNAM )
{
proxyFactories.append( nam->proxyFactories() );
}
const auto constProxyFactories = proxyFactories;

for ( QNetworkProxyFactory *f : constProxyFactories )
{
QList<QNetworkProxy> systemproxies = f->systemProxyForQuery( query );
@@ -795,6 +795,8 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager
QNetworkReply *createRequest( QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *outgoingData = nullptr ) override;

private:
friend class QgsNetworkProxyFactory;

#ifndef QT_NO_SSL
void unlockAfterSslErrorHandled();
void afterSslErrorHandled( QNetworkReply *reply );

0 comments on commit 523135e

Please sign in to comment.