[CLI] Unpair unreachable devices

Summary: You should be ableto unpair unreachable devices with the CLI

Reviewers: kdeconnect, albertvaka

Reviewed By: albertvaka

Subscribers: albertvaka

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D15677
This commit is contained in:
Thomas Surrel 2018-09-24 15:58:48 +02:00 committed by Nicolas Fella
parent 14994132f8
commit 5ae67e0feb

View file

@ -197,9 +197,7 @@ int main(int argc, char** argv)
blockOnReply(iface.releaseDiscoveryMode(id));
} else if(parser.isSet(QStringLiteral("unpair"))) {
DeviceDbusInterface dev(device);
if (!dev.isReachable()) {
QTextStream(stderr) << i18n("Device does not exist") << endl;
} else if(!dev.isTrusted()) {
if (!dev.isTrusted()) {
QTextStream(stderr) << i18n("Already not paired") << endl;
} else {
QTextStream(stderr) << i18n("Unpaired") << endl;