From 3dc5b937c4e9acf83ee54e870390c22f341c29c8 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 14 Nov 2019 16:31:48 +0100 Subject: qmllint: Consider failure to find imports an error There is no real reason to tolerate it. We can generate all qmltypes at build time, and if we can't find them, the results are likely to be off. Change-Id: Id935d76ac3ca6b601381b40a73d7fbacca342c4d Reviewed-by: Fabian Kosmale --- tests/auto/qml/qmllint/tst_qmllint.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (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 03412f0144..1cd9f8b0d1 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -48,7 +48,7 @@ private Q_SLOTS: void dirtyQmlCode_data(); void dirtyQmlCode(); - void testUnqualifiedNoSpuriousParentWarning(); + void testUnknownCausesFail(); private: QString runQmllint(const QString &fileToLint, bool shouldSucceed); @@ -107,9 +107,9 @@ void TestQmllint::testUnqualified_data() QTest::newRow("NonSpuriousParent") << QStringLiteral("nonSpuriousParentWarning.qml") << QStringLiteral("property int x: .parent.x") << 6 << 25; } -void TestQmllint::testUnqualifiedNoSpuriousParentWarning() +void TestQmllint::testUnknownCausesFail() { - const QString unknownNotFound = runQmllint("spuriousParentWarning.qml", false); + const QString unknownNotFound = runQmllint("unknownElement.qml", false); QVERIFY(unknownNotFound.contains( QStringLiteral("warning: Unknown was not found. Did you add all import paths?"))); } -- cgit v1.2.3