diff options
author | Sona Kurazyan <[email protected]> | 2022-04-26 17:07:00 +0200 |
---|---|---|
committer | Marc Mutz <[email protected]> | 2022-05-02 20:06:20 +0000 |
commit | 7baa06fe0c7fa1a1d20ae749915a6483621f204e (patch) | |
tree | 4870b761bd66e7f61d37375f80917c7445692884 /src/testlib/doc/snippets/code | |
parent | 34242f843ec41b63c706e4604ac3a65805d11107 (diff) |
QtTestLib: replace QLatin1String uses with _L1/_s/QStringLiteral
Task-number: QTBUG-98434
Change-Id: Ie327fd4af1880002e5a1e09b43384f2b709625e7
Reviewed-by: Marc Mutz <[email protected]>
Reviewed-by: Edward Welbourne <[email protected]>
Diffstat (limited to 'src/testlib/doc/snippets/code')
-rw-r--r-- | src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp index bea1ee6d6ce..766df676010 100644 --- a/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp +++ b/src/testlib/doc/snippets/code/src_qtestlib_qtestcase.cpp @@ -53,6 +53,8 @@ #include <initializer_list> +using namespace Qt::StringLiterals; + // dummy class TestBenchmark : public QObject { @@ -225,8 +227,8 @@ QTest::qSleep(250); //! [27] void TestBenchmark::simple() { - QString str1 = QLatin1String("This is a test string"); - QString str2 = QLatin1String("This is a test string"); + QString str1 = u"This is a test string"_s; + QString str2 = u"This is a test string"_s; QCOMPARE(str1.localeAwareCompare(str2), 0); QBENCHMARK { str1.localeAwareCompare(str2); |