Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.1, 5.13.1
-
None
-
Ubuntu 14.4
-
0d9f43d534983411e37a9f3912de272a4a6ced64 (qt/qtbase/5.13)
Description
The default application proxy returned by QNetworkProxy::applicationProxy();
used to be of type QNetworkProxy::NoProxy. However, it appears that somewhere between 5.7 and 5.9.1 this has changed.
It's now returning QNetworkProxy::HttpProxy.
Given this code:
#include <QCoreApplication> #include <QNetworkAccessManager> #include <QNetworkProxy> #include <QDebug> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QNetworkAccessManager man; QNetworkProxy proxy = man.proxy(); qDebug () << proxy.type(); QNetworkProxy appProxy = QNetworkProxy::applicationProxy(); qDebug () << appProxy.type(); return 0;//a.exec(); }
On 5.7 I get: 0 and 2 in the output.
On 5.9.1 I get 0 and 3 in the output.
This caused some of our connections to report "Host not found" because we had never explicitly set the proxy on the network access manager.
Attachments
For Gerrit Dashboard: QTBUG-61771 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
273957,5 | Doc: Edit QNetworkProxy::QNetworkProxy() default proxy type | 5.13 | qt/qtbase | Status: MERGED | +2 | 0 |