qt6-bb10/tests/auto/corelib/text/qlatin1stringview
Ahmad Samir f1e15832dd String Views: optimize the QByteArray/QString constructors
By using {QString,QByteArray}::begin() instead of data() (for const
objectst); both begin() methods, respectively [1], return nullptr for a
const null {QString,QByteArray}. Whereas data() returns &_empty if
QT5_NULL_STRINGS is defined.

[1] QByteArray::begin() since a116b2ddfc
QString::begin() since 287ace562e

[ChangeLog][QtCore][QLatin1StringView] Creation of QLatin1StringView
from QByteArray or QByteArrayView now preserves the origin's isNull()
status. This matches the behavior of creating a QUtf8StringView from
those types.

Change-Id: Icbdfe282e315c08ca6a17201bcd32c1a3bba8bf5
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 221d8fdfb14c16472267320f859105f1a3834952)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-26 04:18:29 +00:00
..
.gitignore Rename tst_qlatin1string and switch to using QLatin1StringView 2022-03-19 18:51:08 +01:00
CMakeLists.txt CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
tst_qlatin1stringview.cpp String Views: optimize the QByteArray/QString constructors 2024-08-26 04:18:29 +00:00