qt5base-lts/tests/auto/printsupport/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
..
qprintdevice Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qprinter Add license headers to cmake files 2022-08-03 17:14:55 +02:00
qprinterinfo qputenv: port to QByteArrayView 2022-08-06 14:21:46 +00:00
CMakeLists.txt Add license headers to cmake files 2022-08-03 17:14:55 +02:00