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. Pick-to: 6.7 Task-number: QTBUG-107042 Change-Id: I2da20815fd46fdd7f150c224f41eee53abed313e Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> |
||
|---|---|---|
| .. | ||
| access | ||
| kernel | ||
| selftest | ||
| socket | ||
| ssl | ||
| CMakeLists.txt | ||