summaryrefslogtreecommitdiffstats
path: root/src/network/access
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-282-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsettings.cpp src/corelib/kernel/qvariant.cpp src/corelib/serialization/qjsoncbor.cpp src/corelib/serialization/qjsonvalue.cpp src/corelib/tools/tools.pri src/gui/image/qimage.cpp src/gui/kernel/qguivariant.cpp src/widgets/kernel/qshortcut.cpp tests/auto/tools/moc/allmocs_baseline_in.json tests/auto/tools/moc/tst_moc.cpp src/opengl/qglframebufferobject.cpp Done-With: Edward Welbourne <edward.welbourne@qt.io> Done-With: Leander Beernaert <leander.beernaert@qt.io> Change-Id: Ie7f5fa646c607fe70c314bf7195f7578ded1d271
| * Doc/QtBase: replace some 0 with \nullptrChristian Ehrlicher2020-01-261-1/+1
| | | | | | | | | | | | | | | | | | Replace some 'is 0' or 'are 0' where 0 referes to a nullptr with 'is \nullptr' and 'are \nullptr' Change-Id: Ida9af2971924377efe2f49f435d79e109de2bdf4 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * QNAM: Avoid compile error if QT_NO_SSLUlf Hermann2020-01-231-0/+2
| | | | | | | | | | Change-Id: Iff8a0893cc7aca172c5b3f207a359762b270ed76 Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-193-17/+12
|\| | | | | | | Change-Id: I68702c9f9680772d332b5bb777ddd2663168abd5
| * QNetworkAccessManager: Avoid unnecessary calls to sender()Mårten Nordheim2020-01-163-17/+12
| | | | | | | | | | | | | | | | | | As it searches through all connections, of which we have multiple for each network reply. Fixes: QTBUG-81336 Change-Id: Iba28278edae5f254bf884f427e0944d348b47d03 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-152-3/+27
|\| | | | | | | | | | | | | | | Conflicts: tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/network/access/spdy/tst_spdy.cpp Change-Id: I3196c5f7b34f2ffc9ef1e690d02d5b9bb3270a74
| * Uncomment erroneously commented 'error'Timur Pocheptsov2020-01-142-3/+1
| | | | | | | | | | | | | | It was meant to be deprecated in 5.15, not deleted (yet). Change-Id: I6e3772d6c1d12dc060c1f540e55e756566db22e6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * QNetworkReply: deprecate the 'error' getterTimur Pocheptsov2020-01-132-3/+29
| | | | | | | | | | | | | | | | | | | | To disambiguate &QNetworkReply::error expression. [ChangeLog][Deprecation Notice] QNetworkReply::error() (the getter) was deprecated; superseded by networkError(). Task-number: QTBUG-80369 Change-Id: I545f963788bce0800c9e0f0c94d5f1029946effe Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-132-3/+3
|\| | | | | | | | | | | | | Conflicts: tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp Change-Id: I4d3041fa291a918c774ffa5eb5c8792a0966451d
| * QAbstractSocket: deprecate 'error' member-functionTimur Pocheptsov2020-01-102-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The one that is a getter for the last error found. This is to disambiguate the expression '&QAbstractSocket::error'. Introduce a new member-function socketError as a replacement. [ChangeLog][Deprecation Notice] QAbstractSocket::error() (the getter) is deprecated; superseded by socketError(). Task-number: QTBUG-80369 Change-Id: Ia2e3d108657aaa7929ab0810babe2ede309740ba Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * Replace usages of QVariant::value by qvariant_castOlivier Goffart2019-12-151-1/+1
| | | | | | | | | | | | | | This is done automatically with a clazy check Change-Id: I3b59511d3d36d416c8eda74858ead611d327b116 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-0921-105/+1409
|\| | | | | | | Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
| * Tidy nullptr usageAllan Sandfeld Jensen2019-12-0621-112/+112
| | | | | | | | | | | | | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-257-10/+13
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
| * Make transferTimeout getters constVille Voutilainen2019-11-224-4/+4
| | | | | | | | | | Change-Id: I84c7e830ed9cf58c05ff06052c3df3beb74bb723 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-5/+5
| | | | | | | | | | | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Port QThread::wait() to QDeadlineTimerChristian Ehrlicher2019-11-132-2/+2
| | | | | | | | | | | | | | | | | | So we are in sync with QWaitCondition::wait(). Task-number: QTBUG-64266 Change-Id: I1d7487786513241cedd35d202c4ddee4937b08ec Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-052-4/+7
| |\ | | | | | | | | | Change-Id: Icd98de8592828c60cfea3d69f9c7ae2711b9f059
| | * QNetworkReply: Fix SSL configuration handlingFriedemann Kleint2019-11-012-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QT_CONFIG consistently and enclose sslConfigurationImplementation(), setSslConfigurationImplementation() and ignoreSslErrorsImplementation() within QT_CONFIG as well. This enables a build of Qt for Python with -no-feature-ssl. Change-Id: Ia699293ab73a5dc86d8dcf95aa5f6369334d36a2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-013-0/+45
|\| | | | | | | | | | | Change-Id: I68a6ed3184e62fa89c47c564bb01002c0918d0fd
| * | Add a transfer timeout at QNAM level as wellVille Voutilainen2019-10-313-0/+45
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-3443 Change-Id: Idc4d3c9b1ace69bd8b6456506778116a3e8a5490 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-304-3/+96
|\| | | | | | | | | | | Change-Id: I7f11733bda960196a96c6452bdabeb7072a8430d
| * | Add a timeout for transfersVille Voutilainen2019-10-284-3/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a transfer timeout is set for QNetworkRequest, downloads and uploads are aborted if the timeout expires and bytes haven't been transmitted in either direction. Task-number: QTBUG-3443 Change-Id: I702d223d673f0c6612343dc9d053815acfcb61b8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-061-9/+6
|\| | | | | | | | | | | Change-Id: Ife31dad3c8dc43c5ff4d266e6d646230c5d20a50
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-051-9/+6
| |\| | | | | | | | | | Change-Id: I554a2762890391b3b6013c8b82211a8386a4ced8
| | * Convert a few sizeof(array)/sizeof(element0) fors to range forsAlbert Astals Cid2019-10-041-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | Increases readability Change-Id: I81ea915517fd2cd6bc2780f37ba8d8097c63f44b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Get rid of QList forward declarationsLars Knoll2019-10-043-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Include qcontainerfwd.h instead where required. This prepares for unifying QList and QVector. Change-Id: I6c85e2bdd44fb41aedd884b0d551f682760df5b5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2019-10-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qnetworkaccessmanager.cpp src/network/access/qnetworkreplyhttpimpl.cpp Change-Id: I059be651604623616fd31e8616be8ae61b4f8883
| * | Move away from recently deprecated HTTP2 attributesMårten Nordheim2019-10-013-6/+6
| | | | | | | | | | | | | | | | | | | | | Amends f59f67287fa17e8d4edf6a231c010f768d1b76e8 Change-Id: I74045c558e9d20f9f45f150a91f181a04e9b8c69 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Retire SPDY protocol implementation (Qt6)Timur Pocheptsov2019-09-2518-1734/+81
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it was superseded by HTTP/2. Bye, Speedy. Since it's Qt 6, we also fix the attribute's enumerator to fit our coding convention with HTTP2AllowedAttribute becoming Http2AllowedAttribute, and the same for HTTP2WasUsedAttribute. tst_qnetworkreply in 'benchmark' directory of qtbase/tests was updated - we have the logic they tested in preConnectEncrypted in tst_http2 now. Manual qnetworkreply test was updated (instead of SPDY in NPN failure we can use H2, the second test was deleted - again, auto-tested in tst_http2). Change-Id: I559c140c333ddf72664911c6e275b1d0d2b980a9 Task-number: QTBUG-78255 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-09-163-4/+8
|\| | | | | | | Change-Id: Ie24be82ee70bf103c2664de1a42741979262b10c
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-133-4/+8
| |\ | | | | | | | | | Change-Id: Idcf8fc1d79bcd84b494d7f43308e6fe82d60e1a4
| | * QHttpThreadDelegate - remove unneeded codeTimur Pocheptsov2019-09-121-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found while cleaning up SPDY remains: I've noticed that for H2 case I never check if incomingSslConfiguration is nullptr or not, but the code several lines below - does it, which looks kind of moronic. This configuration is initialized when the delegate is created, so no need to have this if-statement. Instead, assert, making this behavior a requirement. Change-Id: I90fb84337be925a3288252aa2491b4c23d6c6cbb Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * Add a missing ConnectionTypeHttp2Direct in several if statementsTimur Pocheptsov2019-09-112-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Found while preparing SPDY retirement. Change-Id: I30f923fdeb0f6f0b5e808a3e7b7d81ddb9c4ef12 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QNetworkRequest: deprecate SPDY-related attributes for 5.15Timur Pocheptsov2019-09-122-6/+19
|/ / | | | | | | | | | | | | | | | | | | | | | | As they will be removed in Qt 6. Also, two H2-related attributes will be replaced by the new ones with their names corrected. Docs updated. Change-Id: I14eeb5fc077a101ca5d177c9369a088bdcb8297e Task-number: QTBUG-78255 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Fix qdoc warningsFriedemann Kleint2019-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | src/corelib/global/qnamespace.qdoc:3279: (qdoc) warning: Can't link to 'QGuiApplication::setHighDdpiScaleFactorRoundingPolicy()' src/corelib/time/qislamiccivilcalendar.cpp:49: (qdoc) warning: Can't link to 'QJijriCalendar' src/network/ssl/qsslsocket.cpp:1510: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()' src/network/access/qhttp2configuration.cpp:49: (qdoc) warning: '\brief' statement does not end with a full stop. src/gui/text/qtextformat.cpp:532: (qdoc) warning: Undocumented enum item 'TableBorderCollapse' in QTextFormat::Property src/gui/text/qtextdocument.cpp:2066: (qdoc) warning: Undocumented enum item 'UnknownResource' in QTextDocument::ResourceType src/gui/kernel/qguiapplication.cpp:3500: (qdoc) warning: Undocumented parameter 'policy' in QGuiApplication::setHighDpiScaleFactorRoundingPolicy() Change-Id: I3573ef98cf9b58d16525c356270fe009fdffcf45 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Friedemann Kleint2019-09-091-2/+5
|\| | | | | | | | | | | | | Conflicts: tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-083-3/+44
| |\ | | | | | | | | | Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
| | * A follow-up to a recent fix in QHttpNetworkConnectionChannelTimur Pocheptsov2019-09-063-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While working with HTTP/2, we are not re-sending failed requests. In case we receive a GOAWAY frame, we properly handle it by processing some active streams if possible, and aborting streams that will not proceed further with ContentResendError. But it's possible that some server failed to send us GOAWAY (for example, it died) or closed the connection not finishing the streams that were still active and valid (ID <= value from GOAWAY frame). Now that we will not re-connect, there is no reason to be quiet about us not progressing - emit RemoteHostClosedError on any remaining active stream/request we cannot process further. Fixes: QTBUG-77852 Change-Id: I4cd68a1c8c103b1fbe36c20a1cc406ab2e20dd12 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 543769666f18f79bd6ebd6119a39834aafc2b0df)
| | * QHttpNetworkConnectionChannel - avoid re-connecting on 'disconnected'Timur Pocheptsov2019-09-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The _q_error slot has a special case for RemoteHostClosedError, where the current channel's state is 'idle' and no request/reply is in progress. The comment states that: "Not actually an error, it is normal for Keep-Alive connections to close after some time if no request is sent on them. No need to error the other replies below. Just bail out here. The _q_disconnected will handle the possibly pipelined replies." _q_disconnected, indeed, takes care about pipelined replies ... calling 'ensureConnected' even if we have 0 replies in pipeline, which makes zero sense to me and results in QNAM endlessly trying to re-connect to the server. Fixes: QTBUG-77852 Change-Id: I6dcb43b36a6d432bc940246a08f65e1ee903fd24 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | A follow-up to a recent fix in QHttpNetworkConnectionChannelTimur Pocheptsov2019-09-053-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While working with HTTP/2, we are not re-sending failed requests. In case we receive a GOAWAY frame, we properly handle it by processing some active streams if possible, and aborting streams that will not proceed further with ContentResendError. But it's possible that some server failed to send us GOAWAY (for example, it died) or closed the connection not finishing the streams that were still active and valid (ID <= value from GOAWAY frame). Now that we will not re-connect, there is no reason to be quiet about us not progressing - emit RemoteHostClosedError on any remaining active stream/request we cannot process further. Fixes: QTBUG-77852 Change-Id: I4cd68a1c8c103b1fbe36c20a1cc406ab2e20dd12 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-042-1/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/codecs/qicucodec.cpp src/dbus/qdbusserver.cpp src/gui/painting/qbezier.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/printsupport/cups/qppdprintdevice.cpp Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-08-311-1/+2
| |\| | | | | | | | | | Change-Id: I9823da32168e99bbece2f8337d0bd4d33e6d634c
| | * Fix invalid end range appended to HTTP requestRainer Keller2019-08-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the end range of a byte range in a HTTP request is skipped the download manager adds 0 it its place when resuming that download. When there is no end range given the value is skipped. Task-number: QTBUG-77867 Change-Id: I52358c94cf56c88217fcc91abb102ed393ac7242 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | wasm: add network object checkingLorn Potter2019-08-231-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | This should help when things are moving fast, and downloads and network object are destroyed before the callbacks finishes. Change-Id: I1f65965bd61efc2e641d03eb071f23e684dd5c44 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Mark QNetworkAccessManager::autoDeleteReplies as constMårten Nordheim2019-08-292-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the API review. Amends cd816d4b6ac4358a92dbda906288ba6d969fc1cd. Change-Id: I3d3e2ef331501fa498545c5eec0e321544165b0d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | HTTP/2: use a non-default MAX_FRAME_SIZETimur Pocheptsov2019-08-221-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And send it in our 'SETTINGS' frame. Add an auto-test for this and (as a bonus) - fix a bug accidentally introduced by the previous change. Task-number: QTBUG-77412 Change-Id: I4277ff47e8d8d3b6b8666fbcd7dc73c827f349c0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Fix a broken buildTimur Pocheptsov2019-08-224-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QHttp2Configuration is using entities (read definitions) from http2, which is only conditionally included in the *.pri file (requires http). So as a result we had linker errors. Fixes: QTBUG-77759 Change-Id: I8b33b0a4802a295f67edad03da3743b24f7ce514 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Remove use of QByteDataBuffer in QNetworkReplyHttpImplMårten Nordheim2019-08-222-41/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's temporarily storing QByteArrays before we copy them directly to QIODevice's internal buffer. We can save the extra work by just push them directly into the buffer. The signal compression is no longer useful performance-wise, but is kept as it will throttle the amount of readyRead emissions the users has to handle. Reorder some of the operations as a result to make it more natural. Change-Id: Ifc0481d56fec42545e95970125d883a5c68d647a Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>