D25727: Expose enum to the metaobject compiler

Linus Jahn noreply at phabricator.kde.org
Wed Dec 4 12:06:24 GMT 2019


lnj added a comment.


  The ActionsTypes are already registered using a wrapper class (this was required before Qt 5.8 / Q_NAMESPACE) in peopleqmlplugin.cpp. The Q_NAMESPACE solution would be better I think.
  
  And yes, the namespace still needs to be registered using e.g. `qmlRegisterUncreatableMetaObject(KPeople::staticMetaObject, uri, 1, 0, "KPeople", QStringLiteral("Access to enums & flags only"));` (see https://doc.qt.io/qt-5/qqmlengine.html#qmlRegisterUncreatableMetaObject).
  
  I tried to test this but it gave me a linker error about `KPeople::staticMetaObject` although kpeopledeclarative is linking against kpeoplewidgets whichs adds the meta object. :/

REPOSITORY
  R307 KPeople

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

To: apol, jbbgameich
Cc: lnj, davidedmundson, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191204/b941c2e4/attachment.html>


More information about the Kde-frameworks-devel mailing list