Changeset View
Changeset View
Standalone View
Standalone View
soliduiserver/soliduiserver.cpp
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 58 | if (m_udiToActionsDialog.contains(udi)) { | |||
---|---|---|---|---|---|
59 | DeviceActionsDialog *dialog = m_udiToActionsDialog[udi]; | 59 | DeviceActionsDialog *dialog = m_udiToActionsDialog[udi]; | ||
60 | dialog->activateWindow(); | 60 | dialog->activateWindow(); | ||
61 | return; | 61 | return; | ||
62 | } | 62 | } | ||
63 | 63 | | |||
64 | 64 | | |||
65 | QList<DeviceAction*> actions; | 65 | QList<DeviceAction*> actions; | ||
66 | 66 | | |||
67 | foreach (const QString &desktop, desktopFiles) { | 67 | for (const QString &desktop : desktopFiles) { | ||
68 | const QString filePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "solid/actions/"+desktop); | 68 | const QString filePath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "solid/actions/"+desktop); | ||
69 | 69 | | |||
70 | QList<KServiceAction> services = KDesktopFileActions::userDefinedServices(filePath, true); | 70 | const QList<KServiceAction> services = KDesktopFileActions::userDefinedServices(filePath, true); | ||
71 | 71 | | |||
72 | foreach (const KServiceAction &service, services) { | 72 | for (const KServiceAction &service : services) { | ||
73 | DeviceServiceAction *action = new DeviceServiceAction(); | 73 | DeviceServiceAction *action = new DeviceServiceAction(); | ||
74 | action->setService(service); | 74 | action->setService(service); | ||
75 | actions << action; | 75 | actions << action; | ||
76 | } | 76 | } | ||
77 | } | 77 | } | ||
78 | 78 | | |||
79 | // Only one action, execute directly | 79 | // Only one action, execute directly | ||
80 | if (actions.size()==1) { | 80 | if (actions.size()==1) { | ||
▲ Show 20 Lines • Show All 155 Lines • Show Last 20 Lines |