diff options
| author | Olivier De Cannière <olivier.decanniere@qt.io> | 2023-09-27 12:07:27 +0200 |
|---|---|---|
| committer | Olivier De Cannière <olivier.decanniere@qt.io> | 2023-09-28 16:42:22 +0200 |
| commit | 42daf587473aff0789306c92ebc0e7621b57149c (patch) | |
| tree | ab050f888a3c421eff3f51e86b862acf0c2c363b /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | 4f1b9156a48e44cf1f127a4563d0ac69ab436f12 (diff) | |
TypeResolver: Change the way member types of scopes are searched for
When searching for a member of a scope, we now first search the starting
scope and its base and extension scopes for QML properties and methods.
Then, if the member has not been found yet, we search for a JS
identifier in the part of the scope hierarchy that are JS scopes.
This change fixes an issue in qmllint where it would warn of functions
not being found when they were, in fact, being called and thus found at
runtime. For example, an object with an invokable function 'print'
would generate a warning that the function could not be found because
it was being confused with the global function print, interupting the
search. The latter was later discarded as a valid result for the search
thus leading to the warning that no function was found.
Fixes: QTBUG-117077
Pick-to: 6.6 6.5
Change-Id: I9899cefe452ed33b7f7f9b3cbceb1f5a5e080269
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
0 files changed, 0 insertions, 0 deletions
