summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qnetworkproxy.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add QHttpHeaders methods to QNetworkProxyHEADdevLena Biliaieva21 hours1-0/+47
| | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkProxy] Added headers() and setHeaders() methods to QNetworkProxy to provide an interface to work with QHttpHeaders. Task-number: QTBUG-107751 Change-Id: I8a82f56f0262c9f44d0cb52b2e411bf75626b926 Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* qnetworkproxy_mac: use API available both on iOS and macOSTimur Pocheptsov2023-01-301-4/+1
| | | | | | | | | | | | | | | To extract system proxies, the one we used previously, was not available on iOS and thus we could not obtain system proxies there. Support is limited - no such things, as SOCKS/FTP/etc. proxies, only PAC (auto configuration), and HTTP/HTTPS. There are no keys to extract info about HTTPS, so instead we'll use CFNetworkCopyProxiesForURL ( looks like this enables exclusion lists (which are hidden) functionality and apparently from the system point of view HTTP/HTTPS are the same. Fixes: QTBUG-39869 Change-Id: I73af719a2e2b5cded706e6b3faa4b8eaa879352b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtNetwork: includemocsMarc Mutz2022-04-281-0/+2
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102886 Change-Id: Ie027419956d98c971429f2b4c7ae6f8f56c094f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtNetwork: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-211-4/+4
| | | | | | Task-number: QTBUG-98434 Change-Id: Ic235b92377203f7a1429ae7fd784c4a1fa893e9f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-211-1/+1
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I121f87214b77aeab1dfd3e62dc5adaa6255cc0e0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN [1/2]: ↵Marc Mutz2022-04-051-0/+2
| | | | | | | | | | | | | | public API It's one of our best tools to improve compile times. Can't backport to Qt 6.3 or 6.2 because this change introduces new exported symbols. Task-number: QTBUG-102206 Change-Id: I6bfa532be34ca847d3b9034d16c94efed3d602c3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Doc: QNetworkProxyFactory: Mention libproxy in systemProxyForQueryHu Jialun2022-04-011-0/+5
| | | | | | | | | | | | | | Documentation of QNetworkProxyFactory::systemProxyForQuery does not include the libproxy integration, and may be misleading by hinting that desktop environment integrations on other systems are unsupported. Add this piece of information to the documentation to avoid misunderstanding. Pick-to: 6.3 6.2 Change-Id: Id3f14d4a617c25576cb1bd57a494ea77c882635d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* network: Fix typos in documentationJonas Kvinge2021-10-121-1/+1
| | | | | | | Pick-to: 5.15 6.2 Change-Id: I386c6e4a21dacb2553a39a073052dcf6d92a9854 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove bearermanagement usage inside QNAM and QNetworkProxyMårten Nordheim2020-04-011-98/+0
| | | | | Change-Id: I2c4fdf598b46daf1b69a65848ebe0fd78ef8be24 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNetworkProxy/doc: Remove mention of network configurationMårten Nordheim2020-01-301-6/+1
| | | | | | | | | The support for QNetworkConfiguration was deprecated in 5.10 but the documentation was still alluding to the functionality. Change-Id: I7597388c646196fb4744d7bac4f890ca582c5b75 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-6/+6
| | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Joerg Bornemann2019-09-201-3/+5
|\ | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/makefile.h Change-Id: I4c2deac4f6376c85f5e4fe7fb0ccc9ab9a013cd7
| * Doc: Edit QNetworkProxy::QNetworkProxy() default proxy typeLeena Miettinen2019-09-191-3/+5
| | | | | | | | | | | | Fixes: QTBUG-61771 Change-Id: Ideafe6f8f81c156e941f0548c152021b01b606a1 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | QtNetwork: port remaining uses of QMutex::Recursive to QRecursiveMutexMarc Mutz2019-07-061-3/+2
| | | | | | | | | | | | | | In one case, added NSDMI to avoid churning the ctor-init-list. Change-Id: I5587d5cb7e393f60ad29cb5186127304d27d1d46 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-201-2/+2
|/ | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Modernize use of 'http' featureUlf Hermann2017-11-061-4/+8
| | | | | | | | | | Exclude QHttp(Multi)Part from being built if http is disabled, and replace the exclusion macros. Use the qmake project files to exclude source files, and QT_REQUIRE_CONFIG(http) in headers. Change-Id: I432fa3c78aa97b5ed2eb1027ac1dc3bdb134f9ba Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-061-4/+6
|\ | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/qopenglwidget/main.cpp src/3rdparty/pcre2/src/pcre2_printint.c src/plugins/platforms/cocoa/qnsview.mm src/widgets/widgets/qcombobox.cpp Change-Id: I37ced9da1e8056f95851568bcc52cd5dc34f56af
| * Convert features.socks5 to QT_[REQUIRE_]CONFIGStephan Binner2017-09-061-4/+6
| | | | | | | | | | | | | | | | The sources were already added conditionally in the project file since 179fe5981fa. Change-Id: I0baaec2e772f3e596d311c1973b9745aa2b80423 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Deprecate and remove the unused bearer support in QNetworkProxyThiago Macieira2017-07-211-24/+24
|/ | | | | | | | | | | | | | | | This hasn't done anything since at least Qt 5.0. It's possible it was only used in Symbian, which we removed before the 5.0 release. This only served to make the tst_QNetworkProxyFactory test slow. [ChangeLog][QtNetwork][QNetworkProxy] The functions related to QNetworkConfiguration are deprecated. They've performed no action since Qt 5.0, so code using them can safely stop doing so. Change-Id: I84e45059a888497fb55ffffd14d31b7c2978a04e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add debug stream operator for QNetworkProxyQueryLars Schmertmann2017-01-241-4/+15
| | | | | | | Change-Id: Iae215827350e47a8ce31e5828d3ad1ed54564e84 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: André Klitzing <aklitzing@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Doc: added spec about parameter enableNico Vertriest2016-12-121-2/+2
| | | | | | | | Err: Undocumented parameter 'enable' in QNetworkProxyFactory::setUseSystemConfiguration() Err: no such parameter 'editable' in QComboBox::setCompleter() Change-Id: Ib27b93cf74e97efd656eda1265003f33c6802005 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Tweak wording of QNetworkProxy doc for SOCKS5Edward Welbourne2016-11-291-1/+3
| | | | | | | | | It was phrased for an out-of-date version of Qt. Adapt phrasing to be future-proof. Reflow text. Change-Id: Ic026a7719ba6fb1de2830358a75cd6f30c5f8897 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QNetworkProxy::usesSystemConfiguration() accessorKai Koehne2016-11-021-18/+54
| | | | | | | | | Allow to check programmatically whether using the system proxy settings is enabled. To implement this the QSystemConfigurationProxyFactory is replaced by an explicit boolean in QGlobalNetworkProxy. Change-Id: I52231b4ffc890b085bcd1739acf93c97bdb18eb5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-161-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/io/qsettings.cpp src/corelib/itemmodels/qstringlistmodel.cpp tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
| | * Doc: Change instances of '(Mac) OS X' to 'macOS'Topi Reinio2016-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Fix grammar issues in SCTP documentationAlex Trotsenko2016-08-021-2/+2
| | | | | | | | | | | | | | | | | | Change-Id: I11bfb20dc3d4db98dccfd3bc680fb1ffbd522508 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Introduce SCTP sockets supportAlex Trotsenko2016-07-271-2/+35
|/ / | | | | | | | | | | | | Add protocol-specific code and the QSctpServer, QSctpSocket classes. Change-Id: Ie9a1d87bd1fda866a2405043d1c15c12ded5a96e Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* | 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>
* | Remove remaining support for BlackberryLouai Al-Khanji2015-11-211-10/+0
|/ | | | | | | | | The platform is no longer supported or actively maintained, and is in the way for improvements to the Unix event dispatcher and QProcess implementations. Change-Id: I3935488ca12e2139ea5f46068d7665a453e20526 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Libraries: Fix single-character string literals.Friedemann Kleint2015-10-131-2/+2
| | | | | | | Use character literals where applicable. Change-Id: I8e198774c2247c1cc1d852a41b59b301199b7878 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove <qhash.h> where it's not usedMarc Mutz2015-04-201-1/+0
| | | | | | | | To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5) in public headers. Change-Id: I6117e8a6b11200d2f1a0a94a0e87d5c27538218e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Network: Fix operator<<(QDebug, ...) operationsKai Koehne2015-02-121-0/+2
| | | | | | | | | | | | Use the QDebugStateSaver saver(debug); debug.resetFormat().nospace(); idiom to unify the formatting and whitespace handling. Change-Id: Id346d63b3f589b60ca19e4459271d587f1a0c003 Reviewed-by: Richard J. Moore <rich@kde.org>
* 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>
* 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>
* Replace Note: with \note in documentationKurt Pattyn2014-03-131-1/+1
| | | | | | Change-Id: I213ac1fb2733e675f3641441fe6c621bab06c1f0 Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Richard J. Moore <rich@kde.org>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-8/+8
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Merge branch 'dev' into stableOswald Buddenhagen2013-03-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | This starts Qt 5.1 release cycle Conflicts: src/gui/text/qfontdatabase.cpp src/gui/text/qharfbuzz_copy_p.h src/widgets/kernel/qapplication.cpp src/widgets/kernel/qcoreapplication.cpp Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
| * BB10 systemProxyForQuery: query system proxy also for non-URL requestsPeter Hartmann2013-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ... like e.g. in QAbstractSocket::connectToHost(). We can set the scheme on the query URL based on well-known ports; even if the port is not well-known, we can just query the URL anyhow and let the netstatus API resolve the right proxy for us. In addition, return early for local schemes like "file" and "qrc". Task-number: QTBUG-29425 Change-Id: I900f1ecbac6dd380bb8a77470b39de2c07aa7f6e Reviewed-by: Andrey Leonov <aleonov@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | Correct sentence in QNetworkProxy::setApplicationProxy() documentation.Mitch Curtis2013-03-061-1/+1
|/ | | | | | | Change-Id: I46fa7f814901cbe6a1f8f003f461bf1eee6f8bde Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Jonas Gastal <jgastal@gmail.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>
* Hardcoded url for RFC 1929 QTBUG-28500Nico Vertriest2012-12-111-1/+1
| | | | | | | | | Entered hardcoded url for RFC 1928 QTBUG-28500 Corrected in qtnetworkproxy.cpp Change-Id: Idad0e2294e610095990a65ffc7d5c9c881b09329 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Add more qtbase implictly-shared classes to the listGiuseppe D'Angelo2012-11-301-0/+2
| | | | | | | QText*Format and QDns* ones are still missing. Change-Id: I8e87fba596e87289ca935717e0a90bfc0b0a26c0 Reviewed-by: hjk <qthjk@ovi.com>
* Adding PAC and exclusion list support to BlackBerry Qt proxy implementation.Andrey Leonov2012-10-311-4/+3
| | | | | | | The additional proxy functionality is only available starting BPS API version 3.1.1. Change-Id: Iadd2950119fa1dca706e8cd34804b038e3f704bc Reviewed-by: Peter Hartmann <phartmann@rim.com>
* QtNetwork: introduce configure switch to use system proxies by defaultPeter Hartmann2012-10-301-0/+3
| | | | | | | | | | | | This option is opt-in (default: no). When configured with "-proxies-system-default", Qt automatically picks up the system proxies. Change-Id: I8cc002f29587854f448d97117b08c43d8eedec76 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Implementation of the BlackBerry Qt Proxy support.Andrey Leonov2012-10-081-0/+11
| | | | | | | | An implementation for BlackBerry devices based on the BPS netstatus API. Change-Id: I89deed031d2a867bbd6628bee97f61345b58f1ab Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.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>
* Use QStringList::join(QChar) overload where applicable [QtNetwork]Marc Mutz2012-09-071-1/+1
| | | | | | | | | | | This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: I5b75877ba192fa1357e67fee70dff7c0475991e8 Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>