{
public:
QGlobalNetworkProxy()
- : mutex(QMutex::Recursive)
- , applicationLevelProxy(Q_NULLPTR)
+ : applicationLevelProxy(Q_NULLPTR)
, applicationLevelProxyFactory(new QSystemConfigurationProxyFactory())
#ifndef QT_NO_SOCKS5
, socks5SocketEngineHandler(new QSocks5SocketEngineHandler())
applicationLevelProxyFactory = factory;
}
- QNetworkProxy applicationProxy()
+ QNetworkProxy applicationProxy() const
{
return proxyForQuery(QNetworkProxyQuery()).first();
}
- QList<QNetworkProxy> proxyForQuery(const QNetworkProxyQuery &query);
+ QList<QNetworkProxy> proxyForQuery(const QNetworkProxyQuery &query) const;
private:
QMutex mutex;
#endif
};
-QList<QNetworkProxy> QGlobalNetworkProxy::proxyForQuery(const QNetworkProxyQuery &query)
+QList<QNetworkProxy> QGlobalNetworkProxy::proxyForQuery(const QNetworkProxyQuery &query) const
{
- QMutexLocker locker(&mutex);
-
QList<QNetworkProxy> result;
// don't look for proxies for a local connection