qt6-bb10/tests/auto/network
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
..
access Remove QHttpHeaders::names() 2024-01-20 03:35:32 +00:00
kernel tst_QHostInfo::reverseLookup(): code cleanup 2024-01-11 10:59:03 +01:00
selftest Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
socket Un-blacklist tst_qudpsocket for MinGW+CMake 2024-01-15 17:10:22 +01:00
ssl Fix the qopenssl_symbols.h copy in the autotest 2023-12-13 20:54:00 +00:00
CMakeLists.txt Rid of 'special case' markers 2023-04-13 18:30:58 +02:00