[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498
Maximiliano Curia
maxy at moszumanska.debian.org
Fri Oct 14 14:27:44 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=db0d30e
The following commit has been merged in the master branch:
commit db0d30e2e94b54f938d5dd31801c7dd3d907cdb0
Author: Aleix Pol <aleixpol at kde.org>
Date: Fri Jun 27 16:18:43 2014 +0200
When listing from the cli, display if a device is paired.
---
cli/kdeconnect-cli.cpp | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/cli/kdeconnect-cli.cpp b/cli/kdeconnect-cli.cpp
index d7f0da3..a4c4fd8 100644
--- a/cli/kdeconnect-cli.cpp
+++ b/cli/kdeconnect-cli.cpp
@@ -49,10 +49,21 @@ int main(int argc, char** argv)
devices.setDisplayFilter(DevicesModel::StatusUnknown);
for(int i=0, rows=devices.rowCount(); i<rows; ++i) {
QModelIndex idx = devices.index(i);
- bool isParied = idx.data(DevicesModel::IsPairedRole).toBool();
+ QString statusInfo;
+ switch(idx.data(DevicesModel::StatusModelRole).toInt()) {
+ case DevicesModel::StatusPaired:
+ statusInfo = "(paired)";
+ break;
+ case DevicesModel::StatusReachable:
+ statusInfo = "(reachable)";
+ break;
+ case DevicesModel::StatusReachable | DevicesModel::StatusPaired:
+ statusInfo = "(paired and reachable)";
+ break;
+ }
std::cout << "- " << idx.data(Qt::DisplayRole).toString().toStdString()
- << ": " << idx.data(DevicesModel::IdModelRole).toString().toStdString() << (isParied ? " (paired)" : "") << std::endl;
+ << ": " << idx.data(DevicesModel::IdModelRole).toString().toStdString() << ' ' << statusInfo.toStdString() << std::endl;
}
std::cout << devices.rowCount() << " devices found" << std::endl;
} else {
--
kdeconnect packaging
More information about the pkg-kde-commits
mailing list