aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmllint/tst_qmllint.cpp
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2022-02-15 11:57:54 +0100
committerMaximilian Goldstein <max.goldstein@qt.io>2022-02-21 18:46:35 +0100
commitd18b02ef4cd4dbe80554f7d71582d8cd6208dbdb (patch)
tree3be7e8a645781f77d92575e0ea53dbd842185d4d /tests/auto/qml/qmllint/tst_qmllint.cpp
parent9018514022259a35311d82cbd24a4685f3aff9a9 (diff)
qmllint: Warn about missing property types on current scope
Previously we only warned about missing property types when the lookup was not on the current scope but only on an id, parent etc. This change makes sure we also warn in this case and don't produce false positives for an unqualified access. Task-number: QTBUG-100839 Change-Id: I732b8420c0c6b96dd8f93cde66a7f9813e704671 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> (cherry picked from commit 696f89b1988ed54833406ee8166ffa40e3edaee5) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmllint/tst_qmllint.cpp')
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index 27af9beed6..7057d31a66 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -440,6 +440,10 @@ void TestQmllint::dirtyQmlCode_data()
<< QString("Warning: %1: Cycle2 is part of an inheritance "
"cycle: Cycle2 -> Cycle3 -> Cycle1 -> Cycle2")
<< QString() << QString() << false;
+ QTest::newRow("incompleteQmltypes3")
+ << QStringLiteral("incompleteQmltypes3.qml")
+ << QString("Warning: %1:5:21: Type \"QPalette\" of property \"palette\" not found")
+ << QString() << QString() << false;
QTest::newRow("badQmldirImportAndDepend")
<< QStringLiteral("qmldirImportAndDepend/bad.qml")
<< QString("Warning: %1:3:1: Item was not found. Did you add all import paths?")