aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmllint/tst_qmllint.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-09-24 10:06:26 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-09-24 12:05:47 +0200
commit229b24370b880c60c0990e5a32beabc0a679ea00 (patch)
treee4f83fbfa4b9a89fad8823d0dc7d380665c9ec50 /tests/auto/qml/qmllint/tst_qmllint.cpp
parentdbb0d83779d09dca35f5ad6ee68a19f4e93eec1d (diff)
qmllint: Don't dump imported enums into the current scope
This bit of code has never fulfilled any discernable function. Enum access is done elsewhere. Add a test case to prove that access to enums from QtQml's plugins.qmltypes still works. Change-Id: I62fd6c1ec748c88205aa20367ee06d7a33502fa1 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.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index 74f73d8baf..f8e031689b 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -189,7 +189,12 @@ void TestQmllint::dirtyQmlCode_data()
<< QString();
QTest::newRow("javascriptMethodsInModule")
<< QStringLiteral("javascriptMethodsInModuleBad.qml")
- << QString("Warning: Property \"unknownFunc\" not found on type \"Foo\"") << QString();
+ << QString("Warning: Property \"unknownFunc\" not found on type \"Foo\"")
+ << QString();
+ QTest::newRow("badEnumFromQtQml")
+ << QStringLiteral("badEnumFromQtQml.qml")
+ << QString("Warning: Property \"Linear123\" not found on type \"QQmlEasingEnums\"")
+ << QString();
}
void TestQmllint::dirtyQmlCode()
@@ -236,6 +241,7 @@ void TestQmllint::cleanQmlCode_data()
QTest::newRow("Signals") << QStringLiteral("Signal.qml");
QTest::newRow("javascriptMethodsInModule")
<< QStringLiteral("javascriptMethodsInModuleGood.qml");
+ QTest::newRow("enumFromQtQml") << QStringLiteral("enumFromQtQml.qml");
}
void TestQmllint::cleanQmlCode()