diff options
author | Liang Qi <liang.qi@qt.io> | 2019-06-14 14:49:54 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-06-14 14:49:54 +0200 |
commit | 1639076404e4ece74c103e16356cce6bd9cff9e8 (patch) | |
tree | 2eb8447228cc75fbfca2781adbaf91996fe76992 /tests | |
parent | dea04056ac0225f6051a974c9d623eabaaa7eee4 (diff) |
Port from QLatin1Literal to QLatin1String
QLatin1Literal is an undocumented and deprecated typedef
for QLatin1String, just use the original.
Just follow qtbase 45373c19243aea335897ba0f371a1dd53ae8f079.
Change-Id: I03c144f405e11b77460f7a8e5eff089952ecc64b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/proxy_multiprocess/client/main.cpp | 2 | ||||
-rw-r--r-- | tests/auto/proxy_multiprocess/server/main.cpp | 4 | ||||
-rw-r--r-- | tests/auto/restart/client/main.cpp | 4 | ||||
-rw-r--r-- | tests/auto/restart/server/main.cpp | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/proxy_multiprocess/client/main.cpp b/tests/auto/proxy_multiprocess/client/main.cpp index 19ba46f..f28c65a 100644 --- a/tests/auto/proxy_multiprocess/client/main.cpp +++ b/tests/auto/proxy_multiprocess/client/main.cpp @@ -53,7 +53,7 @@ private Q_SLOTS: const auto objectMode = qEnvironmentVariable("ObjectMode"); qDebug() << "Starting test" << objectMode; - if (objectMode == QLatin1Literal("ObjectPointer")) { + if (objectMode == QLatin1String("ObjectPointer")) { QSignalSpy tracksSpy(m_rep->tracks(), &QAbstractItemModelReplica::initialized); QVERIFY(m_rep->subClass() != nullptr); QCOMPARE(m_rep->subClass()->myPOD(), initialValue); diff --git a/tests/auto/proxy_multiprocess/server/main.cpp b/tests/auto/proxy_multiprocess/server/main.cpp index 1cd005d..1e8f107 100644 --- a/tests/auto/proxy_multiprocess/server/main.cpp +++ b/tests/auto/proxy_multiprocess/server/main.cpp @@ -52,7 +52,7 @@ private Q_SLOTS: subclass.setI(initialI); QStringListModel model; model.setStringList(QStringList() << "Track1" << "Track2" << "Track3"); - if (objectMode == QLatin1Literal("ObjectPointer")) { + if (objectMode == QLatin1String("ObjectPointer")) { parent.setSubClass(&subclass); parent.setTracks(&model); parent.setMyEnum(ParentClassSource::bar); @@ -82,7 +82,7 @@ private Q_SLOTS: updatedSubclass.setMyPOD(updatedValue); updatedSubclass.setI(updatedI); parent.setSubClass(&updatedSubclass); - if (objectMode == QLatin1Literal("NullPointer")) + if (objectMode == QLatin1String("NullPointer")) parent.setTracks(&model); parent.setMyEnum(ParentClassSource::foobar); parent.setDate(Qt::SystemLocaleLongDate); diff --git a/tests/auto/restart/client/main.cpp b/tests/auto/restart/client/main.cpp index aa2cdd9..c520131 100644 --- a/tests/auto/restart/client/main.cpp +++ b/tests/auto/restart/client/main.cpp @@ -64,7 +64,7 @@ private Q_SLOTS: qWarning() << "From client"; const MyPOD initialValue(42, 3.14f, QStringLiteral("SubClass")); - if (objectMode == QLatin1Literal("ObjectPointer")) { + if (objectMode == QLatin1String("ObjectPointer")) { QSignalSpy tracksSpy(m_rep->tracks(), &QAbstractItemModelReplica::initialized); QVERIFY(m_rep->subClass() != nullptr); QCOMPARE(m_rep->subClass()->myPOD(), initialValue); @@ -79,7 +79,7 @@ private Q_SLOTS: QSignalSpy advanceSpy(m_rep.data(), SIGNAL(advance())); QVERIFY(advanceSpy.wait()); - if (objectMode == QLatin1Literal("ObjectPointer")) { + if (objectMode == QLatin1String("ObjectPointer")) { QVERIFY(m_rep->subClass() != nullptr); QCOMPARE(m_rep->subClass()->myPOD(), initialValue); QVERIFY(m_rep->tracks() != nullptr); diff --git a/tests/auto/restart/server/main.cpp b/tests/auto/restart/server/main.cpp index b65dc17..f4e83a5 100644 --- a/tests/auto/restart/server/main.cpp +++ b/tests/auto/restart/server/main.cpp @@ -47,7 +47,7 @@ private Q_SLOTS: SubClassSimpleSource subclass; QStringListModel model; const MyPOD initialValue(42, 3.14f, QStringLiteral("SubClass")); - if (objectMode == QLatin1Literal("ObjectPointer")) { + if (objectMode == QLatin1String("ObjectPointer")) { subclass.setMyPOD(initialValue); model.setStringList(QStringList() << "Track1" << "Track2" << "Track3"); myTestServer.setSubClass(&subclass); @@ -66,9 +66,9 @@ private Q_SLOTS: QTest::qWait(200); qDebug() << "Client connected"; - if (runMode != QLatin1Literal("Baseline")) { + if (runMode != QLatin1String("Baseline")) { qDebug() << "Server quitting" << runMode; - if (runMode == QLatin1Literal("ServerRestartFatal")) + if (runMode == QLatin1String("ServerRestartFatal")) qFatal("Fatal"); QCoreApplication::exit(); return; |