Review Request 118560: Recognize object bindings in QML files
Sven Brauch
svenbrauch at googlemail.com
Thu Jun 5 16:27:15 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118560/#review59347
-----------------------------------------------------------
Ship it!
Looks good! In general I think you could be a bit more exhaustive with your tests, e.g. test just Behaviour { } as well and a few variations of things -- that should make it more robust.
- Sven Brauch
On June 5, 2014, 11:11 a.m., Denis Steckelmacher wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118560/
> -----------------------------------------------------------
>
> (Updated June 5, 2014, 11:11 a.m.)
>
>
> Review request for KDevelop.
>
>
> Repository: kdev-qmljs
>
>
> Description
> -------
>
> Object bindings are objects bound to QML properties, and modifying them. The most used object binding is "Behavior on ... { }". This patch adds support for these object bindings, and recognize them as instances of QML components. In my previous example, a new subclass of Behavior is declared and can have its own properties, id, etc.
>
> The patch is quite simple and handles object bindings the same way as component subclasses were already handled. "Behavior on foo { ... }" is therefore handled exactly as if the user had typed "Behavior { ... }".
>
>
> Diffs
> -----
>
> duchain/declarationbuilder.h 908cdcf
> duchain/declarationbuilder.cpp 3e885ad
> tests/files/test.qml 8e06867
>
> Diff: https://git.reviewboard.kde.org/r/118560/diff/
>
>
> Testing
> -------
>
> A new unit test ensures that object bindings are properly recognized and act like normal component instantiations.
>
> Behavior on foo {
> id: behavior // This is an instance named "behavior" of an anonymous class inheriting from Behavior
> }
>
>
> Thanks,
>
> Denis Steckelmacher
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140605/eb8cc098/attachment.html>
More information about the KDevelop-devel
mailing list