From 2677de3c79de984e88e4a950c915b4f3f54786dd Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 14 Nov 2019 15:59:56 +0100 Subject: qmllint: Assume "parent" property is always document parent ... except if the document parent is Component. Then leave the type alone. Change-Id: Id7b2e6efdefe18a8d375967ddedcdf9e07a07946 Reviewed-by: Fabian Kosmale --- tests/auto/qml/qmllint/tst_qmllint.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/auto/qml/qmllint/tst_qmllint.cpp') diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp index 5066451f6d..f906c3ac45 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -148,6 +148,14 @@ void TestQmllint::dirtyQmlCode_data() << QStringLiteral("badAliasProperty.qml") << QString("Warning: Property \"nowhere\" not found on type \"QtObject\" at 5:32") << QString(); + QTest::newRow("badParent") + << QStringLiteral("badParent.qml") + << QString("Warning: Property \"rrr\" not found on type \"Item\" at 5:34") + << QString(); + QTest::newRow("parentIsComponent") + << QStringLiteral("parentIsComponent.qml") + << QString("Warning: Property \"progress\" not found on type \"QQuickItem\" at 7:39") + << QString(); } void TestQmllint::dirtyQmlCode() @@ -177,6 +185,7 @@ void TestQmllint::cleanQmlCode_data() QTest::newRow("esmodule") << QStringLiteral("esmodule.mjs"); QTest::newRow("methodsInJavascript") << QStringLiteral("javascriptMethods.qml"); QTest::newRow("goodAlias") << QStringLiteral("goodAlias.qml"); + QTest::newRow("goodParent") << QStringLiteral("goodParent.qml"); } void TestQmllint::cleanQmlCode() -- cgit v1.2.3