diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-11-14 15:59:56 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-01-13 16:54:17 +0100 |
commit | 2677de3c79de984e88e4a950c915b4f3f54786dd (patch) | |
tree | 57a4cdf058f7af9d36c776955803e384853b361d /tests/auto/qml/qmllint/tst_qmllint.cpp | |
parent | 6c68a39a56299c72da30a4bac3ca7fe8420687a4 (diff) |
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 <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmllint/tst_qmllint.cpp')
-rw-r--r-- | tests/auto/qml/qmllint/tst_qmllint.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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() |