summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/kernel/qnetworkproxyfactory
Commit message (Collapse)AuthorAgeFilesLines
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QtNetwork auto tests: compile with QT_NO_FOREACHAhmad Samir2023-08-221-2/+0
| | | | | | | | | | | | | Remove all "#undef QT_NO_FOREACH" white-listing from source files. Previous commits have removed all remaining Q_FOREACH/foreach uses in this sub-tree. Also remove one source file from NO_PCH_SOURCES in CMakeLists.txt. Task-number: QTBUG-115839 Change-Id: I02cf994eda720c028e613407342fbd6658fa62b1 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork auto tests: port Q_FOREACH to ranged-for [4]Ahmad Samir2023-08-221-3/+2
| | | | | | | | | | | | | Straightforward ports where the container could be made const. Use C arrays instead of QList if the data is known at compile time. Drive-by, where appropriate make the for-loop variable a const& (e.g. QString) instead of copying it for no reason. Task-number: QTBUG-115839 Change-Id: I273a386e414e5923e750072f0407226efcd4531e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork auto tests: port Q_FOREACH to ranged-for [1]Ahmad Samir2023-08-221-1/+2
| | | | | | | | | | | | | The loops were iterating over a temporary, so use a local const auto variable to hold it, and use ranged-for. Drive-by, make the for-loop variable const& instead of copying it, for any object that has a d-pointer (QNetworkAddressEntry, QHostAddress, QNetworkInterface). Task-number: QTBUG-115839 Change-Id: If96c0b2a6142fe2fa2ed45ed7e2435cc1f80e005 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Mark all of Qt as free of Q_FOREACH, except where it isn'tMarc Mutz2023-08-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | The density of Q_FOREACH uses in this and some other modules is still extremely high, too high for anyone to tackle in a short amount of time. Even if they're not concentrated in just a few TUs, we need to make progress on a global QT_NO_FOREACH default, so grab the nettle and stick to our strategy: Mark the whole of Qt with QT_NO_FOREACH, to prevent new uses from creeping in, and whitelist the affected TUs by #undef'ing QT_NO_FOREACH locally, at the top of each file. For TUs that are part of a larger executable, this requires these files to be compiled separately, so add them to NO_PCH_SOURCES (which implies NO_UNITY_BUILD_SOURCES, too). In tst_qglobal.cpp and tst_qcollections.cpp change the comment on the #undef QT_NO_FOREACH to indicate that these actually test the macro. Task-number: QTBUG-115839 Change-Id: Iecc444eb7d43d7e4d037f6e155abe0e14a00a5d6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* CMake: Make network tests standalone projectsAlexandru Croitor2023-07-051-0/+6
| | | | | | | | | | | | | | | | | Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: I000cd3b0809b6417c3b1ab520e4de746afee71fc Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* tests: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-171-2/+0
| | | | | | | Pick-to: 6.5 Change-Id: I8d106554bb86ac1ec9bb7a4083de4c376bcbab1d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-281-1/+1
| | | | | Change-Id: I9b7404e1d3a78fe0726ec0f5ce1461f6c209e90d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+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>
* tst_QNetworkProxyFactory cleanup genericSystemProxy skippingMårten Nordheim2022-04-211-10/+5
| | | | | | | | | Instead of having Q_UNUSED and QSKIP in the test itself, we just skip in the _data function. Change-Id: I9da3d3104ec25e2645e5770e6392bd46958da072 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Android: skip tst_QNetworkProxyFactory::genericSystemProxyIvan Solovev2022-03-302-4/+1
| | | | | | | | | | | | Android uses its own implementation of QNetworkProxyFactory, so the test of a generic implementation will never be working there. The "http_proxy" environment variable is simply ignored in Android's implementation. Fixes: QTBUG-87385 Pick-to: 6.3 6.2 Change-Id: I3c24e3481b70872d332310aa86c68adad9c2b7e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix some warnings about virtual/overrideAndreas Buhr2021-02-231-2/+2
| | | | | | | | | This patch marks some functions "override" to silence the corresponding warning. Change-Id: I88ccc5fa7521ecccc84a6cba9f06ea185cc5679e Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-071-9/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Android: blacklist a list of failing tests for androidAssam Boudjelthia2020-11-041-0/+3
| | | | | | | | | | | | | | | | We want to re-enable Android tests in QTQAINFRA-3867. However, many tests are failing already preventing that from happening. QTBUG-87025 is currently keeping track (links) to all of those failing tests. The current proposal is to hide those failing tests, and enable Android test running in COIN for other tests. After, that try to fix them one by one, and at the same time we can make sure no more failing tests go unnoticed. Task-number: QTBUG-87025 Change-Id: Ic1fe9fdd167cbcfd99efce9a09c69c344a36bbe4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-231-1/+1
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-091-1/+1
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-071-5/+5
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Regenerate projects one last time before mergewip/cmakeAlexandru Croitor2020-02-121-3/+1
| | | | | | Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Regenerate tests/auto/network/kernelAlexandru Croitor2019-11-131-4/+0
| | | | | Change-Id: I770fce0f0a369204178ea0dfa7bbd8b210dd3585 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* cmake: Enable network testLiang Qi2019-07-291-0/+18
| | | | | | | Task-number: QTBUG-74146 Change-Id: Ib29d1531f89676afb2b4df5032529b731ace029d Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-041-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qconfig-bootstrapped.h src/corelib/global/qglobal.h src/corelib/tools/qcryptographichash.cpp src/corelib/tools/qcryptographichash.h src/corelib/tools/qmessageauthenticationcode.cpp src/plugins/platforms/windows/qwindowswindow.h tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/itemviews/qitemdelegate/BLACKLIST Change-Id: Ib68112de985a3d714c2071f47c10e907e4f0229a
| * Fix #if-ery and accompanying commentEdward Welbourne2017-09-201-2/+2
| | | | | | | | | | | | | | | | | | The comment was back-to-front on the meaning it needed to address; and the #if-ery used a deprecated define, now changed to match what sanity-bot asked for. Change-Id: I0a971ab2e405e5908066da86964d67c8b852f114 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-09-203-4/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/styles/mac/qmacstyle_mac.mm src/widgets/util/qcompleter.cpp src/widgets/widgets/qmainwindowlayout.cpp src/widgets/widgets/qmdisubwindow.cpp Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
| * Autotest: when using libproxy, QNetworkProxyFactory isn't genericThiago Macieira2017-09-133-4/+4
| | | | | | | | | | | | | | | | | | Looks like whoever created the blacklist never tried to figure out why it happened. Change-Id: I84e45059a888497fb55ffffd14d2fb29e32a4521 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Deprecate and remove the unused bearer support in QNetworkProxyThiago Macieira2017-07-211-113/+1
|/ | | | | | | | | | | | | | | | 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>
* Skip the threaded systemProxyForQuery test on Windows 7Simon Hausmann2017-06-281-1/+4
| | | | | | | | | | | Under qemu/kvm the systemProxyForQuery call - when initiated from a secondary thread - never completes. Consequently the thread hangs, test fails and the crashes due to the inability to cleanly terminate the test thread. Task-number: QTQAINFRA-1200 Change-Id: I9bd4ed163d215fadd8532a03bbdccd80fc8d9cb1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Remove remaining support for BlackberryLouai Al-Khanji2015-11-211-1/+1
| | | | | | | | | 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>
* Tests: Remove CONFIG += parallel_test.Friedemann Kleint2015-09-051-1/+0
| | | | | | | The keyword no longer has a meaning for the new CI. Change-Id: Ibcea4c7a82fb7f982cf4569fdff19f82066543d1 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Tests: Blacklist tests for ubuntu 14.04Caroline Chao2015-04-011-0/+2
| | | | | | | | Instead of making insignificant the all platform for QtBase 5.5 integration. Change-Id: Ief3f29c094bdbc90e684f19c1077ee595fb7d581 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@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>
* 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>
* QtNetwork tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0Sergio Ahumada2014-02-251-1/+0
| | | | | Change-Id: If1cc5fafddc41ed19dd818caf294c69cd4969216 Reviewed-by: Richard J. Moore <rich@kde.org>
* tests: Replace Q_OS_MACX -> Q_OS_OSXSergio Ahumada2013-10-211-1/+1
| | | | | | | | Use the correct identifier for the OS X operating system. Change-Id: I7158a6b77e5e7418bc6b0a565f003500820a346d Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Further followup to Q_OS_MACX changes.Jake Petroules2013-06-241-1/+1
| | | | | | | | Flip !Q_OS_IOS conditions to Q_OS_MACX where it seems appropriate, remove a redundant condition in qtextcodec_p.h. Change-Id: I21c8c0c490f1eb4a9337a7f2f3e907c125489438 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* tst_qnetworkproxyfactory: Fix warnings about unused variables.Friedemann Kleint2013-06-071-0/+5
| | | | | Change-Id: I6fa08353ebea5cdd7fc7a0c982bf1b9d34bbc077 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Fix retrieving of the generic system proxy via environment variablesThomas McGuire2013-04-231-0/+41
| | | | | | | | | | | | ignoreProxyFor() always returned true if the no_proxy was not set, which resulted in the first token being an empty QByteArray, causing the endsWith() check to always evaluate to true. Add a unit test that is enabled for those platforms that use the generic system proxy. Change-Id: I6081ad5e0b8e2c3fee1568835907c32bde5b7772 Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Fix warning about unused function result in tst_qnetworkproxyfactory.Friedemann Kleint2013-03-121-1/+1
| | | | | | Change-Id: I1f996c208e05e456d374726c91a5f52ed64f784c Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tests: Fix some more old references and links to NokiaSergio Ahumada2013-02-011-4/+4
| | | | | | | Task-number: QTBUG-28156 Change-Id: Ifb768b167203c901c5e42ce58c9aaf3db2739320 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jerome Pasion <jerome.pasion@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>
* Don't read from deleted member variablePeter Kümmel2013-01-031-3/+9
| | | | | | | | QNetworkProxy::setApplicationProxy deletes factory set by QNetworkProxyFactory::setApplicationProxyFactory. Change-Id: Iaafd62d1cdb2045d69c7359cacc513056216826c Reviewed-by: Shane Kearns <shane.kearns@accenture.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>
* QtNetwork: bypass proxy for local connectionsJulien Brianceau2012-09-071-0/+61
| | | | | | | | | | | | According to Qt doc, "Network proxy is not used if the address used in connectToHost(), bind() or listen() is equivalent to QHostAddress::LocalHost or QHostAddress::LocalHostIPv6. This is not the case in current implementation. Change-Id: I6b8a40c1e8bd8aad9504d8f939b87eda6e93337c Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I8129c3ef3cb58541c95a32d083850d9e7f768927 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtNetwork: use nullary version of qRegisterMetaType<T>("T")Marc Mutz2012-07-251-3/+0
| | | | | | | | | | | | | | | | | Using the nullary version has the advantage that multiple calls during a program run are much more efficient, since an inlined atomic is used to store the result. It also ensures that Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T>("T") will happily register anything. So I've added the macro where it was missing, or moved it to a central place when it existed hidden. In tst_qnetworkreply, this became a bit tricky, because a private header is conditionally included, so moved the Q_DECLARE_METATYPE() into a conditional section, too. Change-Id: I71484523e4277f4697b7d4b2ddc3505375162727 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix some spelling errorsSergio Ahumada2012-07-111-1/+1
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add CONFIG+=parallel_test to suspected parallel-safe tests.Rohan McGovern2012-05-281-0/+1
| | | | | | | | | These tests have passed a parallel stress test on all three of Linux, Mac, Windows. Mark them with CONFIG+=parallel_test to allow CI to run them in parallel, saving time. Change-Id: I19fd333c3c645a67374ca998f6c8530dd236b0f8 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Windows - "bypass proxy for local..." also affects IP addressesShane Kearns2012-04-201-0/+4
| | | | | | | | | | | | | | | | 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>