Review Request 117971: Use QML qualified identifiers to build uses
Denis Steckelmacher
steckdenis at yahoo.fr
Sat May 3 13:03:07 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117971/
-----------------------------------------------------------
(Updated May 3, 2014, 1:03 p.m.)
Status
------
This change has been marked as submitted.
Review request for KDevelop.
Repository: kdev-qmljs
Description
-------
The Javascript parser builds IdentifierExpression AST nodes in Javascript files and UiQualifiedId AST nodes in QML files. This patch adds support for the latter ones in UseBuilder. This enables the QML/JS plugin to detect the use of QML components in QML files.
Diffs
-----
duchain/usebuilder.h 39605ac
duchain/usebuilder.cpp 3e5d0a1
Diff: https://git.reviewboard.kde.org/r/117971/diff/
Testing
-------
I don't know how to unit test the use builder, and I would welcome any hint about that :-) . I manually tested that the use of "Foo" in this snippet is correctly detected:
Component {
name: "Foo"
}
Foo {}
When I put my cursor on Foo, "Component" gets highlighted (because the declaration of Foo is located on the Component keyword). If I click on "show uses" in the information popup of "Component", the first line and the line instantiating Foo are listed.
Thanks,
Denis Steckelmacher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140503/258f90df/attachment.html>
More information about the KDevelop-devel
mailing list