Use async dbus calls for checking plugin availability
This commit is contained in:
parent
b73f3d5a8a
commit
9a370da97b
1 changed files with 8 additions and 2 deletions
|
@ -38,8 +38,14 @@ QtObject {
|
|||
|
||||
Component.onCompleted: pluginsChanged()
|
||||
|
||||
readonly property var v: DBusAsyncResponse {
|
||||
id: response
|
||||
autoDelete: false
|
||||
onSuccess: { root.available = result; }
|
||||
onError: { root.available = false }
|
||||
}
|
||||
|
||||
function pluginsChanged() {
|
||||
var result = DBusResponseWaiter.waitForReply(device.hasPlugin("kdeconnect_" + pluginName))
|
||||
available = (result && result != "error");
|
||||
response.setPendingCall(device.hasPlugin("kdeconnect_" + pluginName))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue