qt5base-lts/tests/auto/widgets/kernel
Marc Mutz 5ff7163796 qputenv: port to QByteArrayView
The vast majority of in-tree users pass simple and short C string
literals as the value. By porting to QByteArrayView, we document that
we'll accept non-NUL-terminated data, and do the NUL-termination
internally, using SSO'ed std::string, saving memory allocations in the
common case of short strings.

I didn't bother to check which direction std::string takes for
nullptrs these days (there was a change accepted in that area for
C++20 or 23), so play it safe and protect against them.

Follow-up to

Task-number: QTBUG-105302
Change-Id: I2369acc62f1d5cbc26135396cfe0602d8c75300c
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-08-06 14:21:46 +00:00
..
qaction Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qactiongroup Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qapplication qputenv: port to QByteArrayView 2022-08-06 14:21:46 +00:00
qboxlayout Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qformlayout Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qgesturerecognizer Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qgridlayout Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qlayout Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qshortcut Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qsizepolicy Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qstackedlayout Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qtooltip Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qwidget QtBase: Windows: Replace some deprecated API usages 2022-08-03 23:24:21 +08:00
qwidget_window Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qwidgetaction Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qwidgetmetatype Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qwidgetrepaintmanager Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qwidgetsvariant Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qwindowcontainer Add license headers to cmake files 2022-08-03 17:14:55 +02:00
CMakeLists.txt Add license headers to cmake files 2022-08-03 17:14:55 +02:00