summaryrefslogtreecommitdiffstats
path: root/src/network
Commit message (Collapse)AuthorAgeFilesLines
* qsslsocket_openssl_symbols.cpp: replace mutex pool use with QBasicMutexMarc Mutz2019-07-081-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | The use of QMutexPool caused an #ifdef, because, lacking an object, some OpenSSL function pointer was used as the address required as input for the mutex pool. Sadly, the names of the functions differ between OpenSSL versions, thus the need for an #ifdef. By simply using a QBasicMutex (defined at namespace scope to evade https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79561), the #ifdef can go away. Another level of #ifdefs goes away because, even for non-QT_CONFIG(thread) builds, Q*Mutex etc are defined, just as no-ops. So we can freely use them without QT_CONFIG(thread) guard, unlike QMutexPool. Finally, optimize for the (common?) case of already-loaded libraries by making symbolsResolved an atomic variable, and checking that before taking the mutex (double-checked locking, done right). For reasons of said GCC bug, again, the QBasicAtomic is defined at namespace scope. And then move the other boolean there for symmetry. Change-Id: Ic5f44871fb200e5368b9af327e4d1e852fbc586c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QtNetwork: port remaining uses of QMutex::Recursive to QRecursiveMutexMarc Mutz2019-07-065-11/+8
| | | | | | | In one case, added NSDMI to avoid churning the ctor-init-list. Change-Id: I5587d5cb7e393f60ad29cb5186127304d27d1d46 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtNetwork: bearer: port from QMutex::Recursive to QRecursiveMutexMarc Mutz2019-07-066-8/+7
| | | | | | Change-Id: I691ecbaf9ea0796decbb48fd62b25d0a2941d979 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.13' into dev"Liang Qi2019-07-053-12/+22
|\
| * Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-053-12/+22
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf qmake/generators/makefile.cpp Change-Id: Ifb2633a69d0bf8cdf12d799c6259beefc279c49e
| | * Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Qt Forward Merge Bot2019-07-032-12/+19
| | |\
| | | * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-032-12/+19
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I936be3c0df2b9845ff6a85eb3d4442cdabe63d37
| | | | * Fix compiler warnings when building with DEBUG defines setVolker Hilsheimer2019-07-021-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I51fc7aae246916e585b21b4e7da1fc5a4ac392fd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | | | * QSocks5SocketEngine: account for in-transit signal when waiting for readMårten Nordheim2019-07-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling waitFor{ReadyRead,Disconnected} it will wait for data but if the data is already received and the read notification has been queued (and there's no more data coming in) it will return false. By checking if a read notification has been queued and then handling this we can easily take care of this scenario. Fixes some flaky tests which missed the read data in waitForDisconnect and similar. Fixes: QTBUG-38385 Change-Id: Ic05d59883c1175783e56ff1822b6636c35aec874 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | | | * QSocks5SocketEngine: pass data to application when connectedMårten Nordheim2019-07-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we end up in the connected state then we should pass on any remaining data immediately instead of waiting until the next time we get a read notification. The other `case`s in the switch might be able to do something similar, but I don't want to introduce that logic now in case it breaks something else, the Connected branch is small and simple to deal with. Should severely reduce flakiness with socks proxy in CI under pressure. Task-number: QTBUG-76367 Change-Id: I0965d4c62a29a25ce6b8dd60862a464279aef0b4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Ryan Chu <ryan.chu@qt.io>
| | * | | Add custom verb support for WASM HTTP requestsFelix Barz2019-07-031-0/+3
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QNetworkReply implementation for Qt for WebAssembly now supports usage of the QNetworkAccessManager::sendCustomRequest, making it possible to send requests with custom verbs. [ChangeLog][QtNetwork][QNetworkAccessManager] Fixed QNetworkAccessManager::sendCustomRequest for Qt For WebAssembly. Fixes: QTBUG-76775 Change-Id: I9394ffef110fce4ed2c877893631bedc7631f71e Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | | | Fix build without features.libraryTasuku Suzuki2019-07-061-1/+0
| | | | | | | | | | | | | | | | | | | | Change-Id: I3ce4a8e4c6488737115f2f16bfd8f0e1fc5fc4fa Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | | Remove usages of QSysInfo's deprecated APIsSona Kurazyan2019-07-052-1/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced QOperatingSystemVersion::WindowsVersion, QSysInfo::windowsVersion(), QSysInfo::macVersion(), QSysInfo::MacintoshVersion with QOperatingSystemVersion::current(). - Added QOperatingSystemVersion::WindowsVista for convenience, as it is used in lots of places. Change-Id: If9c4ac496005b2e70b5c70be160747afa74b98c1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-07-014-9/+17
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl.cpp src/platformsupport/vkconvenience/qvkconvenience.cpp Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-291-2/+4
| |\| | | | | | | | | | Change-Id: I4cb91777e7ae9f462fa219d5b9ebeb277fde49c3
| | * QSocks5SocketEngine: avoid dereferencing null-pointerMårten Nordheim2019-06-281-2/+4
| | | | | | | | | | | | | | | | | | | | | The header argument is optional Change-Id: I035e11db5ee70183274afb48ba67c4d3ed2f615d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | qsslsocket_openssl.cpp - restructure the codeTimur Pocheptsov2019-06-281-6/+4
| | | | | | | | | | | | | | | | | | | | | not to resolve merge conflicts on every 5.13->dev merge. Change-Id: Id41a7efff52148fe46bedcde828646694fd1764d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-282-6/+13
| |\| | | | | | | | | | Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
| | * QHttpNetworkConnection: Change assert to early return and handle Http2Mårten Nordheim2019-06-252-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a http proxy (and presumably other proxies) we might have failed/aborted (aka "finished") the request and _then_ receive a "proxy authentication required" message from the proxy. In this case there is no spdy/http2 reply in the queue, so asserting is wrong. Change-Id: Id9b76b580299f6a6cd6efad62d6aaf63183816fb Fixes: QTBUG-76426 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| | * QHttpNetworkConnectionChannel: don't close if we're already closingMårten Nordheim2019-06-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some scenarios with QNAM we call socket->close, leading to a flush, leading to an error, leading to another error emission... To work around this scenario we stop trying to close the socket if the network channel is already closing. Change-Id: Id15504f476484ce61f11ba83a5755ceb5f581f9b Fixes: QTBUG-76567 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Mark qHash(QOcspResponse) as noexceptMarc Mutz2019-06-292-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Because it is. Change-Id: I8d5204c30884b2c8656615a7d82428c539672d28 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | | Remove unused qmutexpool_p.h includesMarc Mutz2019-06-292-2/+0
| | | | | | | | | | | | | | | Change-Id: Ic5f56b12953f2e42d94f6e6c14fac166c0c75539 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Remove property usage in QHttp2ProtocolHandlerTasuku Suzuki2019-06-292-6/+20
| | | | | | | | | | | | | | | | | | | | | This helps to fix build without feature.properties Change-Id: Ia1fd2a1ca88105048e75694874058bb1292899a0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | QSocks5SocketEnginePrivate::sendRequestMethod(): Fix out of bounds string accessFriedemann Kleint2019-06-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings showing in network tests: tst_QNetworkReply::headFromHttp(rfc+socks): Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt. introduced by qtbase/c2d2757bccc68e1b981df059786c2e76f2969530 (5.14). Replace index access by QByteArray::append(). Change-Id: I0b4aed563d076237d5f9cc6aa438c7502eb3568c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | QBearerEngine: fix const-correctness of a loop with const-propagating QESDPMarc Mutz2019-06-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The loop iterates over a collection of QExplicitSharedDataPointer, which traditionally doesn't propagate const. In Qt 6, it will, so prepare the code for this change, by taking the loop variable by non-const reference. Since the loop is followed by container.clear(), make it a consume-loop by looping over qExchange(container, {}). Change-Id: If12ab005544183598fd76a0c486b2df1582710d5 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-272-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/network/ssl/qsslsocket_openssl.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ibb57a0548b4977797b400637487a56245ac1c024
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-255-54/+70
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstorageinfo_unix.cpp src/network/ssl/qsslsocket_openssl.cpp Change-Id: Ibc9ce799bef62d60d616beaa9fbde8ebeadfbc20
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-202-14/+16
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/network/ssl/qsslsocket_openssl.cpp src/widgets/styles/qstylesheetstyle.cpp Change-Id: Ibe1cd40f46a823c9e5edbe0a3cd16be1e1686b17
| * | | checkOcspResponse - remove unneeded lockingTimur Pocheptsov2019-06-171-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and also plain wrong comments: since we don't set verification callback on a store - we don't have to lock (our q_X509Callback never gets called). This change should simplify the merge with change I have in 5.12 (where I completely got rid of locking). Since I don't care about exact errors found (relying on the fact it's the same chain of certs we check in SSL_connect/SSL_accept), for now we don't try to extract them from OCSP_basic_verify. In fufure, if these chains are different, we can create a temporary store (see how it's done in 'verify', for example) and set a VF callback on this store. Change-Id: I4a36e19836d19c2ea95c869dcfe85f49fe723ff0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | | Doc: Replace example file lists with links to code.qt.ioTopi Reinio2019-05-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of generating .html page for each file in an example project, generate links to code.qt.io, under the correct path and branch, where the user can browse the example source. Store all URLs under QT_INSTALL_DOCS/config where other qt5 submodules can access them. The repository name appears in the URL, so we cannot define a single URL for all modules. Task-number: QTBUG-74391 Change-Id: I63d4d6d2c352877797b1ee8e057d48c0cd789bff Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | | Merge remote-tracking branch 'origin/5.13.0' into 5.13Liang Qi2019-06-173-0/+64
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: I39248f6c561c6274ab5ead64238dd2f80e167eee
| | * | | QSslSocket: add and set the TLSv1.3-specific PSK callbackMårten Nordheim2019-06-133-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If this callback is not set then OpenSSL will call the callback used for <= TLS 1.2 unconditionally when connecting. If using PSK it will call it again later once the preshared key is needed. We don't currently handle the TLSv1.3 PSK, but we definitely should. But for now we can work around it - when psk_use_session_callback is called we simply change the PSK callback to a dummy function whose only purpose is to restore the old callback. This is mostly done to keep behavior the same as it is now for users (and to keep our tests running). Later we can add a new signal and handle this new feature properly. Reviewed-by: Simo Fält <simo.falt@qt.io> (cherry picked from commit d8efc8d718e3b3a0464f321e740541f5b221a5d6) Task-number: QTBUG-67463 Change-Id: I4aca4ae73ec4be7c4f82a85e8864de103f35a834 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2019-06-257-87/+155
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/gui/painting/qdrawhelper.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/android/qandroidinputcontext.cpp src/widgets/styles/qstylesheetstyle.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
| * | | | TLS socket: make verification callback lock-free (OpenSSL)Timur Pocheptsov2019-06-175-51/+70
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When our QSslSocketBackendPrivate (OpenSSL backend) was developed, the ancient versions of OpenSSL did not have an API needed to pass an application-specific data into verification callback. Thus the developers resorted to the use of global variables (a list with errors) and locks. Some of our auto-tests use QNAM and in-process server. Whenever the client (essentially qhttpthreadeddelegate) and the server live in different threads, any use of 'https' is dead-lock prone, which recent events demonstrated and which were previously observed but not understood properly (rare occasions, not always easy to reproduce). Now we fix this for good by removing locking. There are two places (in 5.12) where these locks are needed: 1. Before calling SSL_connect/SSL_accept (handshake) - here we reuse the same trick we do in PSK callback ('SSL' has an external data set, and it's 'this', meaning an object of type QSslSocketBackendPrivate). 2. The static member function 'verify', here we do not have 'SSL', but we have our temporary 'X509_STORE', to which we can directly attach an external data - a pointer to a vector to collect verification errors. Note, this change assumes that OpenSSL Qt is build/linked against is at least of version 1.0.1 - we set external data on SSL unconditionally (no version checks). Fixes: QTBUG-76157 Change-Id: I05c98e77dfd5fb0c2c260fb6c463732facf53ffc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | | Merge "Merge remote-tracking branch 'origin/5.12.4' into 5.12"Qt Forward Merge Bot2019-06-173-0/+64
| |\ \ \
| | * | | QSslSocket: add and set the TLSv1.3-specific PSK callbackv5.12.4Mårten Nordheim2019-06-123-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If this callback is not set then OpenSSL will call the callback used for <= TLS 1.2 unconditionally when connecting. If using PSK it will call it again later once the preshared key is needed. We don't currently handle the TLSv1.3 PSK, but we definitely should. But for now we can work around it - when psk_use_session_callback is called we simply change the PSK callback to a dummy function whose only purpose is to restore the old callback. This is mostly done to keep behavior the same as it is now for users (and to keep our tests running). Later we can add a new signal and handle this new feature properly. Task-number: QTBUG-67463 Change-Id: I4aca4ae73ec4be7c4f82a85e8864de103f35a834 Reviewed-by: Simo Fält <simo.falt@qt.io>
| * | | | Fix crash when app is going to shutdown but conf manager is requestedVal Doroshchuk2019-06-122-14/+16
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the app is finished and going to shutdown, qNetworkConfigurationManagerPrivate() returns nullptr. Change-Id: I01915021d8698802b3a1d0dee43203cd3d4aba74 Task-number: QTBUG-76090 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | | QNetworkAcesssCache: replace a QQueue with a std::vectorMarc Mutz2019-06-201-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code didn't really use the queue as a queue, because it enqueued one at a time, but dequeued potentially many. Even if it actually decays to actual queue behavior: for the small number of elements expected, a vector would still be preferable over the per-element allocation performed by QQueue. Because std::vector doesn't have pop_front(), I took the liberty of making the dequeue code easier to read by using find_if with an aptly-named lambda. Change-Id: I09bd7ede50cb8ab5af5d1fc2ede37a3731f67070 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-207-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | QNetworkConfiguration: remove unused member 'serviceNetworkMembers'Marc Mutz2019-06-142-35/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's never set anywhere, neiher in QtBase nor in any other Qt module. So, remove. Change-Id: If616d350a1c1c74f6f3e87f8cd98ccb3bff5cf70 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | | | Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-06-143-17/+81
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/makefile.cpp qmake/generators/unix/unixmake2.cpp src/corelib/thread/qthread_unix.cpp tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
| * | | wasm: fix crash in case network js event becomes null or undefinedLorn Potter2019-05-271-10/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | also fix data progress Task-number: QTBUG-75489 Change-Id: I5222fda64d258a6ae78ba0ca20194b81c289c27e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | | Merge remote-tracking branch 'origin/5.13.0' into 5.13Liang Qi2019-06-111-7/+8
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/wasm/qwasmintegration.cpp src/plugins/platforms/wasm/qwasmintegration.h Change-Id: Idf4c7936513fb1f21daa8f6105b8545f13447bb8
| | * | Update documentation regarding import/export restrictions for OpenSSLVolker Hilsheimer2019-06-041-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.12.5 and 5.13.0 on we ship OpenSSL 1.1.x libraries with Qt through the binary installers, as Qt is a general purpose toolkit and as such not subject to import/export restrictions. However, application developers still have to take care of the relevant requirements and compliance before distributing OpenSSL. Change-Id: I1c3622116eadda270d638becfa23a5493976e919 Fixes: QTBUG-75814 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
| * | | doc: Add dontdocument.qdoc filesMartin Smith2019-05-071-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each module that has publically declared classes or structs that are not meant to be documented is given a dontdocument.qdoc file to tell qdoc that these classes are not meant to be documentented. Then qdoc will not print warnings about missing \class comments for these classes and structs. Change-Id: I9195f0b546032e1c7642c9da34d85a0a4a9bfb08 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | QSharedNetworkSessionManager: clean upMarc Mutz2019-05-282-23/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under no circumstance must Qt code define a non-public qHash() overload of a public Qt type. If you can't provide a public qHash() for the type, you can't use QHash. Period. This is because if we don't provide a qHash() function, the user will have to provide one, and then we have an ODR violation, iow: UB. So, port away from QHash and qHash and use std::unordered_map, which allows to pass a custom hash function - just what we needed. Also fix other issues of the code: - Use a function object as the deleter of the QSharedPointer, to allow inlining the function call. - Avoid double lookup in case of a cache miss. - Don't use direct initialization syntax for pointer variables. That's just ... weird. Change-Id: Ica8bff728c1bd1cbb2fb43aa03a99bcb7ac2f7cc Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | | Construct from an array instead of assigning just past a string's endEdward Welbourne2019-05-281-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assigning past the end used to be supported, but isn't a good way to do the job. Exposed by a qtxmlpatterns test that exercised this code, which gets a warning thanks to Giuseppe's recent changes to QCharRef. Task-number: QTBUG-76070 Change-Id: Ic254c7ffce60e3b2aafce76ab03ea5db8c68fafc Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | | Use QStringView overloads of <QDate/Time>::toString()Marc Mutz2019-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are no QLatin1String overloads, so using QLatin1String as the format string produced a temporary QString. Use QStringViewLiteral instead. Change-Id: I682eb8cfaa98fdcfb491edd290460db636a98a9f Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | | Use QtPrivate::QHashCombine in qHash(QSslError)Marc Mutz2019-05-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's the same operations as boost::hash_combine, but without explicit magic numbers. Change-Id: Id65b6f6b7be3070e4ec349ed0cc062af473a95b3 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | | | Fix network build without feature.networkproxyTasuku Suzuki2019-05-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I832db8e9e13b93d7613bdf890fa6c16be78b3b28 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>