From c34f51d58c1e3333a663b09b974bbd7b145a2d1b Mon Sep 17 00:00:00 2001 From: Andrei Golubev Date: Thu, 4 Mar 2021 17:20:52 +0100 Subject: [PATCH] Remove meaningless QT_NO_UNICODE_LITERAL check in QString literal tests This check doesn't really do anything useful anymore: QStringLiteral is used in Qt without any extra QT_NO_UNICODE_LITERAL #if-ery Additionally, clean the related (and outdated) comment in {QString, QByteArray}::literals() Change-Id: I65b1eac33c5470508997be24f9ba6cf56d8578ea Reviewed-by: Lars Knoll --- tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp | 1 - tests/auto/corelib/text/qstring/tst_qstring.cpp | 5 ----- 2 files changed, 6 deletions(-) diff --git a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp index 1ce92becee..382190567b 100644 --- a/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/corelib/text/qbytearray/tst_qbytearray.cpp @@ -1968,7 +1968,6 @@ void tst_QByteArray::movablity() QVERIFY(true); } -// Only tested on c++0x compliant compiler or gcc void tst_QByteArray::literals() { QByteArray str(QByteArrayLiteral("abcd")); diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp index f36da049f9..57885f596d 100644 --- a/tests/auto/corelib/text/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp @@ -566,9 +566,7 @@ private slots: #if QT_CONFIG(icu) void toUpperLower_icu(); #endif -#if !defined(QT_NO_UNICODE_LITERAL) void literals(); -#endif void userDefinedLiterals(); void eightBitLiterals_data(); void eightBitLiterals(); @@ -6420,8 +6418,6 @@ void tst_QString::toUpperLower_icu() } #endif // icu -#if !defined(QT_NO_UNICODE_LITERAL) -// Only tested on c++0x compliant compiler or gcc void tst_QString::literals() { QString str(QStringLiteral("abcd")); @@ -6444,7 +6440,6 @@ void tst_QString::literals() QVERIFY(str2.data() != s); QVERIFY(str2.capacity() >= str2.length()); } -#endif void tst_QString::userDefinedLiterals() {