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

Laszlo Papp lpapp at kde.org
Mon Jan 30 00:12:46 GMT 2012


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


An option for using Q_PROPERTY macros with NOTIFY signals might make a bit more sense since that is even handier to use than Q_INVOKABLE methods for settings (read/write) in QML. We would also have an "onFoobarChanged" signal handler then in QML for these properties. I am eager to implement that, but it is going to be a bit more intrusive patch, and work from me.

- Laszlo Papp


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/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/20120130/67e10866/attachment.htm>


More information about the kde-core-devel mailing list