qt5base-lts/tests/auto/other
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
..
android Add license headers to cmake files 2022-08-03 17:14:55 +02:00
gestures Add license headers to cmake files 2022-08-03 17:14:55 +02:00
languagechange Add license headers to cmake files 2022-08-03 17:14:55 +02:00
macgui Add license headers to cmake files 2022-08-03 17:14:55 +02:00
macnativeevents Add license headers to cmake files 2022-08-03 17:14:55 +02:00
macplist Add license headers to cmake files 2022-08-03 17:14:55 +02:00
networkselftest Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qabstractitemmodelutils Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qaccessibility QtBase: Windows: Replace some deprecated API usages 2022-08-03 23:24:21 +08:00
qaccessibilitylinux qputenv: port to QByteArrayView 2022-08-06 14:21:46 +00:00
qaccessibilitymac Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qcomplextext Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qfocusevent Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qnetworkaccessmanager_and_qprogressdialog Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qobjectrace Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qprocess_and_guieventloop Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qsharedpointer_and_qwidget Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qvariant_common Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
sessionmanagement_macos Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
toolsupport Add license headers to cmake files 2022-08-03 17:14:55 +02:00
xkbkeyboard 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