D26992: [SystemTray] Use unified data model everywhere

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Thu Jul 2 14:16:16 BST 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20200702/1167f626/attachment.htm>


More information about the Plasma-devel mailing list