summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-07-26 22:43:05 +0300
committerMarc Mutz <marc.mutz@kdab.com>2019-08-10 22:13:49 +0200
commitc58ca4256d881ffed865602fd3da8efb6ebc9d5f (patch)
tree2619858d2e21ebee531d8c9e2a7af39e23683fca /tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp
parentb7d073e9905bf9812ba96cecdcf6871a95517d30 (diff)
Deprecate QStringViewLiteral
As a macro, we can't directly deprecate it, but need to make it call something deprecated. That is a new ctor with a new enum type added. The type might be useful for other such ventures, so put it into qglobal.h Remove the QT_NO_UNICODE_LITERAL protection, as it's always false these days, and QT_UNICODE_LITERAL is unconditionally #defined a 20 lines above. [ChangeLog][QtCore][QStringView] Deprecated the (undocumented) QStringViewLiteral macro. Just use u"" or QStringView(u"") instead. Change-Id: I9141320225037e1bc6b7f920bf01a9d0144fdac2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp')
-rw-r--r--tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp b/tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp
index cf46159251..0427c81b85 100644
--- a/tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp
+++ b/tests/auto/corelib/text/qlatin1string/tst_qlatin1string.cpp
@@ -70,7 +70,7 @@ void tst_QLatin1String::arg() const
do { \
auto p = QLatin1String(pattern); \
QCOMPARE(p.arg(QLatin1String(arg1)), expected); \
- QCOMPARE(p.arg(QStringViewLiteral(arg1)), expected); \
+ QCOMPARE(p.arg(u"" arg1), expected); \
QCOMPARE(p.arg(QStringLiteral(arg1)), expected); \
QCOMPARE(p.arg(QString(QLatin1String(arg1))), expected); \
} while (false) \
@@ -79,9 +79,9 @@ void tst_QLatin1String::arg() const
do { \
auto p = QLatin1String(pattern); \
QCOMPARE(p.arg(QLatin1String(arg1), QLatin1String(arg2)), expected); \
- QCOMPARE(p.arg(QStringViewLiteral(arg1), QLatin1String(arg2)), expected); \
- QCOMPARE(p.arg(QLatin1String(arg1), QStringViewLiteral(arg2)), expected); \
- QCOMPARE(p.arg(QStringViewLiteral(arg1), QStringViewLiteral(arg2)), expected); \
+ QCOMPARE(p.arg(u"" arg1, QLatin1String(arg2)), expected); \
+ QCOMPARE(p.arg(QLatin1String(arg1), u"" arg2), expected); \
+ QCOMPARE(p.arg(u"" arg1, u"" arg2), expected); \
} while (false) \
/*end*/