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

Laszlo Papp lpapp at kde.org
Sat Jan 28 20:39:58 GMT 2012


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

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/20120128/6333ab98/attachment.htm>


More information about the kde-core-devel mailing list