diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-01-26 11:14:13 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-01-26 13:19:38 +0100 |
commit | ed59dfeb706242d314aa21889ad0f5a7e028069f (patch) | |
tree | e3eae93b16692733caa34969328c2016b3c74257 /tests | |
parent | 48b6e192bbb023bb19c9de81c1e3d3ac3bca238c (diff) |
qmllint: Complain if member access check fails for namespaced types
Before, we would prepend the namespace to the name, but then continue
right away, never checking the new name.
Change-Id: If90db7d33536fb4b549321c2d6b677040605b6f0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qmllint/data/brokenNamespace.qml | 5 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/tst_qmllint.cpp | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/brokenNamespace.qml b/tests/auto/qml/qmllint/data/brokenNamespace.qml new file mode 100644 index 0000000000..45f20b941c --- /dev/null +++ b/tests/auto/qml/qmllint/data/brokenNamespace.qml @@ -0,0 +1,5 @@ +import QtQuick as T + +T.Item { + objectName: T.some.bs +} diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp index c1ccae7235..994bb2cea0 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -273,6 +273,10 @@ void TestQmllint::dirtyQmlCode_data() << QStringLiteral("badScript.qml") << QString("Warning: Property \"stuff\" not found on type \"Empty\"") << QString(); + QTest::newRow("brokenNamespace") + << QStringLiteral("brokenNamespace.qml") + << QString("Warning: type not found in namespace at %1:4:17") + << QString(); } void TestQmllint::dirtyQmlCode() |