aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/qml/qmllint/data/unknownElement.qml (renamed from tests/auto/qml/qmllint/data/spuriousParentWarning.qml)0
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp6
-rw-r--r--tools/qmllint/findunqualified.cpp1
3 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qml/qmllint/data/spuriousParentWarning.qml b/tests/auto/qml/qmllint/data/unknownElement.qml
index 1323593031..1323593031 100644
--- a/tests/auto/qml/qmllint/data/spuriousParentWarning.qml
+++ b/tests/auto/qml/qmllint/data/unknownElement.qml
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: <id>.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?")));
}
diff --git a/tools/qmllint/findunqualified.cpp b/tools/qmllint/findunqualified.cpp
index dc1bb29567..88466cfae9 100644
--- a/tools/qmllint/findunqualified.cpp
+++ b/tools/qmllint/findunqualified.cpp
@@ -388,6 +388,7 @@ void FindUnqualifiedIDVisitor::importExportedNames(const QStringRef &prefix, QSt
m_colorOut.write(name + QLatin1String(" was not found."
" Did you add all import paths?\n"));
m_unknownImports.insert(name);
+ m_visitFailed = true;
break;
}
}