From a4aef73312f5c7e4a1a24bfdc9ba3e749575a966 Mon Sep 17 00:00:00 2001 From: Nicolas Fella Date: Mon, 24 Dec 2018 23:40:07 +0100 Subject: [PATCH] [cli] Show all reachable devices Summary: Devices that were reachable but not paired were not shown. This makes it impossible to initiate paring BUG: 402088 Test Plan: Have a unpaired device reachable. Without the patch kdeconnect-cli -l does not show it. With the patch it is shown Reviewers: #kde_connect, albertvaka Reviewed By: #kde_connect, albertvaka Subscribers: kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D17788 --- cli/kdeconnect-cli.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/kdeconnect-cli.cpp b/cli/kdeconnect-cli.cpp index 9c69f4acb..35ab006f9 100644 --- a/cli/kdeconnect-cli.cpp +++ b/cli/kdeconnect-cli.cpp @@ -83,14 +83,14 @@ int main(int argc, char** argv) if (parser.isSet(QStringLiteral("my-id"))) { QTextStream(stdout) << iface.selfId() << endl; } else if (parser.isSet(QStringLiteral("l")) || parser.isSet(QStringLiteral("a"))) { - bool paired = true, reachable = false; + bool reachable = false; if (parser.isSet(QStringLiteral("a"))) { reachable = true; } else { blockOnReply(iface.acquireDiscoveryMode(id)); QThread::sleep(2); } - const QStringList devices = blockOnReply(iface.devices(reachable, paired)); + const QStringList devices = blockOnReply(iface.devices(reachable, false)); bool displayCount = true; for (const QString& id : devices) {