aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-08-23 14:38:59 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-29 15:33:26 +0000
commit0e5d277bbf66d6b9a75e22d3c60a8fca5368cf6b (patch)
tree860e21d7153754145e774d597ee8117e4b28b18c /tests
parent61e269ded1918624e15fd862daa9f69cc58f1ba9 (diff)
qmllint: Don't warn about access to attached enums
You can always access enums of attached objects, no matter what other rules apply to the attached properties. Fixes: QTBUG-105590 Change-Id: I07878d8efe63468539168aa2c2842e3159ed2090 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit cc89f62851ce1b9f859e9bc43415d4ce7e3a36e2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qmllint/data/enumsOfScrollBar.qml7
-rw-r--r--tests/auto/qml/qmllint/tst_qmllint.cpp1
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/enumsOfScrollBar.qml b/tests/auto/qml/qmllint/data/enumsOfScrollBar.qml
new file mode 100644
index 0000000000..d0cd5591b9
--- /dev/null
+++ b/tests/auto/qml/qmllint/data/enumsOfScrollBar.qml
@@ -0,0 +1,7 @@
+import QtQuick
+import QtQuick.Controls
+
+Item {
+ Component.onCompleted: console.log(ScrollBar.AlwaysOn)
+}
+
diff --git a/tests/auto/qml/qmllint/tst_qmllint.cpp b/tests/auto/qml/qmllint/tst_qmllint.cpp
index e0e690ed99..33abde0400 100644
--- a/tests/auto/qml/qmllint/tst_qmllint.cpp
+++ b/tests/auto/qml/qmllint/tst_qmllint.cpp
@@ -1145,6 +1145,7 @@ void TestQmllint::cleanQmlCode_data()
QTest::newRow("BindingTypeMismatchFunction") << QStringLiteral("bindingTypeMismatchFunction.qml");
QTest::newRow("BindingTypeMismatch") << QStringLiteral("bindingTypeMismatch.qml");
QTest::newRow("template literal (substitution)") << QStringLiteral("templateStringSubstitution.qml");
+ QTest::newRow("enumsOfScrollBar") << QStringLiteral("enumsOfScrollBar.qml");
}
void TestQmllint::cleanQmlCode()