summaryrefslogtreecommitdiffstats
path: root/src/network/access
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Use HTTP2WasUsedAttribute for HTTP2Timur Pocheptsov2017-03-293-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were always setting SpdyWasUsedAttribute for SPDY/HTTP/2/HTTP/1.1 (true/false) which is confusing. Now if HTTP2AllowedAttribute was set to true on a request, we set HTTP2WasUsedAttribute. Otherwise, as we did before, we're setting SpdyWasUsedAttribute. Change-Id: I0c44cfb5469fef0c12719baa951197ee2accee4a Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Use case-insensitive compare moreAnton Kudryavtsev2017-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | ... to avoid allocations. Change-Id: I5993633d1509495ff6ce3a11274a53504aac7c5e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-283-28/+59
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/examples.pro tests/auto/corelib/tools/qchar/tst_qchar.cpp tests/auto/other/qaccessibility/accessiblewidgets.h Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
| * | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-213-28/+59
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/eglfs-plugin.pro Change-Id: Id76cdbb41b7758572a3b8ea4dcb40d49bac968db
| | * QHttpNetworkConnection: fall back gracefully to HTTP/1.1Timur Pocheptsov2017-03-083-28/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both SPDY and HTTP/2 work with a single qhttpnetworkchannel (and this means one socket per qhttpnetworkconnection). Normally, HTTP/1.1 connection is using up to 6 channels/sockets though. At the moment a failure to negotiate SPDY/HTTP/2 leaves us with a downgraded HTTP/1.1 connection (with only one channel vs. default 6). Since we initialize channels (and establish connections) in a 'lazy' manner it's ok to pre-allocate all 6 channels and then either use 1 (if SPDY/HTTP/2 indeed was negotiated) or switch back to 6 in case of failure. Change-Id: Ia6c3061463c4d634aaed05ce0dde47bfb5e24dd8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-143-6/+25
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qpushbutton.cpp Change-Id: I615de00e6e64540c50f658d4d8ab3e002d701a81
| * | QHstsPolicy: Replace bool with QFlagsTimur Pocheptsov2017-03-083-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As pointed out in the previous code-review: Replace a bool ctor parameter with QFlags<enum> to conform to Qt API Design Principles (Boolean Parameter Trap). Since the bool with its many unwanted implicit conversions is gone from the ctor parameter list now, drop the explicit keyword again. It was requested because of the boolean parameter in the first place. Change-Id: Ibaf287a6a3e38c22f033fd5d9e024c54f30a1fd4 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-0214-137/+132
|\| | | | | | | | | | | Change-Id: I84097f8e7b3b2128028bd7693c913d6968b82bfe
| * | HSTS policy - fix APITimur Pocheptsov2017-02-242-27/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API-review follow-up: 1. make a ctor explicit 2. add swap member-function 3. make move-assignment inlined 4. make comparison operators non-members 5. make d_ptr QSharedDataPointer (and private implementation - QSharedData). Change-Id: I3257ca03cccd0f1254c9b95461752911359352a5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | QNAM - rename Redirect*s*Nnn to RedirectNnnTimur Pocheptsov2017-02-239-68/+68
| | | | | | | | | | | | | | | | | | | | | As discussed in API code-review. Change-Id: Ib54cfd43d5bef8c7d99a7fb3b09a9d16dc1dc1dc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | HSTS - API/naming fixesTimur Pocheptsov2017-02-236-42/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As recommended in API review: use 'is...STS...Enabled' and 'set...STS..Enabled(bool)' function names instead of stsEnabled and separate enable/disable functions. Replace QList with QVector in the public API. Change-Id: I1526124c830450058967ebc192d27575cc89292d Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Fix proxy when changing only the passwordCédric Cabessa2017-02-241-0/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHttpThreadDelegate doesn't take into account the password to compute the key of the networkconnection hash. So if only the password for a proxy has changed, the wrong data gets used for the connection. This patch simply adds proxy->password() to the key. Here are the steps to reproduce the bug: * Use an authentified proxy and provide the correct username but a wrong password ``` QNetworkAccessManager networkAccessManager; QNetworkProxy proxy(QNetworkProxy::HttpProxy, PROXY_HOST, PROXY_PORT, "goodusername", "badpassword"); networkAccessManager.setProxy(proxy); `` * As expected, the reply returns ProxyAuthenticationRequiredError * Using the same QNetworkAccessManager, setup a new proxy with the correct credential: ``` QNetworkProxy proxy(QNetworkProxy::HttpProxy, PROXY_HOST, PROXY_PORT, "goodusername", "goodpassword"); networkAccessManager.setProxy(proxy); ``` * The reply still returns ProxyAuthenticationRequiredError [ChangeLog][QtNetwork] Fix proxy-authentication issue, after a wrong password has been used, when supplying the right password. Change-Id: Id3b5a2ce71fda81780f3ef2568a73d0022b38815 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Use static initialization for QBasicAtomicsMarc Mutz2017-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | A default-constructed static QBasicAtomicInt at function scope will be dynamically initialized. It will still be zero-initialized, but at least GCC adds guard variables for such objects. When using aggregate initialization, the guard disappears. Amends 04d6495bf773a6bb0d4fa6980df22d3b81a605b0. Change-Id: Id9335cffdd43094cafb231fdde2523d013abe1d6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make some atomic counters zero-basedMarc Mutz2017-02-151-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A variable of static storage duration that is not zero-initialized takes up space in the DATA segment of the executable. By making the counters start at zero and adding the initial value afterwards, we move them over to the BSS segment, which does not take up space in the executable. Wrap atomics used across function boundaries into small functions, to avoid code duplication and to increase readability. Change-Id: Ida6ed316ecb8fe20da62a9577161349e14de5aed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix some qdoc warnings for 5.9Friedemann Kleint2017-02-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings: src/network/access/qhstspolicy.cpp:158: warning: Undocumented parameter 'expiry' in QHstsPolicy::setExpiry() src/network/access/qhstspolicy.cpp:178: warning: Undocumented parameter 'include' in QHstsPolicy::setIncludesSubDomains() src/network/access/qhstspolicy.cpp:178: warning: Can't link to 'includeSubdomains()' src/widgets/kernel/qsizepolicy.cpp:402: warning: Cannot find 'transposed(...)' in '\fn' QSizePolicy QSizePolicy::transposed() src/widgets/kernel/qsizepolicy.h:165: warning: No documentation for 'QSizePolicy::transposed()' src/widgets/util/qundostack.cpp:164: warning: Undocumented parameter 'obsolete' in QUndoCommand::setObsolete() Fix the signature of the QStaticByteArrayMatcher member functions. The warnings src/corelib/tools/qbytearraymatcher.cpp:372: warning: Cannot find 'indexIn(...)' in '\fn' QStaticByteArrayMatcher::indexIn(const char *haystack, int hlen, int from) src/corelib/tools/qbytearraymatcher.cpp:382: warning: Cannot find 'indexIn(...)' in '\fn' QStaticByteArrayMatcher::indexIn(const QByteArray &haystack, int from) remain, though since apparently qdoc is thrown off by the constructor. Change-Id: I157359a881ff3fbc80d2eeb52dd5c27249d009c4 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Revert "Network (HTTPS): prevent recursion among ->close() methods"Paolo Angelelli2017-01-261-23/+21
| | | | | | | | | | | | | | | | | | | | This reverts commit 556b2ee7737b1dfdbc5223e9a1230b5df6843a01. The reason for this is that this change appears to stop QtLocation from fetching tiles. Task-number: QTBUG-58303 Change-Id: I64cd3a17d24f10652bb68cee0267cc7ff1f9d479 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Make our redirect policies STS-awareTimur Pocheptsov2017-01-262-8/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the way we ensure NoLessSafeRedirectsPolicy and also the way we create actual redirect requests: https->http redirect is now reported as InsecureRedirectError (under NoLessSafeRedirectsPolicy) only if STS is disabled or we were redirected to a host whithout Strict Transport Security policy. Otherwise, we replace 'http' scheme with 'https' and explicitly set port 80 with port 443 as defined by HTTP Strict Transport Security policy. This scheme/port replacement will affect both NoLessSafeRedirectsPolicy and UserVerifiedRedirectsPolicy (SameOriginRedirectsPolicy does not allow any scheme change and we continue to report such redirects as InsecureRedirectError). Change-Id: Ib370b830e5fb6a0fec503d6fa3a0dec771c4b741 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/devLiang Qi2017-01-261-1/+1
|\ \
| * | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2017-01-251-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/common/msvc-desktop.conf mkspecs/common/msvc-version.conf mkspecs/common/winrt_winphone/qmake.conf mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/qt.prf mkspecs/features/uikit/default_post.prf mkspecs/features/winrt/default_pre.prf mkspecs/winphone-arm-msvc2013/qmake.conf mkspecs/winphone-x86-msvc2013/qmake.conf mkspecs/winrt-arm-msvc2013/qmake.conf mkspecs/winrt-x64-msvc2013/qmake.conf mkspecs/winrt-x86-msvc2013/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/gui/kernel/qwindowsysteminterface.cpp src/network/kernel/qhostaddress.cpp src/plugins/platforms/mirclient/qmirclientplugin.cpp src/plugins/platforms/mirclient/qmirclientplugin.h src/widgets/util/qsystemtrayicon.cpp tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp tools/configure/Makefile.mingw tools/configure/Makefile.win32 Done-with: Jake Petroules <jake.petroules@qt.io> Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
| | * QtNetwork: fix GCC 7 warningsMarc Mutz2017-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 7 warns about implicit fall-throughs now. Fix by adding the missing Q_FALLTHROUGH(), and, in one case, by moving the existing suppressant into the correct position. Change-Id: I7383f47e690b6334ef69c9df745c2205247ca7d0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Avoid detaching temporary objectsAlexander Volkov2017-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found with clazy [detaching-temporary]: - don't call QList::first() on temporary - don't call QString::operator[]() on temporary - don't call QByteArray::data() on temporary Change-Id: I390962ef6020e4fcb0b0e447a63eed1e314d18a4 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* | | Refactor HSTS cache implementationTimur Pocheptsov2017-01-247-154/+457
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original monstrosity is not needed at all. It was born only to implement RFC6797's description of the host matching algorithm (starting from superdomains and moving to subdomains). Actually, it does not really matter how we find known host - it can be a congruent match first instead, and then we proceed with superdomains. This way I can use QMap and my tests so far show it actually works faster (both insertion and lookup), also the code is cleaner now. Also, introduce the new class QHstsPolicy that essentially allows to mark a host as known host and conveniently encapsulates host name/expiration date/ subdomains policy. Add a public API providing access to HSTS policies, so that client code can pre-set or read back discovered known hosts (to implement persistent HSTS storage, for example). We support server-driven HSTS - this means client code is allowed to provide policies as hints to QNetworkAccessManager, but these policies can be overridden by HTTP responses with 'Strict-Transport-Security' headers. Change-Id: I64d250b6dc78bcb01003fadeded5302471d1389e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Fix uninitialized memberJesus Fernandez2017-01-231-2/+1
| | | | | | | | | | | | | | | | | | Non-static class member "domainIndex" was not initialized in the constructor nor in any functions that it calls. Change-Id: Ie72d997a1f0cf2f3499aac6f7714c7a9d3c7d525 Coverity-Id: 174997 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Add HTTP strict tranport security support to QNAMTimur Pocheptsov2017-01-208-3/+802
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HTTP Strict Transport Security (HSTS) is a web security policy that allows a web server to declare that user agents should only interact with it using secure HTTPS connections. HSTS is described by RFC6797. This patch introduces a new API in Network Access Manager to enable this policy or disable it (default - STS is disabled). We also implement QHstsCache which caches known HTTS hosts, does host name lookup and domain name matching; QHstsHeaderParser to parse HSTS headers with HSTS policies. A new autotest added to test the caching, host name matching and headers parsing. [ChangeLog][QtNetwork] Added HTTP Strict Transport Security to QNAM Task-number: QTPM-238 Change-Id: Iabb5920344bf204a0d3036284f0d60675c29315c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Add a user-controlled auto-redirect policyTimur Pocheptsov2017-01-197-6/+48
| | | | | | | | | | | | | | | | | | | | | | | | With this new policy, after emitting 'redirected', QNetworkReplyHttpImpl waits for client code to decide if QNAM should follow this redirect or not. The client can either allow this redirect by emitting 'redirectAllowed' or abort the reply. Task-number: QTPM-236 Change-Id: Ia04619f6bd1f0caa477833ae859b24033027b2e1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | HTTP/2 - fix SETTINGS frame validationTimur Pocheptsov2017-01-171-1/+1
| | | | | | | | | | | | | | | | | | When testing peer's SETTINGS frames, namely MAX_CONCURRENT_STREAM identifier, we should test against upper limit _new_ values from these frames, not our own pre-set maxConcurrentStreams (it apparently was a typo). Change-Id: I2036e45b0f931914f75ca99142192e2f9385623e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add redirects policy to QNetworkAccessManagerTimur Pocheptsov2017-01-179-32/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes it possible to enable/disable redirects on QNAM level (before it was per-request only). This policy would be applied to all subsequent requests* created by QNAM. The policies we support at the moment: a. Manual - that's what we always had - it's up to a user to handle redirects. b. NoLessSafeRedirectsPolicy - we allow http->http, http->https and https->https redirects, but no protocol 'downgrade' (no https->http redirects). c. SameOriginPolicy - we check that protocol/host/port are the same. Updated tst_qnetworkreply. *We previously were enabling redirect for each request, by setting FollowRedirectsAttribute on QNetworkRequest object. For backward compatibility this attribute has a higher priority (if set) than QNAM's policy (and it will work as NoLessSafeRedirectsPolicy). [ChangeLog][QtNetwork] Added redirects policy to QNAM Task-number: QTPM-239 Task-number: QTPM-237 Change-Id: I493d1728254b71b61b5504937e8e01dca5953527 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Network (HTTPS): prevent recursion among ->close() methodsEdward Welbourne2017-01-171-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We observed a stack-trace in which, while handling an error, QHttpNetworkConnectionChannel::close()'s call to its socket->close() triggered (when the socket was a QSslSocket) a flush() which asked its backend to transmit() which tripped over the original error, which duly triggered endless recursion. Transiently clear the socket member, during its ->close(), to prevent this; do the same in abort(), to preserve its structural correspondence to close(). Restructure both so that any recursive call's setting of state is overwritten by the top-level call's, while this still uses the prior socket state (not the state after close() or abort() and any recursion) to determine final state. Task-number: QTBUG-56476 Change-Id: If69e97f7a77a729bf2338ed14214c65aa95f8b05 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Introduce QNetworkAccessManager::clearConnectionCache()Sebastian Lösch2017-01-163-4/+26
| | | | | | | | | | | | | | | | | | Sometimes it is desirable to use a new connection but keep already entered user credentials for usability reasons. This is now possible by clearing the connection cache (but keeping the authentication cache). Change-Id: I2f5f64836ce19f81c8525701783a3da823dd468e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | qhttp2protocolhandler - handle proxies correctlyTimur Pocheptsov2017-01-111-3/+12
| | | | | | | | | | | | | | | | For requests through proxy, the Request-URI (':path' header) must contain full url. Change-Id: Ibecdf4556b0cecf731da0f89b241bb86a07fa3ad Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | HTTP/2 - fix handling of GOAWAY frameTimur Pocheptsov2017-01-112-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix the case when we erroneously handled stream ID == 0 in a GOAWAY frame as an invalid stream ID. - _q_receivedReply: convert do{}while() loop into to while(){} to prevent it from handling any frames after GOAWAY frame received and all active frame finished. - sendRequest - if we received GOAWAY, also clear spdyRequests in the connection channel, otherwise it keeps re-trying to send requests! - Http network connection channel never resets a protocolHandler in _q_encrypted/ _q_connected, which is BAD for HTTP/2, since HTTP/2 has unique per-connection compression context and must be reset - now we recreate the protocol handler in _q_encrypted or _q_connected (https/http). - Update autotest. Task-number: QTBUG-57600 Change-Id: Ib864ce52287bab23334ff43a83ba4b0b7cb52c60 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Set the error for HTTP code 403 to be a ContentAccessDenied errorAndy Shaw2016-12-202-2/+2
| | | | | | | | | | Change-Id: I1404bba998cdd7d426c8491908c53edcd3ebc7fb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-161-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure configure.pri examples/widgets/painting/fontsampler/mainwindow.cpp examples/widgets/painting/fontsampler/mainwindow.h mkspecs/features/moc.prf src/corelib/global/qglobal.h src/gui/text/qtextdocument.cpp Change-Id: Ica65512e00871695190a14ccea5c275b0165f787
| * Merge remote-tracking branch 'origin/5.7' into 5.8.0Liang Qi2016-12-081-0/+1
| |\ | | | | | | | | | Change-Id: I576187a9905802c177ae483e6c29d0f55cf7034d
| | * ~QHttpNetworkConnectionPrivate - disconnect from socket's signalsTimur Pocheptsov2016-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have a 'channel' object connected to a socket with Qt::DirectConnection. QHttpNetworkConnectionPrivate in its dtor (note, it's a private object destroyed after its 'q' - QHttpNetworkConnection - was destroyed) calls socket->close() and this can end up in socket setting an error and emitting (for example, in QSslSocket::transmit). The slot (QHttpNetworkConnectionChannel::_q_error) will access the now-dead/non-existing connection then. So disconnect the channel from the socket early, before closing the socket. Task-number: QTBUG-54167 Change-Id: I3ed4ba4b00650c3a39e5c1f33aa786e47bfbbc57 Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-131-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/Makefile.unix.macos qmake/Makefile.unix.win32 qmake/generators/win32/msvc_vcproj.cpp src/3rdparty/pcre/qt_attribution.json src/corelib/io/qsettings.cpp src/corelib/kernel/qdeadlinetimer.cpp src/platformsupport/kmsconvenience/qkmsdevice.cpp src/platformsupport/kmsconvenience/qkmsdevice_p.h src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h tests/manual/qstorageinfo/printvolumes.cpp tools/configure/configureapp.cpp Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
| * | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-251-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qcoregraphics.mm src/gui/painting/qcoregraphics_p.h src/plugins/platforms/cocoa/qcocoahelpers.h src/plugins/platforms/cocoa/qcocoahelpers.mm Change-Id: Ibe5efcae73526b3d3931ed22730b13d372dcf54e
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-251-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf src/corelib/tools/qdatetimeparser_p.h Change-Id: I5382cee3ddb33107dc61ee20f7a9188c4a68a882
| | | * _q_networkSessionClosed - disconnect the correct objectTimur Pocheptsov2016-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have: ... auto networkSession = getNetworkSession(); ... getNetworkSession() can return non-null pointer even if networkSessionStrongRef is null: ... if (networkSessionStrongRef) return networkSessionStrongRef; return networkSessionWeakRef.toStrongRef(); .... We check the result: if (networkSession) { // here we disconnect signals } But we should use the same networkSession when disconnecting, not start using networkSessionStrongRef suddenly, since it can be null. Task-number: QTBUG-57110 Change-Id: I96babb42c2182e741e6eabaf7d1abb88869861f4 Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-171-0/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/mac/default_post.prf mkspecs/features/uikit/default_post.prf Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
| * | | Unbreak a couple of configurationsLars Knoll2016-11-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix compilation with topleveldomain, textodfwriter and cssparser features disabled. Change-Id: I3f061fb09eef36cd640256a46cf77dde85a54d3d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-028-103/+402
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blacklist tst_QMenuBar::taskQTBUG46812_doNotLeaveMenubarHighlighted() on macOS. Conflicts: mkspecs/features/mac/default_post.prf mkspecs/features/mac/sdk.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/sdk.prf src/angle/src/libEGL/libEGL.pro src/platformsupport/fontdatabases/fontdatabases.pro src/platformsupport/platformsupport.pro src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro tests/auto/widgets/widgets/qmenubar/BLACKLIST tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp Task-number: QTBUG-56853 Change-Id: If58785210feee3550892fc7768cce90e75a2416c
| * | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-011-4/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/win/msvc_version.cpp configure.pri mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf src/corelib/io/qsettings_mac.cpp src/corelib/json/qjsondocument.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.h src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro src/plugins/platforms/ios/qiosintegration.h src/plugins/platforms/minimalegl/qminimaleglintegration.cpp tests/auto/gui/painting/qpainter/tst_qpainter.cpp tools/configure/environment.cpp Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-221-4/+2
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/qeglfshooks.cpp Change-Id: I483f0dbd876943b184803f0fe65a0c686ad75db2
| | | * QNetworkReplyHttpImpl: Fix UB (member call) in destruction sequenceMarc Mutz2016-10-201-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by UBSan: qnetworkreplyhttpimpl.cpp:457:29: runtime error: member call on address 0x602000009cf0 which does not point to an object of type 'QNetworkReplyHttpImpl' 0x602000009cf0: note: object is of type 'QObject' 1e 00 80 18 20 e0 bb 12 54 7f 00 00 00 f2 00 00 70 61 00 00 02 00 00 00 ff ff ff 06 08 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'QObject' #0 0x7f541461b71b in QNetworkReplyHttpImplPrivate::~QNetworkReplyHttpImplPrivate() qnetworkreplyhttpimpl.cpp:457 #1 0x7f541461b7f0 in QNetworkReplyHttpImplPrivate::~QNetworkReplyHttpImplPrivate() qnetworkreplyhttpimpl.cpp:458 #2 0x7f540f26df1a in QScopedPointerDeleter<QObjectData>::cleanup(QObjectData*) qscopedpointer.h:54 #3 0x7f540f26df1a in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer() qscopedpointer.h:101 #4 0x7f540f26df1a in QObject::~QObject() qobject.cpp:940 #5 0x7f540e915f6e in QIODevice::~QIODevice() qiodevice.cpp:416 #6 0x7f5414599bae in QNetworkReply::~QNetworkReply() qnetworkreply.cpp:444 #7 0x7f54145e6f5e in QNetworkReplyHttpImpl::~QNetworkReplyHttpImpl() qnetworkreplyhttpimpl.cpp:239 #8 0x7f54145e6f5e in QNetworkReplyHttpImpl::~QNetworkReplyHttpImpl() qnetworkreplyhttpimpl.cpp:242 #9 0x7f54144b3539 in void qDeleteAll<QList<QNetworkReply*>::const_iterator>(QList<QNetworkReply*>::const_iterator, QList<QNetworkReply*>::const_iterator) qalgorithms.h:317 #10 0x7f54144b3539 in void qDeleteAll<QList<QNetworkReply*> >(QList<QNetworkReply*> const&) qalgorithms.h:325 #11 0x7f54144b3539 in QNetworkAccessManager::~QNetworkAccessManager() qnetworkaccessmanager.cpp:496 Fix by moving the emission of the QNetworkReplyHttpImpl::abortHttpRequest() signal from ~Private, when the public object is merely a QObject anymore, to ~QNetworkReplyHttpImpl(), when the public class is still itself. Change-Id: Ifb3b19f6d180452bdf3fc26f54629ef780a5d9d9 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
| * | | HTTP/2 - fix the handling of PUSH_PROMISETimur Pocheptsov2016-10-217-99/+400
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HTTP/2 allows a server to pre-emptively send (or "push") responses (along with corresponding "promised" requests) to a client in association with a previous client-initiated request. This can be useful when the server knows the client will need to have those responses available in order to fully process the response to the original request. Server push is semantically equivalent to a server responding to a request; however, in this case, that request is also sent by the server, as a PUSH_PROMISE frame. The PUSH_PROMISE frame includes a header block that contains a complete set of request header fields that the server attributes to the request. After sending the PUSH_PROMISE frame, the server can begin delivering the pushed response as a response on a server-initiated stream that uses the promised stream identifier. This patch: - fixes the HPACK decompression of PUSH_PROMISE frames; - allows a user to enable PUSH_PROMISE; - processes and caches pushed data for promised streams; - updates auto-test - emulates a simple PUSH_PROMISE scenario. Change-Id: Ic4850863a5e3895320baac3871a723fc091b4aca Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-134-7/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakeevaluator.cpp (cherry picked from commit 1af6dc2c8fb4d91400fddc5050166f972ae57c9a in qttools) src/corelib/kernel/qcore_mac_objc.mm src/gui/painting/qcolor.h src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: I5b3ec468a5a9a73911b528d3d24ff8e19f339f31
| * | | Add configure feature for QUrl::topLevelDomainLars Knoll2016-10-111-1/+10
| | | | | | | | | | | | | | | | | | | | Change-Id: I237af8c60a9572c707e7004c9a284dd6cd3306ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-113-6/+13
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qpixmap.cpp src/widgets/kernel/qformlayout.cpp Change-Id: I8a8391a202adf7f18464a22ddf0a6c4974eab692
| | * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-083-6/+13
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttpnetworkconnection.cpp src/network/access/qhttpnetworkconnection_p.h Change-Id: I11f8641ef482efa8cee1b79977d19cc3182814b4