The function replaces one of the found entries with the new value, and removes any other entries. If no entries are found, a new entry will be appended. The replacement search is done for performance reasons; it's cheaper to replace an existing value. All in all the function is a more convenient and performant alternative for this sequence (which proved to be common while porting QtNetwork internals to QHttpHeaders): header.removeAll(<headername>); header.append(<headername>, <value>); [ChangeLog][QtNetwork][QHttpHeaders] Added replaceOrAppend() convenience method, which either replaces previous entries with a single entry, or appends a new one if no entries existed Fixes: QTBUG-122175 Change-Id: I03957645d7e916a732ac7b8d3ae724bb6b16af87 Reviewed-by: Lena Biliaieva <lena.biliaieva@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> |
||
|---|---|---|
| .. | ||
| access | ||
| kernel | ||
| selftest | ||
| socket | ||
| ssl | ||
| CMakeLists.txt | ||