D11830: Switch the pkpass formatter plugin to use KPkPass

Volker Krause noreply at phabricator.kde.org
Sun Apr 1 09:38:12 BST 2018


vkrause added inline comments.

INLINE COMMENTS

> knauss wrote in CMakeLists.txt:124
> the naming is also a little bit wired as we dont used this KPk before.

"KPk" is not the namespace here, "K" is. "PkPass" is the name of the file format (and Apple came up with that one, hard to change for me ;-) ).

> knauss wrote in CMakeLists.txt:15
> I think if i now enters KDE Pim it should exist in in KPim namespace.

That doesn't seem to be widely used, but I can of course change the library accordingly (it will need to be done there first though).

> knauss wrote in pkpass_plugin.cpp:105
> 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...

That's for property access to custom types, not for turning a custom type into a string (and it's in use in this file even). This is usable in theory by adding a dummy property such as "name" to QColor, but that is just as clunky as the current solution. What we would want is turning a QColor directly into a string, without any such indirection, and that's the part I haven't found a solution for yet.

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/20180401/d2e10723/attachment.html>


More information about the kde-pim mailing list