From 003a8985a2f30d7b36042b594a2bcf256fdd7f74 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 12 Dec 2016 11:24:33 +0100 Subject: [PATCH] QmlDesigner: Adjusting tests We do not allows ids like "text" and "item" anymore, since they are ambiguous. This patch adjusts a couple of tests. Change-Id: I93a1404c052a8f1d302c179141c6feb35e83afc8 Reviewed-by: Tim Jenssen --- tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp | 8 ++++---- tests/auto/qml/qmldesigner/data/fx/states.qml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp index 5700ea6ddcc..c4c1b4bd61b 100644 --- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp @@ -3928,7 +3928,7 @@ char qmlString[] = "import QtQuick 2.1\n" "text: \"Hello World\"\n" "anchors.centerIn: parent\n" "Item {\n" - "id: item\n" + "id: item01\n" "}\n" "}\n" "Rectangle {\n" @@ -3995,7 +3995,7 @@ char qmlString[] = "import QtQuick 2.1\n" QVERIFY(!textNode1.nodeListProperty("data").toModelNodeList().isEmpty()); ModelNode itemNode = textNode1.nodeListProperty("data").toModelNodeList().first(); QVERIFY(itemNode.isValid()); - QCOMPARE(itemNode.id(), QString("item")); + QCOMPARE(itemNode.id(), QString("item01")); QVERIFY(!itemNode.hasProperty("data")); ModelNode rectNode = rootModelNode.nodeListProperty("data").toModelNodeList().at(1); @@ -4184,7 +4184,7 @@ void tst_TestCore::testMetaInfoQtQuick1Vs2() "text: \"Hello World\"\n" "anchors.centerIn: parent\n" "Item {\n" - "id: item\n" + "id: item01\n" "}\n" "}\n" "Rectangle {\n" @@ -7878,7 +7878,7 @@ void tst_TestCore::loadTestFiles() ModelNode textNode(rootModelNode.nodeListProperty("data").toModelNodeList().first()); QVERIFY(textNode.isValid()); - QCOMPARE(textNode.id(), QLatin1String("text")); + QCOMPARE(textNode.id(), QLatin1String("textElement")); QCOMPARE(textNode.type(), QmlDesigner::TypeName("QtQuick.Text")); QCOMPARE(textNode.variantProperty("x").value().toInt(), 66); QCOMPARE(textNode.variantProperty("y").value().toInt(), 93); diff --git a/tests/auto/qml/qmldesigner/data/fx/states.qml b/tests/auto/qml/qmldesigner/data/fx/states.qml index 3ad8dc1be0c..91e7348d243 100644 --- a/tests/auto/qml/qmldesigner/data/fx/states.qml +++ b/tests/auto/qml/qmldesigner/data/fx/states.qml @@ -30,7 +30,7 @@ Rectangle { width: 200 height: 200 Text { - id: text + id: textElement x: 66 y: 93 text: "Base State"