summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* QTlsBackend/QSslSocket - check the arguments we pass to QObject::connectTimur Pocheptsov2022-01-202-7/+11
| | | | | | | Not to have warnings about invalid (nullptr) parameters. Change-Id: I5fdfa7e99df0f3c9907055cf244efa5a56b21c11 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkRequest: Document how Qt handles 301 and 302 status codesMårten Nordheim2022-01-181-0/+5
| | | | | | | | | To make it explicit Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-92909 Change-Id: I8f8dc99628168a566158acef72ae2a5e001eef88 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Convert date-time to UTC before claiming it's in GMTEdward Welbourne2022-01-171-4/+4
| | | | | | | | | | | | | | | | | | QNetworkHeadersPrivate::toHttpDate() used a custom format to output a date-time; the format supplied GMT as suffix, but neglected to convert the date-time to UTC, so local-time was formatted as if it were UTC, regardless of its actual offset from it. Fixing this (by the obvious toUTC() call) broke formatting when the supplied header value was a QDate, since it's packaged as a QVariant and QVariant's conversion of QDate to QDateTime uses local time's (not UTC's) start of day. So fix headerValue() to separate QDate and QDateTime cases and use startOfDay(Qt::UTC) to get the right start of the day. Added tests for non-UTC date-times appearing correctly in HTTP headers. Fixes: QTBUG-80666 Pick-to: 6.3 6.2 6.2.3 5.15 Change-Id: I2792bce14a07be025cf551b0594630260c112269 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Use \inmodule for all classes and headersTopi Reinio2022-01-171-0/+1
| | | | | | | | | | | | | | | QDoc made some assumptions about the module a class/header belongs to, based on the source file path. This feature is rather error-prone and unnecessarily complex and will be removed from QDoc. Define modules explicitly to avoid documentation warnings when this removal happens. Pick-to: 6.2 6.3 Change-Id: I7947d197db5ac36c12e816caa19bb2f74eda8849 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* QAuthenticator: Use views for arguments in private functionsMårten Nordheim2022-01-172-34/+40
| | | | | | | | | Some lines in tests had to be updated because they lost the implicit conversion from char* to QString. Change-Id: I95af5859ced95b9ca974205398e38c0bd4395652 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Replace QString::utf16 with QString::data where appropriateØystein Heskestad2022-01-171-3/+3
| | | | | | | | | | | QString::utf16() needlessly detaches fromRawData() to ensure a terminating NUL. Use data() where we don't require said NUL, taking care not call the mutable data() overload, which would detach, too. Task-number: QTBUG-98763 Change-Id: Ibd5e56798c0c666893c12c91ff0881842b8430c7 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtNetwork: Include moc filesMårten Nordheim2022-01-1523-0/+46
| | | | | Change-Id: I227a9541bf76c1c048a694f022b8fc419c0c2544 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QTlsBackend: Fix living QObjects after QCoreApplication shutdownMike Achtelik2022-01-132-6/+15
| | | | | | | | | | | | Since switching to the plugin bases system for the tls backends, Qt again retains some QObjects after QCoreApplication shutdown. This was previously fixed in QTBUG-84234, so make sure we destroy the newly introduced QObjects as well. Task-number: QTBUG-84234 Pick-to: 6.3 Change-Id: I1aaea2c90f7d55793c19259be4f9173b4befb246 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QSslSocket (SecureTransport) add TLS 1.3 ciphersuitesTimur Pocheptsov2022-01-121-0/+4
| | | | | | | | | | | | | | | | | | | At some point we decided to support a custom set of ciphersuites specified by QSslConfiguration (which if you ask me was never a good idea). The law of unforseen consequiences bit us again: since we now give a set of ciphesuites to QSslConfiguration and set ciphesuites from the configuration a socket has, we are limited by the ciphersuites we know about at the moment of 'coding'. Meaning if an SDK was updated and CipherSuite.h later adds more ciphersuites, we miss them and 'don't support them', while we ... actually do. This patch tries to add some more ciphersuites introduced in TLS 1.3 (interesting, SecureTransport does not support TLS 1.3, but TLS 1.3 suites can be used in TLS 1.2 session). Pick-to: 6.2 6.3 5.15 Task-number: QTBUG-99368 Change-Id: I439b63845c4893e5621cffaf3bcaf62e2b643c74 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QHttpNetworkConnection: Always set proxy settings to all channelsAndrey Mozzhuhin2022-01-121-2/+2
| | | | | | | | | | | | | | Proxy settings should always be set to all channels because after switching from HTTP/2 to HTTP/1.1 they may all be used. Problem was made in commit 8b9d246225dcd63900399297b0fd553918840bea. It is introduce the QHttpNetworkConnectionPrivate::activeChannel field, which value is 1 got HTTP/2 by default, but can later be changed to 6 if the remote host doesn't support HTTP/2. Pick-to: 6.3 6.2 5.15 Change-Id: Idcdeb22ec806520965f30a22045f99aa009a7362 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use ranged for loops instead of QString::utf16Øystein Heskestad2022-01-071-7/+6
| | | | | | | | Task-number: QTBUG-98763 Change-Id: I27a854121a783e67afcc4f8634ea7c8c921430c2 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: link OpenSSL to openssl tls backend instead of QtNetworkFrank Su2022-01-061-14/+0
| | | | | | | | | | | | | TLS backend has become plugins since Qt 6.2. QtNetwork does not need these links anymore. Also removes unnecessary condition since openssl tls backend is enabled only if OpenSSL is enabled. Pick-to: 6.2 6.3 Change-Id: I4cc0422531d567ad015f9648fbb2bcd51f634cb9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Q_{APPLICATION,GLOBAL}_STATIC: use variadic macrosThiago Macieira2021-12-171-3/+3
| | | | | | | | | | | | | | | | | We can't remove Q_GLOBAL_STATIC_WITH_ARGS, for compatibility reasons. It's also the only way to pass uniform initialization (i.e., initialize the value as value{with_braces}), though I don't think this is used almost anywhere due to the fact that you couldn't pass more than one argument. But Q_APPLICATION_STATIC is new in 6.3, so we have time to change it. [ChangeLog][QtCore][QGlobalStatic] The Q_GLOBAL_STATIC macro is now variadic. Any extra arguments are used as constructor arguments, obliterating the need to use Q_GLOBAL_STATIC_WITH_ARGS(). Pick-to: 6.3 Change-Id: Ib42b3adc93bf4d43bd55fffd16be3656a512fe53 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QSslSocket: export QSslSocketPrivate, unbreaking ubsan buildsMarc Mutz2021-12-161-28/+28
| | | | | | | | | | | | Only individual members were exported, but that's not enough; ubsan needs the vtable and type_info: qtbase/src/plugins/tls/openssl/CMakeFiles/QTlsBackendOpenSSLPlugin.dir/qtls_openssl.cpp.o:(.data.rel+0x1f8): undefined reference to `typeinfo for QSslSocketPrivate' Pick-to: 6.3 6.2 Change-Id: Ic22805af1ac7f4b3ad48532e4ba689d12ee4a4b9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QRingBuffer: overload append() for rvaluesMarc Mutz2021-12-151-1/+1
| | | | | | | | | | | | The majority of append() callers in QtBase pass rvalues, so overload append() to avoid the need for manipulating QBA's atomic ref counts. Also adjust a caller that could pass by rvalue, but didn't, to do so. Pick-to: 6.3 Change-Id: I3d9e60b0d04ef837bfdc526e1f0f691a151006f9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: implement host lookup for socket tunnelingMorten Johan Sørvig2021-12-153-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emscripten implements support for tunneling TCP and UDP sockets through a WebSockets connection. This support is implement for the BSD sockets API, which means that Qt’s existing socket classes can be used, with some adjustments. For example, the flow for making a TCP connection to example.com:1515 can look like this: 1) The application resolves “example.com”. Emscripten creates an internal mapping to a private IP and returns that IP: 172.29.1.0. 2) The application connects to 172.29.1.0:1515. Emscripten makes a WebSocket connection to example.com:1515, and forwards the TCP data over this connection 3) On example.com:1515, a WebSockify intermediate server accepts the WebScoket connection and forwards the TCP data to the target sever, as specified by the WebSockify configuration. Emscripten’s local getaddrinfo() implementation is fast, which means don’t need caching or the thread pool. Instead, special-case lookupHostImpl() for Q_OS_WASM. The implementation calls QHostInfoAgent::lookup() and then posts resultReady using QHostInfoResult. Change-Id: Iaf31efb701ae7cc11752a63cc6b8346d4f09107e Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QNetworkAccessBackend: Fix living QObjects after QCoreApplication shutdownMike Achtelik2021-12-132-3/+8
| | | | | | | | | | | Since switching to the plugin bases system for the network backends, Qt again retains some QObjects after QCoreApplication shutdown. This was previously fixed in QTBUG-84234, so make sure we destroy the newly introduced QObjects as well. Task-number: QTBUG-84234 Change-Id: Ibb411c2dfb716b8f2aea2a3e366253fbd9dd8f64 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiomKai Köhne2021-12-091-1/+1
| | | | | | | | | | Using REQUIRED as a prefix instead of suffix works better with OPTIONAL_COMPONENTS, and is also the order in the CMake manual. Task-number: QTBUG-98867 Pick-to: 6.2 Change-Id: I1ab68408b95d8edf06272a3b9fceccd8d8e597fc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* QNAM: Reintroduce h2c with an attributeMårten Nordheim2021-12-045-5/+26
| | | | | | | | | | | [ChangeLog][QtNetwork][QNetworkRequest] Added QNetworkRequest::Http2CleartextAllowedAttribute which controls whether HTTP/2 cleartext (h2c) is allowed or not. The default is false. This replaces the QT_NETWORK_H2C_ALLOWED environment variable. Task-number: QTBUG-98642 Change-Id: I43ae1cc671788f6d2559cd316f6667b412c8e75e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNAM: Disable h2c by defaultMårten Nordheim2021-11-303-0/+19
| | | | | | | | | | | | | | | | | | And since it's relatively unlikely to be used, just leave it behind a environment variable for now. [ChangeLog][QtNetwork][Potentially Source-Incompatible] Support for clear-text http/2 was disabled due to incompatibility with certain servers. If you were relying on this feature you must re-enable it by setting the QT_NETWORK_ALLOW_H2C environment variable. For a later version of Qt it will get a dedicated attribute. Pick-to: 6.2 Task-number: QTBUG-98642 Change-Id: Id3e360726e285b3128e3e3f4bce9440404c9ad6e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QObject: Q_ASSERT the object type before calling a PMFThiago Macieira2021-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The old-syle signal-slot syntax had the advantage of not delivering signals to slots in derived classes after that derived class's destructor had finished running (because we called via the virtual qt_metacall). The new syntax made no checks, so a conversion from the old to the new syntax may introduce crashes or other data corruptions at runtime if the destructor had completed. This commit introduces a Q_ASSERT to print the class name that the object is not any more. Since this is in inline code, this should get enabled for users' debug modes and does not therefore depend on Qt being built in debug mode. It required some Private classes to be adapted to the new form, by exposing the public q_func() in the public: part. Pick-to: 6.2 Fixes: QTBUG-33908 Change-Id: Iccb47e5527544b6fbd75fffd16b874cdc08c1f3e Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QAuthenticator: Filter out algorithms we don't supportMårten Nordheim2021-11-251-0/+19
| | | | | | | | | | | Which is anything other than MD5 Pick-to: 6.2 5.15 Fixes: QTBUG-98280 Change-Id: Ifbf143f233ee5602fed1594e3316e6b2adec1461 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add more verification when parsing http headers and add testsØystein Heskestad2021-11-191-23/+61
| | | | | | | | Adding tests from QtWebSockets that will reuse QHttpHeaderParser Task-number: QTBUG-80700 Change-Id: I76294a9156173314a3cf09160d0ca4e0d7c6ef3a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Introduce Q_APPLICATION_STATICMike Achtelik2021-11-182-36/+5
| | | | | | | | | | | | | | QObjects must be deleted if the QCoreApplication is being destroyed. This was previously done by implementing custom code in qtbase and other modules. So unify it and introduce a Q_APPLICATION_STATIC, based on the Q_GLOBAL_STATIC, which centralises the logic. Since we still have a few remaining living QObjects, this comes in handy to fix those as well. Task-number: QTBUG-84234 Change-Id: I3040a2280ff56291f2b1c39948c06a23597865c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix qdoc warningsVenugopal Shivashankar2021-11-111-2/+2
| | | | | | | | | | In addition, added the missing warninglimit entry to a few doc configs. Change-Id: I51b9d2ad66123a2a9673a3b42870662641375e6b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: fix network reply status attributeLorn Potter2021-11-061-6/+11
| | | | | | | | | | We were emitting the finished signal before the status code attributes were being set. Fixes: QTBUG-97984 Pick-to: 6.2 5.15 Change-Id: Ib179898dee2b9667d482348ad12180e8bdef74db Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QNI: Add API to check if connection is meteredMårten Nordheim2021-11-043-0/+39
| | | | | | | | | | | | | This may be a useful factor in deciding whether or not you should perform communications over the network which are not purely essential. For example, if you have a logging mechanism you can delay uploading them until you are no longer on a metered network. Task-number: QTBUG-91024 Change-Id: I19d32f031a3893512dc440914133678004987fb1 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNI: Clarify Feature enum entries' documentationMårten Nordheim2021-11-031-5/+9
| | | | | | | | | | | Saying properties are not available depending on feature support is misleading. It is available even if not supported, it's just not useful. Pick-to: 6.2 Change-Id: I6325c50867bb873258c70280adb8d75125db2096 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove pre-Win10 code paths in QtBaseYuhang Zhao2021-11-023-128/+33
| | | | | | | | | | | | | | Mostly a removal of dynamically loaded API. They should all exist on Windows 10 1809 (Qt6's minimum supported version). accessibility parts left untouched to make sure MinGW still compiles. Task-number: QTBUG-84432 Pick-to: 6.2 Change-Id: I7a091fc967bd6b9d18ac2de39db16e3b4b9a76ea Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* configure: Remove declaration of the OPENSSL_PATH variableJoerg Bornemann2021-11-012-4/+1
| | | | | | | | | This variable was used in Qt5 to specify the install location of the OpenSSL library. In Qt6, OPENSSL_ROOT_DIR serves this purpose, and OPENSSL_PATH is unused. Change-Id: I40cc412bb35666dac3dd134ca8bfb67f3d524f80 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QNI: iOS: Fix copy-pasted warning messagesMårten Nordheim2021-10-291-2/+2
| | | | | | Change-Id: Id2b3ff8857a4f86ec88a0f4a8d08a227e145ae4d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QNI: transportMedium support for iOSMårten Nordheim2021-10-292-1/+48
| | | | | | | | | | | | | | It can only differentiate between cellular and not cellular and then we can determine if it's disconnected or (presumably) using wifi. It is also explicitly not supported on macOS, which adds to the confusion. Task-number: QTBUG-91023 Change-Id: I1d002ba06dd9acf1a0daabfb2a4193c07871e9b4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QNI: refactor to avoid tiny lambda slot objectsMårten Nordheim2021-10-262-11/+10
| | | | | | | | | | | | | | by just adding the parameter to the signal there's no longer a need for the tiny lambdas that just call a getter. Originally the idea was that, since the emission from Backend to the 'frontend' may be a queued emission, I wanted to use the getter so that the data emitted from the frontend was as up-to-date as possible. But on one hand, that's not really a big problem, and at the same time it would then emit the signal twice with the same value. Change-Id: Ief0959f8cbf06faf1b02a1ed4ae777181ff4f059 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QNI: Add a convenience method for loading the default pluginMårten Nordheim2021-10-223-2/+65
| | | | | | | | | We have some official plugins, we may as well treat them as default and give a convenient function which loads those. Change-Id: I6251c77ac042b795bcf24b86e510e960ee4bab54 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QNI: Add supportedFeatures getterMårten Nordheim2021-10-222-0/+11
| | | | | | | Which just returns all the supported features Change-Id: I8c3996b00a6ebb114bdbc9db3085a0e27fc8fa79 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Doc: Enable qdoc warning count limitVenugopal Shivashankar2021-10-211-0/+3
| | | | | | | | This should restrict changes that introduce new warnings. Change-Id: I7e4b5d9d5d84b7c336509c380bc7e6d86e360f4a Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* SSL: Update documentation wrt backendsMårten Nordheim2021-10-201-8/+31
| | | | | | | | | Mention the platform-specific backends and add a section on packaging Pick-to: 6.2 Fixes: QTBUG-97532 Change-Id: Ice78e32e81a719ccf237625e542d620662d3073e Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* QNetworkAccessAuthenticationManager: don't mix iterators and pointersGiuseppe D'Angelo2021-10-141-8/+11
| | | | | | | | | | | QList::iterator is not a pointer and shouldn't be treated as one. Convert the code to use iterators consistently (using iterators is necessary due to the call to insert()). Change-Id: I917b3ff6fdcf1f7959e35ac5b091a8140e9f833c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: remove unused imports and fix warning on network java codeAssam Boudjelthia2021-10-121-1/+0
| | | | | | Pick-to: 6.2 Change-Id: Ifa69c04f7f2e75751b6f8a157d04f3870f0c0eb1 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Don't send the default SETTINGS_INITIAL_WINDOW_SIZETimur Pocheptsov2021-10-123-13/+14
| | | | | | | | | | And don't set non-default large value in QNetworkRequest's constructor. Some servers consider those values as 'flow control error'. Pick-to: 6.2 Fixes: QTBUG-97384 Change-Id: I801b7c83fe7e7392a02ba653c36dfa8a22c21d1e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* network: Fix typos in source code commentsJonas Kvinge2021-10-1210-16/+16
| | | | | | Change-Id: Iff505451e3f00de2d753de0f1d891a73cf73ef0d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* network: Fix typos in messagesJonas Kvinge2021-10-122-2/+2
| | | | | | Pick-to: 5.15 6.2 Change-Id: Ibad852372c80a988efeabc2b0757bf238b92b9a3 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* network: Fix typos in documentationJonas Kvinge2021-10-1212-15/+15
| | | | | | | 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>
* QNI: Add missing transportMedium documentationMårten Nordheim2021-10-121-0/+30
| | | | | | | | | I forgot Fixes: QTBUG-97409 Change-Id: I5ee94b2cc4c70b6408bb9bb9368c6876f3179783 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Http/2 - handle PADDED flag correctlyTimur Pocheptsov2021-10-091-2/+3
| | | | | | | | | | | | Previously, when deciding where the actual data is, Frame was calling padding() to test if offset is needed. A curious case with a DATA frame containing compressed body and having 'PADDED' flag set with a padding equal to ... 0, ended in a decompression error (and assert in 6.2 code). Pick-to: 6.2 5.15 Fixes: QTBUG-97179 Change-Id: I9341a4d68510aa4c26f4972afdcd09a530d5a367 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkInfo: Add transport medium detection APIMårten Nordheim2021-10-073-4/+55
| | | | | | | | | | | The new public API returns and notifies changes to the currently active transport medium for the application. And there's a new private API to report it, with backends to follow. Task-number: QTBUG-91023 Change-Id: I527985f9dabcd7bc4a32f36597e21bc4ab664c4e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Android: Update and add missing gradle files for jar foldersAssam Boudjelthia2021-10-063-0/+60
| | | | | | | | | | | | Update the build.gradle for main Qt jar code, and add same files for network and network information backend, so the code can be managed from Android Studio. This also adds .gitignore to ignore Android Studio build artefacts. Pick-to: 6.2 Change-Id: Ic06e9d12708070fad112f17e58b8754608d184f3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QLocalSocket/Win: stop reading in close()Alex Trotsenko2021-10-061-0/+1
| | | | | | | | | | After calling close(), the socket can enter 'Closing' state, in which we try to write buffered data before disconnecting. As the device is already closed, we must disable any pipe reader activity and clear the read buffer. Change-Id: I8994df32bf324325d54dd36cbe1a1ee3f08022d1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* Doc: Do not highlight DTLS client/serverKai Köhne2021-10-051-3/+1
| | | | | | | | | | | The client and server do in practice depend on each other. So setting up things is a tad more complicated, and the use case not big enough to warrant both to be highlighted. Task-number: QTBUG-96575 Pick-to: 6.2 Change-Id: I0ed69f7a20ec490cc977bde7f1b09162153d0bd2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QLocalSocket/Win: add missing check to waitForBytesWritten()Alex Trotsenko2021-10-051-1/+1
| | | | | | | | | | | | | | | Calling pipeWriter->checkForWrite() can indirectly close the socket even if the bytesWritten() signal has not been sent. So, we need to make sure the handle is valid before checking pipe state in the reader. There is no harm in calling PeekNamedPipe() with an invalid handle, but the wrong call should be avoided. This patch amends b2c3b3e8fe0d8bdc88051d0120aaa8d5cf8acce0. Change-Id: I5d2ecbbbe0af817aac68ad6f1173b0ed9b324e98 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>