diff options
| author | Sami Shalayel <sami.shalayel@qt.io> | 2023-03-07 15:49:30 +0100 |
|---|---|---|
| committer | Sami Shalayel <sami.shalayel@qt.io> | 2023-05-23 10:58:18 +0200 |
| commit | 435488bdeabe7449d00b0efb968ede3f6c634f5f (patch) | |
| tree | df0b7c4282d70dbd8dec89e7472543ac50779865 /src/qml/jsruntime/qv4functionobject.cpp | |
| parent | ed131e93646d8f890330b370028972798d786e28 (diff) | |
qmlls: implement Find-usages for JS variables
Added the find usages module boilerplate for qmlls and a first
implementation to find usages of JS-declared variables.
A test was added to tst_qmlls_utils to see if the usages can be
found and another one in tst_qmlls_modules to see if the usages are
correctly communicated to the language client (with an extra check
that uris are passed with their "file://"-prefix from qmlls).
Future commits will implement the Find-usages for QmlObject ids,
properties and functions (signals, methods, slots, handlers, ...).
Added QQmlLSUtils::qmlLocationToLspLocation for convertion from
QQmlJS::SourceLocation and QLspSpecification::Range that takes care,
among other things, of 1-based to 0-based line and row conversions.
Changed the VariableDeclarationEntry to contain a IdentifierExpression,
as this allows to find "usages" in the definitions. Adapt the tests to
this change.
Task-number: QTBUG-100084
Task-number: QTBUG-111415
Change-Id: I3a734f3ccf73fa88ed2f28b65ce2582461965ed1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
0 files changed, 0 insertions, 0 deletions
