Marc Mutz 6ceab7ec35 QHttpHeaders: add value(name, fall-back)
The vast majority of header fields appear only once, but there was no
efficient way to get that value: values() returns as a
QList<QByteArray> (allocating) while combinedValue() returns a
QByteArray constructed from values().join() (also allocating).

It follows that the QHttpHeaders API is incomplete (lacks an efficient
basis of operations in EoP terms).

Add a value() function that returns either the value or a
user-provided fall-back as a QByteArrayView. Unlike values() and
combinedValue(), this function can be noexcept, greatly improving
codegen for callers.

Found in API review.

Task-number: QTBUG-107042
Change-Id: I2da20815fd46fdd7f150c224f41eee53abed313e
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 7897ec88f426773cea38ce8c21091a05718a09e7)
2024-01-12 12:06:02 +01:00
2020-11-16 10:02:08 +02:00
2015-08-18 19:59:14 +00:00
2012-09-07 15:39:31 +02:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%