Review Request: Add yet another code generation option for having invokable methods

David Faure faure at kde.org
Tue Oct 2 10:33:59 BST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103815/#review19738
-----------------------------------------------------------


Looks good, but a corresponding unit test is missing (the kconfig_compiler test framework is quite extensive, you can provide a "foo.cpp.ref" baseline which will contain the expected generated code.

- David Faure


On Jan. 28, 2012, 8:39 p.m., Laszlo Papp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103815/
> -----------------------------------------------------------
> 
> (Updated Jan. 28, 2012, 8:39 p.m.)
> 
> 
> Review request for kdelibs and David Faure.
> 
> 
> Description
> -------
> 
> The patch addresses the current issue, for instance with QML-based KDE UIs.
> There is no clean way currently for having, for example a Settings page for a
> KDE Mobile application, and interact with the backend (generated code)
> directly from the QML bits.
> 
> The current workaround is to have proxy methods in a helper class that are
> properly exposed to QML. There are no visible drawbacks for this extension as
> far as a programmer might wanna expose it on wish. :)
> 
> The patch has a minor "drawback" because it puts the "static" keyword in line
> with the rest of the method declaration, so resides the Q_INVOKABLE macro.  It
> is not any source or binary incompatible change though, just generated code-style
> internals. The patch is simpler and cleaner this way, and I personally prefer
> the not split declaration as well. Although this is behind the main point of
> the addition, thus can be altered, if needed.
> 
> 
> Diffs
> -----
> 
>   kdecore/kconfig_compiler/README.dox b9606f1 
>   kdecore/kconfig_compiler/kconfig_compiler.cpp 4203d30 
> 
> Diff: http://git.reviewboard.kde.org/r/103815/diff/
> 
> 
> Testing
> -------
> 
> Tested and works properly on Archlinux (build- and runtime). The Q_INVOKABLE
> accessor and mutator methods are properly generated. That said, it is being
> planned against the "frameworks" branch since no new features involved in the
> KDE4.X series anymore.
> 
> 
> Thanks,
> 
> Laszlo Papp
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20121002/d9a0cedb/attachment.htm>


More information about the kde-core-devel mailing list