summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/network/kernel/qnetworkproxy.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index feef74e737..8d30e81c3b 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -426,6 +426,10 @@ template<> void QSharedDataPointer<QNetworkProxyPrivate>::detach()
QNetworkProxy::QNetworkProxy()
: d(0)
{
+ // make sure we have QGlobalNetworkProxy singleton created, otherwise
+ // you don't have any socket engine handler created when directly setting
+ // a proxy to a socket
+ globalNetworkProxy();
}
/*!
@@ -440,6 +444,10 @@ QNetworkProxy::QNetworkProxy(ProxyType type, const QString &hostName, quint16 po
const QString &user, const QString &password)
: d(new QNetworkProxyPrivate(type, hostName, port, user, password))
{
+ // make sure we have QGlobalNetworkProxy singleton created, otherwise
+ // you don't have any socket engine handler created when directly setting
+ // a proxy to a socket
+ globalNetworkProxy();
}
/*!