kossebau added inline comments.

INLINE COMMENTS

> systemtray.h:100
>       */
> -    Q_INVOKABLE void reorderItemAfter(QQuickItem* after, QQuickItem* before);
> -
> -    Q_INVOKABLE bool isSystemTrayApplet(const QString &appletId);
> +    Q_INVOKABLE Plasma::Service *serviceForSource(const QString &source);
>  

Hi. Seeing this code, I have a question: from what I understood so far, for 
this method to be useable from the JavaScript inside QML, the type 
"Plasma::Service *" needs to be registered with at least

  qRegisterMetaType<Plasma::Service *>("Plasma::Service*");

or

  qRegisterMetaType<Plasma::Service *>();

Yet I have not found any code in Plasma related projects which calls this.

The module org.kde.plasma.core only has code to register the unnamespaced type 
name ""Service*" (indirectly via 
`qmlRegisterInterface<Plasma::Service>("Service");` which internally calls the 
equivalent of `qRegisterMetaType<Plasma::Service *>("Service*");`.

And the namespace in the registered type name string seems important, things 
broke elsewhere if the type signature used in the Q_INVOKABLE was different WRT 
namespace compared to the registered type name string.

Do you remember anything related or would have some insights?

REPOSITORY
  R120 Plasma Workspace

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

To: kmaterka, #plasma_workspaces, #plasma, davidedmundson, ngraham, broulik
Cc: kossebau, plasma-devel, Orage, LeGast00n, The-Feren-OS-Dev, cblack, 
jraleigh, zachus, fbampaloukas, ragreen, ZrenBot, ngraham, himcesjf, 
lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart

Reply via email to