Review Request 118560: Recognize object bindings in QML files
Denis Steckelmacher
steckdenis at yahoo.fr
Thu Jun 5 10:40:48 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118560/
-----------------------------------------------------------
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
-----
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/4ecd3b1c/attachment.html>
More information about the KDevelop-devel
mailing list