diff options
author | Giuseppe D'Angelo <[email protected]> | 2019-06-11 19:35:19 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <[email protected]> | 2019-06-11 19:35:19 +0200 |
commit | 05dd00087c8442bce2ec8f12c3d9de4491c3efe8 (patch) | |
tree | 2c7e2078b3e6470f9d6442f74b07b2999cf76f8a | |
parent | bf8862a3bfa3010986ed638e90d870fbd2a61435 (diff) |
Port from QLatin1Literal to QLatin1String
QLatin1Literal is an undocumented and deprecated typedef
for QLatin1String, just use the original.
Change-Id: Ib6e2b7ac369be12aed0e455c91cf31b807eae4ed
Reviewed-by: Simon Hausmann <[email protected]>
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 2 | ||||
-rw-r--r-- | src/qmltest/quicktest.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qml/qqmlengine/tst_qqmlengine.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 5b68725bcf..a28752dc3a 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -206,7 +206,7 @@ int qt_v4DebuggerHook(const char *json) return ProtocolVersion; // Version number. } - int version = ob.value(QLatin1Literal("version")).toString().toInt(); + int version = ob.value(QLatin1String("version")).toString().toInt(); if (version != ProtocolVersion) { return -WrongProtocol; } diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index 2b0205cdd4..470b3c0f7a 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -338,7 +338,7 @@ private: QQmlType testCaseType; for (quint32 i = 0, count = compilationUnit->importCount(); i < count; ++i) { const Import *import = compilationUnit->importAt(i); - if (compilationUnit->stringAt(import->uriIndex) != QLatin1Literal("QtTest")) + if (compilationUnit->stringAt(import->uriIndex) != QLatin1String("QtTest")) continue; QString testCaseTypeName(QStringLiteral("TestCase")); @@ -368,7 +368,7 @@ private: if (result.isTestCase) { // Look for override of name in this type for (auto binding = object->bindingsBegin(); binding != object->bindingsEnd(); ++binding) { - if (compilationUnit->stringAt(binding->propertyNameIndex) == QLatin1Literal("name")) { + if (compilationUnit->stringAt(binding->propertyNameIndex) == QLatin1String("name")) { if (binding->type == QV4::CompiledData::Binding::Type_String) { result.testCaseName = compilationUnit->stringAt(binding->stringIndex); } else { @@ -387,10 +387,10 @@ private: auto functionsEnd = compilationUnit->objectFunctionsEnd(object); for (auto function = compilationUnit->objectFunctionsBegin(object); function != functionsEnd; ++function) { QString functionName = compilationUnit->stringAt(function->nameIndex); - if (!(functionName.startsWith(QLatin1Literal("test_")) || functionName.startsWith(QLatin1Literal("benchmark_")))) + if (!(functionName.startsWith(QLatin1String("test_")) || functionName.startsWith(QLatin1String("benchmark_")))) continue; - if (functionName.endsWith(QLatin1Literal("_data"))) + if (functionName.endsWith(QLatin1String("_data"))) continue; result.testFunctions << functionName; diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp index 8d0106b92c..a8c6248a47 100644 --- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp +++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp @@ -935,7 +935,7 @@ void tst_qqmlengine::cppSignalAndEval() { ObjectCaller objectCaller; QQmlEngine engine; - engine.rootContext()->setContextProperty(QLatin1Literal("CallerCpp"), &objectCaller); + engine.rootContext()->setContextProperty(QLatin1String("CallerCpp"), &objectCaller); QQmlComponent c(&engine); c.setData("import QtQuick 2.9\n" "Item {\n" |