summaryrefslogtreecommitdiffstats
path: root/src/network/access
Commit message (Collapse)AuthorAgeFilesLines
* Remove accidental leftover debug printoutMårten Nordheim2020-06-101-1/+0
| | | | | Change-Id: I1de2f1dfd8ba4a19049ef96d85cf15206510410d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove winrtOliver Wolff2020-06-061-8/+0
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QtNetwork remove deprecated signalsTimur Pocheptsov2020-06-043-14/+1
| | | | | | | | | | Use 'errorOccurred' instead of 'error' and 'sslHandshakeErrors' instead of 'sslErrors'. Fixes: QTBUG-82605 Change-Id: I19d4845b16c7b636af7b0658d4fbbba4eef9d029 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkReplyHttpImpl: resolve a todo after the bearer removalMårten Nordheim2020-06-042-24/+3
| | | | | | | | | | | Not quite "next commit" like I wrote originally, but better late than never. As the comment said (and the code shows) it only returns true now so the extra function and if-check isn't needed anymore. Change-Id: I9e8fb8891a116475ab78c3848d7cfcdb659ac521 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* H2 protocol handler: make sure inflateEnd gets called on z-streamTimur Pocheptsov2020-06-031-0/+3
| | | | | | | | | | | | | | | The request/reply pair is created out of QNetworkRequest, we set autoDecompress data-member on the request, but not reply. As a result, reply in its destructor fails to release memory, allocated by z-lib (by failing to call inflateEnd). Since with H1 requests it does not seem to be a problem (no leaks detected), I'm limiting this change to H2 handler only. Later it will be retired by the stream decompression change in Qt 6, but will be picked to 5.15. Fixes: QTBUG-84560 Pick-to: 5.15 Change-Id: I82e19d2b0a83624b730edd20d7d45721e7001731 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* MetaObject: Store the QMetaType of the methodsFabian Kosmale2020-06-025-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | This does the analog of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 for the methods we care about (signals, slots, Q_INVOKABLEs). In addition to the actual QMetaType, we store an array with offsets so that we later can do a mapping from methodIndex to metatype. The newly added QMetaMethod::{return,parameter}MetaType methods can then be used to retrieve the metatypes. This does however require that all involved types are complete. This is unfortunately not a feasible requirement. Thus, we only populate the metatype array on a best effort basis. For any incomplete type, we store QMetaType::Unknown. Then, when accessing the metatype, we fall back to the old string based code base if it's Unknown. Squashes "moc: support incomplete types" and "Fix compile failures after QMetaMethod change" Fixes: QTBUG-82932 Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QNetworkReplyFileImpl: Fix typoMårten Nordheim2020-05-271-1/+1
| | | | | | | | Causes emission to not happen and prints a warning Pick-to: 5.15 Change-Id: Ie80cc89549741079c243e6fd4269f793bccca9fd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* wasm: set status codes from network operationLorn Potter2020-05-252-9/+20
| | | | | | | Pick-to: 5.15 Fixes: QTBUG-83991 Change-Id: Ie1e88189bee8b6a9dc6cb2a721777a5e1032307a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix heap crash when making multiple network callsLorn Potter2020-05-252-20/+23
| | | | | | | Pick-to: 5.15 Task-number: QTBUG-83991 Change-Id: I354934b53799f3eeb958395932bed18289b1e279 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QNetworkReply: Remove some bearer management leftoversMårten Nordheim2020-05-155-113/+3
| | | | | | | | migrating backend was done if the QNetworkSession changed. With QNetworkSession gone this was no longer called from anywhere. Change-Id: I8c995001f9d4c7ae83446b4d29fa62c954c79889 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove deprecated QDesktopServices APIsVolker Hilsheimer2020-05-131-1/+1
| | | | | Change-Id: Ic21ad2938b20c1aa3ae499a921c9cff92f615816 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-044-2/+9
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/text/qlocale.cpp src/network/access/qnetworkaccessmanager.cpp Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
| * QNAM: Don't check if a session is needed for a cache lookupMårten Nordheim2020-04-302-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | QNetworkAccessCacheBackend didn't override the virtual start() function which then deferred to QNetworkAccessBackend::start() which conditions its success on whether or not a network session is available. Override the function and reimplement it without the network session check. Fixes: QTBUG-83205 Change-Id: I45d98a6f5da8ad04bb9da551a131f109e83074d7 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * wasm: fix network download crashLorn Potter2020-04-291-1/+1
| | | | | | | | | | | | | | | | It seems it was defaulting to the indexdb filesystem, but it is not mounted. Fixes: QTBUG-83827 Change-Id: I1f81d790e5786fe41b59c0f41ca7f6025732c9b2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * QNAM/QNetConMon: emit networkAccessibleChanged on changesMårten Nordheim2020-04-281-0/+3
| | | | | | | | | | | | | | For compatibility with the bearer functionality. Change-Id: I26ba6bad046b3f99c8ee13e709a26ddcbd868e25 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QNAM/QNetConMon: Update handling of QNetworkConnectionMonitor::startMårten Nordheim2020-04-301-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QNetworkConnectionMonitor::start was previously called after checking d->networkAccessible, unfortunately that means if the network was unavailable when QNetworkConnectionMonitor was created we don't subscribe to updates or recheck the status (unless QNetworkAccessManager::networkAccessible() is called). Move the call to start to before the offline check. Also update the Windows backend so that it updates networkAccessible on the call to start() Pick-to: 5.15 Change-Id: I37647f19f703947143e7cbdafe09619ce0d98cc1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QtNetwork: fix a few more char -> QChar conversionsMarc Mutz2020-04-301-2/+2
| | | | | | | | | | | | | | | | They were masked by all QChar ctors being made explicit, except the char16_t one, which was left as the only viable choice. Change-Id: I7288e6ae32b2771859a61c0b99783209d47616bc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Port qIsEffectiveTLD() to QStringViewMarc Mutz2020-04-261-1/+1
| | | | | | | | | | | | | | | | | | Also add a piece of documentation that the input needs to be in lower-case (the implementation uses qt_hash to index into a table of TLDs, and qt_hash is case-sensitive). Change-Id: I911c0e2bb0826fc1b0fc01ed60bdfd6e4c0298f2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-088-222/+148
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| * H2C - make sure we send the client preface and settingsTimur Pocheptsov2020-04-073-0/+10
| | | | | | | | | | | | | | | | | | | | It's required as a response to upgraded protocol and apparently some servers would wait for it, not sending any frames. Becomes a problem in case only one request was sent. Fixes: QTBUG-83312 Change-Id: I90dc5c04095f0b78baa404466625d329dc4c6e21 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * macOS: Remove all use of deprecated Q_OS_OSX defineTor Arne Vestbø2020-04-031-1/+1
| | | | | | | | | | Change-Id: I49c285604694c93d37c9d1c7cd6d3b1509858319 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * wasm: refactor network to use fetch APILorn Potter2020-03-263-216/+132
| | | | | | | | | | | | | | | | | | | | This has better support for threaded use, and gets rid of bind use. This requires emscripten 1.38.37 and above Task-number: QTBUG-76891 Change-Id: Ic30a6820c2ce945c314751c06cfc356914a71217 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * More qOverload cleanups in qtbaseTimur Pocheptsov2020-03-241-1/+1
| | | | | | | | | | | | Task-number: QTBUG-82605 Change-Id: I1c3c14ed82911ed5483258c11e76f5dd7744fa12 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * Fix the name in invokeMethodTimur Pocheptsov2020-03-231-4/+4
| | | | | | | | | | | | Task-number: QTBUG-82605 Change-Id: If21d9c25d607e8a363fe703b4ffa1e2d207eef39 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | QtNetwork: Delete bearer managementMårten Nordheim2020-04-051-2/+0
| | | | | | | | | | | | | | | | | | | | All remaining pieces are gone, configuration included. Relevant CMakeLists and configure.cmake were regenerated. Fixes: QTBUG-76502 Change-Id: I667b5da7e3802830d236d50b5e9190c2ee9c19e2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Remove bearermanagement usage inside QNAM and QNetworkProxyMårten Nordheim2020-04-0116-1129/+5
| | | | | | | | | | Change-Id: I2c4fdf598b46daf1b69a65848ebe0fd78ef8be24 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Remove QRegExp usage in QNetworkCookieLars Knoll2020-04-011-11/+13
| | | | | | | | | | | | | | | | | | | | | | Changed this to not use capturedTexts(), as it is slower than required, and behaves slightly differently than in QRegExp (the returned list might be shorter than the amount of captures if the last capture didn't match). Change-Id: I3f90128af62d784a3d1beb993ab215e0c7d6b826 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Get rid of QRegExp usage in QFtpLars Knoll2020-03-311-12/+15
| | | | | | | | | | | | | | Change-Id: Ia8743467d5b4537fe324a1278b526eb16bf0f732 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | QHttpNetworkReplyPrivate: Remove unused variableMårten Nordheim2020-03-253-1306/+0
| | | | | | | | | | | | | | Oh, and re-remove the spdy protocol handler. Change-Id: I9ca3517b14ac202eac19ae75d481cfd78d431abb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-164-2/+6
|\| | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
| * QtNetwork deprecations: suppress internal warningsMårten Nordheim2020-03-124-2/+6
| | | | | | | | | | | | | | | | There're some uses we can't get rid of until the deprecated functions are deleted, so suppress them for now. Change-Id: I85b737eefc71f8f3ac939dfa961383220a8244af Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Fix QNetworkAccessCache after QHash stability semantics changeLars Knoll2020-03-152-43/+42
| | | | | | | | | | | | | | | | The data structure relies on stable nodes in QHash, something that is not guaranteed in Qt 6 anymore. Change-Id: I9077ed404ee922893099f5eaae76d2dcea414090 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-112-1/+16
|\| | | | | | | Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
| * Bearer management deprecation cleanupMårten Nordheim2020-03-102-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | For QNAM: Deprecate the to-be-unused enum and mark the property deprecated in docs For bearermanagement: Add a warning on the bearermanagement documentation page that it is deprecated. Change-Id: I2cbe12ddec444d9f704601f07f3a7c9b70dc4f3c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-03-045-6/+21
|\| | | | | | | Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
| * QNetworkReply: Deprecate 'error' signal, use 'errorOccurred' insteadMårten Nordheim2020-03-035-6/+21
| | | | | | | | | | | | | | [ChangeLog][Deprecation Notice] QNetworkReply::error() (the signal) is deprecated; superseded by errorOccurred() Change-Id: I4f1ef410fd22d34ddf87e89cc5709cc60703af95 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-031-1/+1
|\| | | | | | | Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
| * Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-1/+1
| | | | | | | | | | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devLars Knoll2020-02-288-37/+13
|\| | | | | | | Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
| * Revert "QNetworkReply: deprecate the 'error' getter"Alexander Akulich2020-02-282-27/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ccb2cb84f535b0bfce19a95d7f3a36803480cae8 and commit 0f568d0a671e9f0667a1b47ffa6fbb9f7a10d9f5. The patches fix ambiguity between a getter and a signal by changing the getter name, but we still have to rename the signal to follow the signals naming convention. Revert the commits to keep the getter as is and change the signal name instead. Change-Id: Iddbab7c33eea03826ae7c114a01857ed45bde6db Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * QAbstractSocket: deprecate 'error' signal, use 'errorOccurred' insteadAlexander Akulich2020-02-273-5/+5
| | | | | | | | | | | | | | [ChangeLog][Deprecation Notice] QAbstractSocket::error() (the signal) is deprecated; superseded by errorOccurred() Change-Id: I11e9c774d7c6096d1e9b37c451cf0b99188b6aad Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Doc: Rename TransferTimeoutPreset to DefaultTransferTimeoutConstantMårten Nordheim2020-02-262-2/+2
| | | | | | | | | | | | | | | | | | A couple missed instances. Amends 0394961f953094ab3535b79329dace4ed9a0300d Change-Id: I41d47d1476c6688ca8a40b1ca62131891b9dec28 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Revert "QAbstractSocket: deprecate 'error' member-function"Alexander Akulich2020-02-262-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 94b3dd77f29a00ebbd1efdc66d75f57e1c75b152. The patch fixes ambiguity between a getter and a signal by changing the getter name, but we still have to rename the signal to follow the signals naming convention. Revert the commit to keep the getter as is and change the signal name instead. Change-Id: I0dd60cf1ae9d1bd95beeb8ad58661ca4b1fb63b9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-268-28/+22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/bearermonitor/CMakeLists.txt examples/network/CMakeLists.txt src/corelib/tools/qlinkedlist.h src/sql/kernel/qsqldriver_p.h src/sql/kernel/qsqlresult_p.h src/widgets/kernel/qwidget.cpp src/widgets/kernel/qwidget_p.h tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp tests/auto/tools/moc/allmocs_baseline_in.json Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
| * Rename TransferTimeoutPreset to DefaultTransferTimeoutConstantTimur Pocheptsov2020-02-253-6/+6
| | | | | | | | | | | | | | | | | | Found in API review. Replacing with the suggested name which is more Qt-ish. And also preventively fix the name to contain its enum's name to follow the conventions. Change-Id: I00b510e36ccc831f107ecc3c79943d617726b4fb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * QNAM Doc: Remove mention of bearerMårten Nordheim2020-02-191-21/+0
| | | | | | | | | | | | | | 🐻er management is going away Change-Id: I86067d593ece0d35a33f23130260ccb7c4b64881 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-02-185-1/+16
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qlinkedlist.h src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/wasm/qwasmscreen.cpp Change-Id: Iefca7f9f4966bdc20e7052aca736874861055738
| | * QNAM: Correct logic of network monitor when bearer is disabledMårten Nordheim2020-02-141-1/+1
| | | | | | | | | | | | | | | Change-Id: I0abe9034874a80423ad1e332404236dc5ff54365 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * Account for a reply that is finished before we can connect the signalsAndy Shaw2020-02-124-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a case where a connection is refused, then it is possible for it to fail at the time that the QHttpNetworkReply is being created and therefore after the connections have been made it would have already emitted the signal to indicate it was finished with an error. To account for this, then it checks if there is an error code set on the reply and if there is then it will call the relevant slot right away. Fixes: QTBUG-57799 Change-Id: I4e73e5c82092c09f825343d18db40b47c3cdb9ac Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-1316-66/+85
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152