Make sure QGlobalNetworkProxy is created for QNetworkProxy.
Otherwise, you don't have any socket engine handler created when directly setting a proxy to a socket. Change-Id: I35cd7f52331672a6d3e7bcdf817c0fe1fd1e7de3 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
This commit is contained in:
parent
e8a7e926cf
commit
92659bacda
@ -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();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
x
Reference in New Issue
Block a user