Should Help the PersonActionsModel work on QML
Details
Diff Detail
- Repository
- R307 KPeople
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
I thought you need some kind of qmlRegisterType<KPeople::staticMetaObject()> in order to use it?
(but if it does work as-is, ship it)
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. :/
CI = not happy
src/declarative/peopleqmlplugin.cpp:73: undefined reference to `KPeople::staticMetaObject'
Had to revert the commit, it broke with GCC.
https://commits.kde.org/kpeople/b495b1a260cd15463a03ee47614b783ae8c2203d