Changeset View
Changeset View
Standalone View
Standalone View
kio/kiokdeconnect.cpp
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Line(s) | |||||
79 | 79 | | |||
80 | } | 80 | } | ||
81 | 81 | | |||
82 | void KioKdeconnect::listAllDevices() | 82 | void KioKdeconnect::listAllDevices() | ||
83 | { | 83 | { | ||
84 | infoMessage(i18n("Listing devices...")); | 84 | infoMessage(i18n("Listing devices...")); | ||
85 | 85 | | |||
86 | //TODO: Change to all devices and show different icons for connected and disconnected? | 86 | //TODO: Change to all devices and show different icons for connected and disconnected? | ||
87 | QStringList devices = m_dbusInterface->devices(true, true); | 87 | const QStringList devices = m_dbusInterface->devices(true, true); | ||
88 | 88 | | |||
89 | Q_FOREACH(const QString& deviceId, devices) { | 89 | for (const QString& deviceId : devices) { | ||
90 | 90 | | |||
91 | DeviceDbusInterface interface(deviceId); | 91 | DeviceDbusInterface interface(deviceId); | ||
92 | 92 | | |||
93 | if (!interface.hasPlugin(QStringLiteral("kdeconnect_sftp"))) continue; | 93 | if (!interface.hasPlugin(QStringLiteral("kdeconnect_sftp"))) continue; | ||
94 | 94 | | |||
95 | const QString path = QStringLiteral("kdeconnect://").append(deviceId).append("/"); | 95 | const QString path = QStringLiteral("kdeconnect://").append(deviceId).append("/"); | ||
96 | const QString name = interface.name(); | 96 | const QString name = interface.name(); | ||
97 | const QString icon = QStringLiteral("kdeconnect"); | 97 | const QString icon = QStringLiteral("kdeconnect"); | ||
▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines |