D11830: Switch the pkpass formatter plugin to use KPkPass

Sandro Knauß noreply at phabricator.kde.org
Sat Mar 31 22:28:50 BST 2018


knauss added inline comments.

INLINE COMMENTS

> vkrause wrote in pkpass_plugin.cpp:105
> How? I did not find a way to add string conversions for custom types externally. And I can't do this in Grantlee itself, as it would add a dependency on QtGui which it currently does not have.

use something like this:
GRANTLEE_BEGIN_LOOKUP(QColor)
if ( property == "name" )
return object.name();
else if ( property == "age" )
return object.age();
else
return object.name()
GRANTLEE_END_LOOKUP

http://www.grantlee.org/apidox/generic_types_and_templates.html

and see messagelib/messageviewer/src/messagepartthemes/default/messagepartrenderermanager.cpp for more examples...

REPOSITORY
  R81 KDE PIM Addons

REVISION DETAIL
  https://phabricator.kde.org/D11830

To: vkrause, #kde_pim
Cc: knauss, dvasin, winterz, vkrause, mlaurent, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20180331/c9994752/attachment.html>


More information about the kde-pim mailing list