Does Kwin script's callDBus support a{sv} argument type?

Phương Lê Hoàng lehoangphuongbg at
Wed Mar 10 11:43:44 GMT 2021

Hi all,

I'm writing a Kwin script to automatically set an unread count badge to an
app's launcher icon by parsing its title.

I'm stuck at the part where I need to call an DBus API, but always get
"Received D-Bus message is error". I appreciate any help to show me where I
got it wrong, or callDBus just doesn't support passing a{sv} argument yet.

This is the method that I need to call:

I can use gdbus and it successfully update the launcher's icon badge:

gdbus emit --session --object-path /com/canonical/unity/launcherentry/1
--signal com.canonical.Unity.LauncherEntry.Update
"{'count-visible': <true>, 'count': <2>}"

But when I attempt to use callDBus in my script, it fails:

  "com.canonical.Unity", // Service
  "/com/canonical/unity/launcherentry/1", // Path
  "com.canonical.Unity.LauncherEntry", // Interface
  "Update", // Method
  { "count-visible": true, count: 1 }

I tried to read the source code of callDBus and failed to understand
whether it supports a{sv} or not, since I'm not familiar with Qt and C++.

Thanks in advance for any help.
Le Phuong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-devel mailing list