diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/network/kernel/qnetworkproxy.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp index 4f294b9..7386093 100644 --- a/src/network/kernel/qnetworkproxy.cpp +++ b/src/network/kernel/qnetworkproxy.cpp @@ -423,6 +423,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 the socket + globalNetworkProxy(); } /*! @@ -437,6 +441,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(); } /*! |