diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2023-06-12 15:55:36 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-08-30 15:54:00 +0000 |
commit | c567489e73b244594f26e1d8babaa8801fadf7da (patch) | |
tree | 7ff98dd5d3c06f6396042afc17753f0eaba60156 /tests/auto/qml/qmllint/data/storeNameMethod.qml | |
parent | 9359056072285b7b5111767026df3751803d687f (diff) |
qmllint: Detect unqualified id access in StoreNameSloppy
In QQmlJSTypePropagator::generate_StoreName, we would return early in a
few error cases (after calling setError). That is okay for the compiler,
which cares about setError, but qmllint is not interested in compiler
errors by default.
This would result in us not issuing warnings about unqualified id
accesses.
Fix this by also logging the errors via the logger.
Fixes: QTBUG-114467
Change-Id: I10ad10e5c93762b3d9d1fb50d3cabcff2c0b7a4f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 15082891f78d3e6df121fbaef7626be5250bd1e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/qml/qmllint/data/storeNameMethod.qml')
-rw-r--r-- | tests/auto/qml/qmllint/data/storeNameMethod.qml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qmllint/data/storeNameMethod.qml b/tests/auto/qml/qmllint/data/storeNameMethod.qml new file mode 100644 index 0000000000..fca02b288f --- /dev/null +++ b/tests/auto/qml/qmllint/data/storeNameMethod.qml @@ -0,0 +1,12 @@ +import QtQuick 2.15 +import QtQuick.Window 2.15 + +Window { + Rectangle { + + Timer { + function foo() {} + onTriggered: foo = 1 + } + } +} |