qt5base-lts/tests/auto
Marc Mutz 8420d3e0b2 tst_QString: test with QT_RESTRICTED_CAST_FROM_ASCII, too
QtBase didn't contain any checks for QT_RESTRICTED_CAST_FROM_ASCII, so
a recent addition to the QString::append/insert/prepend overload set
made calls with C string literal arguments ambiguous without the CI
noticing. We had a similar problem with QString::multiArg.

To increase test coverage, we now run tst_qstring two times:

- without any define
- with QT_RESTRICTED_CAST_FROM_ASCII (lots of changes necessary)

Most removals are expected, because they disable tests that check the
implicit conversions from QByteArray and const char*, but the
relational operators with QLatin1String objects might warrant fixing.

In some places, when the conversion wasn't the functionality under
test, replaced C string literals or QByteArrays with QLatin1String.

We should also test with QT_NO_CAST_FROM_ASCII, but that's even larger
surgery.

QString doesn't have a ctor from std::nullptr_t, so QString s =
nullptr; doesn't compile in C++17 mode, but does in C++20 mode, due to
the const char8_t* ctor.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I0c5a31719a4b8dd585dd748e0ca0d99964866064
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-22 11:16:02 +00:00
..
bic/data Revert "Add binary compatibility file generated against 6.4.0" 2022-11-17 13:52:02 +00:00
cmake Bump version to 6.6.0 2022-12-14 20:19:01 +02:00
concurrent Skip tst_qconcurrentrun completely if running under an emulator 2022-12-19 15:31:10 +00:00
corelib tst_QString: test with QT_RESTRICTED_CAST_FROM_ASCII, too 2022-12-22 11:16:02 +00:00
dbus Adapt to QTimeZone replacing Qt::TimeSpec usage 2022-12-10 06:39:44 +01:00
gui QTextImageHandler: Add test coverage for resources and URLs 2022-12-22 00:48:08 +01:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network Adapt to QTimeZone replacing Qt::TimeSpec usage 2022-12-10 06:39:44 +01:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Remove blacklisting for OpenSUSE LEAP in gestures 2022-12-14 15:47:25 +00:00
printsupport Port from qAsConst() to std::as_const() 2022-10-11 23:17:18 +02:00
shared Don't hide object replacement char except in rich text 2022-12-14 19:19:01 +01:00
sql Adapt to QTimeZone replacing Qt::TimeSpec usage 2022-12-10 06:39:44 +01:00
testlib Adapt to QTimeZone replacing Qt::TimeSpec usage 2022-12-10 06:39:44 +01:00
tools dbus: Fix path to moc file in generated qdbusxml2cpp 2022-12-16 17:21:57 +00:00
wasm Fix typo in QWasmWindowStack's name 2022-10-20 16:36:23 +02:00
widgets Android: Set EnterKeyNext as default type for QLineEdit 2022-12-21 04:11:58 +01:00
xml QDomDocument: ensure a defined order of attributes when saving 2022-12-09 16:29:11 +01:00
CMakeLists.txt Add forwarding of CMake variables to ABI-specific external projects 2022-12-08 23:24:22 +01:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00