From 04c16d7c1e06d6bfc33c61e7fda0c59e45c4daaa Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 12 Feb 2021 14:35:48 +0100 Subject: qmllint: Don't create properties for "on" assignments "on" assignments are assignments to the default property, with the property given interpreted as the target for the inner object. Change-Id: Ia93a171f759964d2c00d6c0293a5434f588123af Reviewed-by: Andrei Golubev Reviewed-by: Fabian Kosmale (cherry picked from commit 67c8afff346eae27c6fb833661d179326dd8b153) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/qml/qmllint/tst_qmllint.cpp | 4 ++++ 1 file changed, 4 insertions(+) (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 18b5090dcf..12b8f5619f 100644 --- a/tests/auto/qml/qmllint/tst_qmllint.cpp +++ b/tests/auto/qml/qmllint/tst_qmllint.cpp @@ -292,6 +292,10 @@ void TestQmllint::dirtyQmlCode_data() << QStringLiteral("Signal handler for \"onSig\" has more formal parameters " "than the signal it handles.") << QString(); + QTest::newRow("OnAssignment") + << QStringLiteral("onAssignment.qml") + << QStringLiteral("Property \"loops\" not found on type \"bool\"") + << QString(); } void TestQmllint::dirtyQmlCode() -- cgit v1.2.3