qt6-bb10/tests/auto/network/access
Juha Vuolle fd6dc2e9e7 Remove QHttpHeaders::names()
We need a way for users to consume the complete contents of
QHttpHeaders.

Until now, the only way was

    for (const auto &name : h.names())
        use(h.value/combinedValue(name));

which is quadratic.

Adding the usual iterators and operator[] would require us to
expose the underlying value_type, which we're not ready to do, yet.

So we added nameAt() and valueAt() functions in previous commits to
enable efficient indexed iteration without the need to expose a
value_type. Having added those, we can now remove names(), which had
the wrong value_type (QByteArrays are by definition UTF-8 in Qt, while
header names are L1), and is no longer needed to facilitate iteration.

In QNetworkRequestFactory, temporarily use toMultiMap() because we
need the combinedValue() of all headers here. The fix will be to make
QNetworkRequest QHttpHeaders-aware, but that's a Qt 6.8 thing, even
though we should still de-pessimize this code for Qt 6.7 with private
API.

Resulted from API-review.

Pick-to: 6.7
Change-Id: I65086ef4c62e22554ae7325a846bebc08b44916f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-01-20 03:35:32 +00:00
..
hpack CMake: Make network tests standalone projects 2023-07-05 15:09:32 +02:00
hsts CMake: Make network tests standalone projects 2023-07-05 15:09:32 +02:00
http2 Blacklist tst_Http2::duplicateRequestsWithAborts on QNX 2023-12-04 16:04:18 +01:00
qabstractnetworkcache CMake: Make network tests standalone projects 2023-07-05 15:09:32 +02:00
qdecompresshelper CMake: Make network tests standalone projects 2023-07-05 15:09:32 +02:00
qhttp2connection Privately introduce QHttp2Connection 2024-01-17 16:05:25 +01:00
qhttpheaderparser CMake: Make network tests standalone projects 2023-07-05 15:09:32 +02:00
qhttpheaders Remove QHttpHeaders::names() 2024-01-20 03:35:32 +00:00
qhttpnetworkconnection CMake: Make network tests standalone projects 2023-07-05 15:09:32 +02:00
qhttpnetworkreply CMake: Make network tests standalone projects 2023-07-05 15:09:32 +02:00
qnetworkaccessmanager CMake: Make network tests standalone projects 2023-07-05 15:09:32 +02:00
qnetworkcachemetadata CMake: Make network tests standalone projects 2023-07-05 15:09:32 +02:00
qnetworkcookie CMake: Make network tests standalone projects 2023-07-05 15:09:32 +02:00
qnetworkcookiejar Update public suffix list 2023-09-20 22:33:18 +02:00
qnetworkdiskcache QtNetwork auto tests: compile with QT_NO_FOREACH 2023-08-22 21:50:38 +03:00
qnetworkreply Support for std::chrono as transferTimeout type 2023-12-08 15:53:34 +02:00
qnetworkrequest tests: port assorted trivial uses of Q_FOREACH to ranged for loops 2023-08-14 23:11:54 +03:00
qnetworkrequestfactory Remove HTTP headers equals() / comparison 2024-01-15 10:29:07 +02:00
qrestaccessmanager Add autotest support for QRestReply json parsing errors 2024-01-15 10:29:07 +02:00
CMakeLists.txt Privately introduce QHttp2Connection 2024-01-17 16:05:25 +01:00