diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-11-15 17:42:18 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-01-13 16:54:27 +0100 |
commit | d31bb553b543cc43591c31a35d054504aa756bdc (patch) | |
tree | 26542e4fe4783a9c23c48bd5afec0ffd2ba74ec3 /tests/auto/qml/qmllint | |
parent | 01b865411d945960cb00b51a0078549eb3dd38e8 (diff) |
qmllint: Consider attached properties
We cannot figure out who attached properties to what, therefore we
consider any uppercase property we cannot locate as a potential attached
property.
Change-Id: I60508b9e4e038a51b87c56edf0796ac492aa3fa0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmllint')
-rw-r--r-- | tests/auto/qml/qmllint/data/AttachedProps.qml | 6 | ||||
-rw-r--r-- | tests/auto/qml/qmllint/tst_qmllint.cpp | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/AttachedProps.qml b/tests/auto/qml/qmllint/data/AttachedProps.qml new file mode 100644 index 0000000000..01be66f866 --- /dev/null +++ b/tests/auto/qml/qmllint/data/AttachedProps.qml @@ -0,0 +1,6 @@ +import QtQml 2.0 + +QtObject { + id: self + property var foo: self.Component.completed +} diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp index 655e6a1d65..03412f0144 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -191,6 +191,7 @@ void TestQmllint::cleanQmlCode_data() QTest::newRow("goodAlias") << QStringLiteral("goodAlias.qml"); QTest::newRow("goodParent") << QStringLiteral("goodParent.qml"); QTest::newRow("goodTypeAssertion") << QStringLiteral("goodTypeAssertion.qml"); + QTest::newRow("AttachedProps") << QStringLiteral("AttachedProps.qml"); } void TestQmllint::cleanQmlCode() |