Fix photo plugin cli
This commit is contained in:
parent
c451d7064e
commit
01fa989786
1 changed files with 11 additions and 5 deletions
|
@ -265,8 +265,14 @@ int main(int argc, char** argv)
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/findmyphone"), QStringLiteral("org.kde.kdeconnect.device.findmyphone"), QStringLiteral("ring"));
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/findmyphone"), QStringLiteral("org.kde.kdeconnect.device.findmyphone"), QStringLiteral("ring"));
|
||||||
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
|
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
|
||||||
} else if(parser.isSet(QStringLiteral("photo"))) {
|
} else if(parser.isSet(QStringLiteral("photo"))) {
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/photo"), QStringLiteral("org.kde.kdeconnect.device.photo"), QStringLiteral("requestPhoto"));
|
if (parser.positionalArguments().size() == 1) {
|
||||||
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
|
const QString fileName = parser.positionalArguments()[0];
|
||||||
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/photo"), QStringLiteral("org.kde.kdeconnect.device.photo"), QStringLiteral("requestPhoto"));
|
||||||
|
msg.setArguments({fileName});
|
||||||
|
blockOnReply(DBusHelper::sessionBus().asyncCall(msg));
|
||||||
|
} else {
|
||||||
|
QTextStream(stderr) << i18n("Please give exactly 1 file name") << endl;
|
||||||
|
}
|
||||||
} else if(parser.isSet(QStringLiteral("send-keys"))) {
|
} else if(parser.isSet(QStringLiteral("send-keys"))) {
|
||||||
QString seq = parser.value(QStringLiteral("send-keys"));
|
QString seq = parser.value(QStringLiteral("send-keys"));
|
||||||
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/remotekeyboard"), QStringLiteral("org.kde.kdeconnect.device.remotekeyboard"), QStringLiteral("sendKeyPress"));
|
QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kdeconnect"), QStringLiteral("/modules/kdeconnect/devices/") + device + QStringLiteral("/remotekeyboard"), QStringLiteral("org.kde.kdeconnect.device.remotekeyboard"), QStringLiteral("sendKeyPress"));
|
||||||
|
|
Loading…
Reference in a new issue