| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
As a prequel to make subsequent diff on the followup
commit (std::variant/union) smaller
Pick-to: 6.7
Task-number: QTBUG-122020
Change-Id: Iaa5dd794dc7a9e33c2c43e459bf5dbd19afb3ba1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows a more performant (O(logN)) lookup for WellKnownHeader
enum (followup commit).
The lookup table is currently crafted manually. It may in future be
generated at compile-time, but this should only be done if new headers
are appended often; we don't want to unnecessarily bloat compilation
time either.
Pick-to: 6.7
Task-number: QTBUG-122020
Change-Id: I0329902b13128f03c358796d5cda7014b1e75057
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-122338
Change-Id: I1e8dfa8a93c45dbe12a628d4d5e79d494d8f6032
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
| |
Change-Id: Iaf9fb31994f1580b2051dbd0b1b8eef2a218aa39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Use QDirListing in the Bootstrap build instead of QDirIterator.
Drive-by changes:
- more const variables
- use emplace_back() instead of append() where appropriate
Change-Id: Ie1f0d03856e557c4bfabfff38a87edc7da86d091
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current logic that we will disable the read notification if we
have any data at all doesn't make sense for users who use the
receiveDatagram functionality, since they will not make any calls
that trigger the read notifier to be re-enabled unless there is a
datagram ready for us to hand back.
Fixes: QTBUG-105871
Pick-to: 6.7 6.6 6.5
Change-Id: I0a1f1f8babb037d923d1124c2603b1cb466cfe18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make QHttp2ProtocolHandler discard all informational (1xx) replies with
the exception of 101.
According to RFC 9110:
"A client MUST be able to parse one or more 1xx responses received
prior to a final response, even if the client does not expect one.
A user agent MAY ignore unexpected 1xx responses."
Fixes: QTBUG-121755
Change-Id: I8b8d578f23d4fbe28929f8c54b3607bcaf85405f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation already marks the class as preliminary, but mark
also with the new macro for that purpose.
Amends: b4c90582a2dee5c534361b3903611206305b03c3
Pick-to: 6.7
Change-Id: Idcf022283bff04f4c4ee260180d3f5cfd0e80034
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The removed includes were needed when there were separate methods
for returning QJsonArray and QJsonObject
Pick-to: 6.7
Change-Id: I5f08c4afd5487c5ca191ee813a3d94c4ae3b0f06
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
qt_ptr_swap is our swap compile-time optimizer. It's faster because it
hardcodes noexcept(true) and std::swap() must calculate it.
Amends 9ba5c7ff6aa42c5701cf950d2137467a2d178833.
Pick-to: 6.7
Change-Id: I1b5a326276bd30638ac9b6dcf597abb5e53ada00
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang's `-Wimplicit-fallthrough` warnings are a little stricter than
gcc's interpretation:
switch (i) {
case 0:
foo();
case 4:
break;
}
While gcc accepts the implicit fallthrough, if the following statement
is a trivial `break`, clang will warn about it.
Pick-to: 6.7
Change-Id: I38e0817f1bc034fbb552aeac21de1516edcbcbb0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
| |
Language and some other improvisations
Fixes: QTBUG-120028
Pick-to: 6.7
Change-Id: Id5a5544abf244de5cff83f0d795732595934bd36
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All file under doc/snippet should be
license as Documentation snippets
and according to QUIP-18 [1]
this is LicenseRef-Qt-Commercial OR BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I76eedfb6b15c4091f726a5652e3530001d7cdaf7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtNetwork][QNetworkRequestFactory] Add QNetworkRequest
attribute support to QNetworkRequestFactory
Fixes: QTBUG-122397
Change-Id: Ie73f104cdad9f8f0721d8ee28f79095bfb04fb3c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When adjusting handling for the special traling HEADERS with PRIORITY
case the actual no-headers case handling was lost.
This patch adds it back.
Now it deals with it being empty due to overflow or just empty headers.
With a real server this should never happen though, since they either
send the required headers or don't send a HEADER frame at all. So, in
theory it will not have caused a problem for users.
Pick-to: 6.7 6.6
Change-Id: Iacbb1183f26cb1f2e7e30ace6456488c4671972d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One more method for STL compatibility.
This one is particularly subtle as it's required by the
`reservable-container` concept:
https://eel.is/c++draft/ranges#range.utility.conv.general-3
Without this concept, ranges::to won't reserve() before copying the
elements (out of a sized range which isn't a common_range).
Implementation notes: there were already a couple of constants denoting
the maximum QByteArray and QString size. Centralize that implementation
in QTypedArrayData, so that QList can use it too.
The maximum allocation size (private constant) needs a even more central
place so that even QVLA can use it. Lacking anything better, I've put it
in qcontainerfwd.h.
Since our containers aren't allocator-aware, I can make max_size() a
static member, and replace the existing constants throughout the rest of
qtbase. (I can't kill them yet as they're used by other submodules.)
[ChangeLog][QtCore][QList] Added max_size().
[ChangeLog][QtCore][QString] Added max_size().
[ChangeLog][QtCore][QByteArray] Added max_size().
[ChangeLog][QtCore][QVarLengthArray] Added max_size().
Change-Id: I176142e31b998f4f787c96333894b8f6653eb70d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the templated executeRequest functions in favor of
qxp::function_ref for readability and type safety.
Pick-to: 6.7
Task-number: QTBUG-122018
Change-Id: I36c07ff5fe6d2025459fe3f7190bc29901a320ce
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "HTTP RFC 9110 5.3 Field Order" states that the values combined
with comma can be followed up by an optional whitespace, and for
consistency recommends "comma SP". This is also what eg. 'MDN Web
Headers' class does.
Fixes: QTBUG-122650
Pick-to: 6.7
Change-Id: I3391c86018090f0b8721929b64a7e3029e98ac85
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I81defa535dcbe81ddcf9be6ff2258cde909861a3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
| |
And move a public slot into private slot, because it was not intended to
be public.
Change-Id: I847fa510c29e5f63aaace0797c81b9874007fda0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
|
|
|
|
|
|
|
|
| |
Change-Id: Ie49a447f0f885290d43a7e4ecb0e0754df0da3e3
Pick-to: 6.7
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
And it should also apply to the promised streams, not separate ID tracking.
https://datatracker.ietf.org/doc/html/rfc9113#section-5.1.1
Change-Id: I6826a39c98f9b6a585200e628533843db731a85b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.7
Change-Id: Ib81058c4613820f15f55388b87433875c11492dd
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Qt 6.7 introduced new std::chrono variants of the transfer
timeout functions. We can now inline the old 'int milliseconds'
functions to reduce the number of DLL entry points when one
isn't needed.
Task-number: QTBUG-122023
Change-Id: I18e0ed424fa4da1dde67c811e0f3744edf24b5f8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Qt 6.7 introduced new std::chrono variants of the transfer
timeout functions. We can now inline the old 'int milliseconds'
functions to reduce the number of DLL entry points when one
isn't needed.
Task-number: QTBUG-122023
Change-Id: Iedcb6d0035bc6c3f03b87de543e9b02937b755e6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
| |
QL1SV is what QNetworkReply::rawHeader() ingests, and also it's what
QHttpHeaders::nameAt() returns.
Pick-to: 6.7
Change-Id: I967416cf6f203fe0f0980ef7eae2de7efc6d5377
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
HTTP header name fields are case-insensitive and the QHttpHeaders class
stores them as lower-case. Therefore the case-insensitive comparisons,
when comparing against a lower-case value, are not needed.
Pick-to: 6.7
Change-Id: I7f38ef16aa7c61103abc4c81c13aebdd6e535dc8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
... as a more computationally effective way, which was not present at
the time those usages were introduced.
As a drive-by add spaces around a binary operator
Task-number: QTBUG-122017
Pick-to: 6.7
Change-Id: I0528c995d1a3c1fe171486c5c313697d1706ee10
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
| |
To enable setting a default priority for all requests to a given site.
Fixes: QTBUG-121669
Change-Id: Icd8a9c59e4afb0432c65f84cc8115ae0c7f85506
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make QNetworkAccessManager to discard all informational (1xx) replies
from HTTP servers with the exception of 101.
According to RFC 9110:
"A client MUST be able to parse one or more 1xx responses received
prior to a final response, even if the client does not expect one.
A user agent MAY ignore unexpected 1xx responses."
Status code 101 is an exception because we use it to upgrade to http2
cleartext when it is enabled.
Fixes: QTBUG-108068
Change-Id: I415ff053180a43f0c7ff1b4b2a60fd114ce08ac9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
|
|
|
|
|
| |
Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
| |
Pick-to: 6.7
Fixes: QTBUG-121859
Change-Id: Ie8d9033a8efe36767f47509afe1a46c788cb13ca
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
| |
Pick-to: 6.7
Change-Id: Ib0d19cabc09d96b3920ade3db4d46b0bb0a6decb
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to QUIP-18 [1], all doc snippet files should be
LicenseRef-Qt-Commercial OR BSD-3-Clause
[1]: https://contribute.qt-project.org/quips/18
Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I6e5bc9d05a5d510cc07a15abafe2257034562510
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QHttpHeaders uses QASV for the header name field, and this aligns
these functions with that. Furthermore having QASV as a parameter
will allow a wider range of string types to be passed as a
parameter (convenience).
Resulted from API-review
Amends: 56bb4ac484adb544925b6d7b58e4fd1d77d49503
Pick-to: 6.7
Change-Id: Iff42b75393b6470a2c34a1913dbe615bf21238db
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of separate QJsonObject and QJsonArray types.
Resulted from API-review
Pick-to: 6.7
Change-Id: I977d692d3709a8c3aa872683ddda54a143c25e67
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This naming should make it clearer that (successful) calls to
readJson(), readBody(), and readText() consume the data received
so far.
Resulted from API-review
Pick-to: 6.7
Change-Id: I09ca9eac598f8fc83eecb72c22431ac35b966bf5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
| |
The only user of the vector passes begin()/end() to BitIStream, which
appears to be 64-bit-clean.
Pick-to: 6.7
Change-Id: I4ad0b9e9547008fecc4c816cc92ff9db4b2066e3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
To accommodate the deduplication and non-owning changes
in previous commit.
Resulted from API-review
Pick-to: 6.7
Change-Id: I61eb071503d6714c7fd42b3fe533698a8dcd2e27
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
To accommodate the deduplication and non-owning changes
in previous commit.
Resulted from API-review
Pick-to: 6.7
Change-Id: Ie1c4e9959c1ba7e8ed2be6607d9f6497ae15af39
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note: documentation will be updated in a follow-up commit
This commit makes QRestReply and QRestAccessManager
classes lighter, non-owning wrappers. Furthermore their
APIs don't duplicate the wrapped QNetwork* APIs.
This makes it easier to use / opt-in to these helpers
in pre-existing applications which are based on
QNetworkAccessManager and QNetworkReply.
Since APIs are no longer duplicated, the QRest
classes are more obviously a convenience _wrapper_,
as opposed to being an alternative vertical stack.
In practice this change consists of:
- QRestAM never instantiates QNetworkAccessManager,
but accepts it via constructor. It does not take
ownership of the QNetworkAccessManager.
- QRestReply accepts QNetworkReply via constructor. It
does not take ownership of the QNetworkReply
- Signals and most duplicated functions are removed
from both QRestAM and QRR.
- QRestReply is no longer a QObject
- Since QRestAM doesn't have much to report anymore,
the debug operator is dropped.
Resulted from API-review
Pick-to: 6.7
Change-Id: Ib62d9cc2df41cac631396a84bb7ec4d2d54b0c8c
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Small rearrangement to make diff on later variant/union commit
more readable
Pick-to: 6.7
Task-number: QTBUG-119002
Change-Id: I3f6120b5dcd324b6493072d2eb58209866fb7dc6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On most platforms EWOULDBLOCK is defined to be equal to EAGAIN.
However on some platforms (like VxWorks) it is not the case.
Because of that, error returned from ::write is not handled properly on
such platform.
Since C++ does not allow duplicate switch labels, check if EWOULDBLOCK
and EAGAIN have different values before adding EWOULDBLOCK to the switch
statement.
Task-number: QTBUG-115777
Pick-to: 6.7
Change-Id: I659cb946f239733f5c57b2000fb4e3d296ed9153
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
|
|
|
| |
A leftover, the class used to have some SSL functionality.
Pick-to: 6.7
Change-Id: Ie987fe086b3e7e5583a9e69dd80e670b131d2832
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... by allowing d == nullptr to mean the empty state.
Needed to add a few guards and specialize QESDP::detach() to be able
to detach from nullptr.
This also gets rid of the partially-formed moved-from state. It's now
guaranteed to be empty.
Pick-to: 6.7
Change-Id: If874d7c69d91eb4babe667ae577f261610d52fd3
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
|
|
|
|
|
|
|
|
|
| |
Use QHttpHeaders::reserve() and QHttpHeaders::isEmpty() instead of
going directly to d->headers. Will help in enabling a nullptr d.
Pick-to: 6.7
Change-Id: Id530f8922b17058ec47530523ed43e08927c3ce3
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Before calling a mutable member function (in this case,
QList::reserve()) on one of the Private members, we need to ensure
exclusive ownership of our external state, otherwise we have a Data
Race, because QList::reserve() is not thread-safe (only re-entrant).
Pick-to: 6.7
Change-Id: I1249de9449865cbf6ab519b0d38b3bf4e743f16d
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
|
|
|
|
|
|
|
|
| |
Prepares for d == nullptr.
Pick-to: 6.7
Change-Id: Ie338f1635d64076d2d2b387fe0de8b3b1a8d0386
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code did not handle the path where we didn't have a challenge.
We cannot recover from that so we just have to fail the request.
Amends fe1b668861e8a3ef99e126821fcd3eeaa6044b54
Pick-to: 6.7 6.6 6.6.2 6.5 6.2
Fixes: QTBUG-121515
Change-Id: Ie39a92e7439785a09cad28e8f81599a51de5e27f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of the API review process, in QNetworkRequestFactory:
(set|clear)Headers() were renamed to (set|clear)CommonHeaders(), and
request() was renamed to createRequest().
In addition, QHttpHeaders::has() was renamed to contains().
Update references to the old names in the documentation.
Pick-to: 6.7
Change-Id: Ib79ae99de26be2f3af60787c8b86c3c20cb30067
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
|