summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qnetworkproxy_win.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QtNetwork: use QStringRef to optimize memory allocationAnton Kudryavtsev2016-06-161-1/+1
| | | | | | | | | Replace substring functions that return QString with corresponding functions that return QStringRef where it's possible. Change-Id: Id7f70e5bd72c91ed210ec463aad1d84fe3b40c15 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* QtNetwork: eradicate Q_FOREACH loops [rvalues]Marc Mutz2016-05-041-2/+4
| | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. This is the simplest of the patch series: Q_FOREACH took a copy, so we do, too. Except we don't, since we're just catching the return value that comes out of the function (RVO). We can't feed the rvalues into range-for, because they are non-const and would thus detach. Change-Id: I42c9c44d948ab1512a69d42890187bc3cf2d7e58 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtNetwork: use const (and const APIs) moreAnton Kudryavtsev2016-04-271-1/+1
| | | | | | | | | | | For CoW types, prefer const methods to avoid needless detach()ing. Mark predictNextRequest() as const, because this method does not modify the object. Change-Id: Ic94e2b31445ece46ab1423bf5b5f4e66d9a5b6ca Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QtNetwork: eradicate Q_FOREACH loops [needing qAsConst()]Marc Mutz2016-04-251-2/+2
| | | | | | | | | ... by replacing them with C++11 range-for loops. To avoid detaches of these mutable Qt containers, wrap the container in qAsConst(). Change-Id: I47c5308a6ad220b4c5495e55a3b0d38547bfa8d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtNetwork: eradicate Q_FOREACH loops [already const]Marc Mutz2016-04-251-4/+4
| | | | | | | | | | | ... (or trivially marked const) local variables or parameters, by replacing them with C++11 range-for loops. Also ported one indexed loop. Change-Id: Idddcac48ce7527b1ea674671ceb9aaf4d31fb42e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-131-3/+12
|\ | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/testlib/qtestcase.cpp src/testlib/qtestcase.qdoc Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
| * Limit URLs for proxy auto config to 2083 charsSebastian Lösch2016-04-071-3/+12
| | | | | | | | | | | | | | | | | | On Windows only URLs up to 2083 characters are supported, so longer URLs are truncated. Task-number: QTBUG-52271 Change-Id: I625e4d089df4d977d39e61e5831611e04260e729 Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-101-4/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| * Windows : fix call to LookupAccountNameWAntonio Lotti2015-02-041-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call to LookupAccountNameW from advapi32 was rewritten following the example: http://msdn.microsoft.com/en-us/library/aa392742%28v=vs.85%29.aspx This prevents the generation of a garbage pointer when accessing QWindowsSystemProxy::init() for Qt compiled as 64bit library with MinGW-w64. Task-number: QTBUG-39874 Task-number: QTBUG-38145 Change-Id: I620b2fa64941f84838f9a386851480285336e8d1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* | Win32: Re-init system proxy if internet settings changeDaniel Molkentin2015-02-031-2/+84
|/ | | | | | | | | | | | | | | | | | Because Proxy Auto Configuration performs DNS lookups, the proxy settings are being cached. For long-running programs this means that once users switch e.g. from or to company networks with a proxy, they instantly will lose connectivity because we cache the old setting. To remedy this, we monitor the Registry (locations courtesy of Chromium's platform support) for changes in its settings, and requery for the current proxy in that case. Task-number: QTBUG-3470 Task-number: QTBUG-29990 Change-Id: Id25a51387bcd232c5f879cea0371038986d0e2de Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix the network proxy code for windows to detect properly servicesThierry Bastian2013-10-301-32/+20
| | | | | | | | | | | | | | | This patch makes it so even sub processes of services are also detected to be running in the context of a service. With the previous code it would only detect that the current process is a service and not the sub processes. This fix makes sure we detect properly if the current process is running in the context of a service. This is important to detect properly the proxy configuration of the current user. Change-Id: I110dee62597aec3f8e2f6925166a428f72d14fd0 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Windows - "bypass proxy for local..." also affects IP addressesShane Kearns2012-04-201-2/+19
| | | | | | | | | | | | | | | | If the "bypass proxy for local addresses" option is enabled in the windows proxy configuration, then do not use the proxy for any IP address in the subnet of any network interface. As the systemProxyForQuery api is now offering HTTP proxy tunnels for TCP sockets, this change avoids local ad-hoc network connections being routed through the proxy. In the case where the local address was on a different interface to the proxy server, it may have been unreachable through the proxy. For example IP over USB or Bluetooth. Change-Id: I0842732832a7795112be029d923ed168edc008d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed networkproxy build under WinCEBjoern Breitmeyer2012-04-161-0/+1
| | | | | | | | | | The used functionality is partially not available under WinCE. qnetworkfunctions_wince.h encapsulates the needed extra symbols. It only needs to compile as the functions are loaded dynamically. Change-Id: Ieb9010d4f6c7f94d39918b869ac503976e094e49 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fixes a problem with the proxy detection on WindowsThierry2012-04-031-2/+46
| | | | | | | | | | | | | | | | The current scheme is to use IE's default config. If that fails get the winhttp config. That's ok. The problem is that if you run a program as a service getting the IE config will set the fAutoDetect flag. But later the call to WinHttpGetProxyForUrl mightfail with the error code ERROR_WINHTTP_AUTODETECTION_FAILED. this patch just makes sure that we have a fallback winhttp solution in case the IE proxy is not set. The new code detcted if the current process is a service, in which case it will try to default to the system-wide proxy. Change-Id: I57e9082a46a8422c54f8f069715752c271a3a001 Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Windows - handle both auto detect proxy settings togetherShane Kearns2012-03-081-7/+31
| | | | | | | | | | | | | | | | If both "automatically detect settings" and "use automatic configuration script" are selected in internet options, then respect that. Because of performance issues, these are tried separately, and disabled if they fail. Task-number: QTBUG-13957 Task-number: QTBUG-10238 Change-Id: Ibc824d3039afeaf12c5ea82ed95287e5cf4e1776 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Fix a number of bugs with windows system proxiesShane Kearns2012-03-081-6/+75
| | | | | | | | | | | | | | | | TcpServer requests always returned no proxy, even if socks was available Tag handling was broken for empty tag (if system proxies were tagged) Tag handling was broken for unknown tags - now handled the same as if no tag was given at all. When there are different proxies for http and https, windows returns the http proxy first. However we should prefer to use the https proxy for general sockets, as it's more likely to support the CONNECT method. Change-Id: I55dcadf2e142367e857f94e55fdbb0c4ddb513a3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Windows - fall back on static proxy config if autoproxy failsShane Kearns2012-03-081-23/+17
| | | | | | | | | | | | If both manual proxy settings are configured and the autodetect setting is enabled, fall back on the manual configuration when auto detection fails. Task-number: QTBUG-10428 Change-Id: If008c7c967eec6256ce3c614fff0ec258190d451 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Windows - handle proxy autoconfiguration resulting in no proxyShane Kearns2012-03-081-0/+2
| | | | | | | | | | The PAC file may result in direct connection, in which case WinHttp returns null strings for the proxies and the connection type marked as direct. In this case, return the default list (no proxy) Change-Id: I601033f56a841bb92ea80a28174bb993b024ad79 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows - fix proxy types for manually specified proxiesShane Kearns2012-03-081-8/+15
| | | | | | | | | | | | | | | When the windows internet options are used to specify a different proxy for each protocol, assume the proxy server type matches that protocol too. e.g. "socks=qt-test-server:1080" is both tagged for socks, and assumed to be a socks server. "ftp=qt-test-server:2121" is assumed to be an ftp proxy "ftp=http://qt-test-server:3128" is overridden to be a http proxy used for ftp. Task-number: QTBUG-10502 Change-Id: I70615c89d6ede53f0e7d62e6d0754b90d042aa2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows - fix QWindowsSystemProxy global static raceShane Kearns2012-03-061-1/+1
| | | | | | | | Loser of the race would try to delete an uninitialised pointer Task-number: QTBUG-15765 Change-Id: Ie184ee2306e102aa8fbad752ef09b95c3ede00c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows: Fix inclusion of <windows.h>Friedemann Kleint2012-02-011-1/+1
| | | | | | | | | | | | | - Always use <qt_windows.h> as the last file to be included. - Remove it from some headers, use Qt::HANDLE instead of HANDLE. - Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE. - Add NOMINMAX to qt_windows.h to avoid problems with the min/max macros. - Remove <windows.h> from qplatformdefs.h (VS2005) Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+443
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12