qt5base-lts/tests/auto/corelib/io
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
..
largefile Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qabstractfileengine Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qbuffer Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qdataurl Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qdebug Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qdir Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qdiriterator Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qfile QtBase: Windows: Replace some deprecated API usages 2022-08-03 23:24:21 +08:00
qfileinfo Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qfileselector Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qfilesystementry Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qfilesystemmetadata Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qfilesystemwatcher Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qiodevice Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qipaddress Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qlockfile Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qloggingcategory qputenv: port to QByteArrayView 2022-08-06 14:21:46 +00:00
qloggingregistry Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qnodebug Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qprocess Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qprocess-noapplication Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qprocessenvironment Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qresourceengine Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qsavefile Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qsettings Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qstandardpaths qputenv: port to QByteArrayView 2022-08-06 14:21:46 +00:00
qstorageinfo Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qtemporarydir Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qtemporaryfile Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qurl Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qurlinternal Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qurlquery Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qurluts46 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