-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: port most dbus calls to org.kde.plasma.workspace.dbus
calling org.kde.PlasmaShell.evaluateScript crashes crashes plasma for some reason so that one still uses gdbus for now
- Loading branch information
1 parent
4c347f5
commit 09dca49
Showing
4 changed files
with
100 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
pragma ComponentBehavior: Bound | ||
pragma ValueTypeBehavior: Addressable | ||
|
||
import QtQuick | ||
import org.kde.plasma.workspace.dbus as DBus | ||
|
||
QtObject { | ||
id: root | ||
property string busType: DBus.BusType.Session | ||
property string service: "" | ||
property string objectPath: "" | ||
property string iface: "" | ||
property string method: "" | ||
property var arguments: [] | ||
property var signature: null | ||
property var inSignature: null | ||
|
||
property DBus.dbusMessage msg: { | ||
"service": root.service, | ||
"path": root.objectPath, | ||
"iface": root.iface, | ||
"member": root.method, | ||
"arguments": root.arguments, | ||
"signature": root.signature, | ||
"inSignature": root.inSignature, | ||
} | ||
|
||
function call(callback) { | ||
const reply = DBus.SessionBus.asyncCall(root.msg) as DBus.DBusPendingReply | ||
if (callback) { | ||
reply.finished.connect(() => callback(reply)) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters