Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/startuptasksmodel.cpp
Show First 20 Lines • Show All 187 Lines • ▼ Show 20 Line(s) | 158 | { | |||
---|---|---|---|---|---|
188 | 188 | | |||
189 | // Try via name ... | 189 | // Try via name ... | ||
190 | if (services.empty() && !name.isEmpty()) { | 190 | if (services.empty() && !name.isEmpty()) { | ||
191 | services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), | 191 | services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), | ||
192 | QStringLiteral("exist Exec and ('%1' =~ Name)").arg(name)); | 192 | QStringLiteral("exist Exec and ('%1' =~ Name)").arg(name)); | ||
193 | } | 193 | } | ||
194 | 194 | | |||
195 | if (!services.empty()) { | 195 | if (!services.empty()) { | ||
196 | const QString &menuId = services.at(0)->menuId(); | ||||
197 | | ||||
198 | if (!menuId.isEmpty()) { | ||||
199 | return QUrl(QStringLiteral("applications:") + menuId); | ||||
200 | } | ||||
201 | | ||||
196 | QString path = services.at(0)->entryPath(); | 202 | QString path = services.at(0)->entryPath(); | ||
197 | 203 | | |||
198 | if (path.isEmpty()) { | 204 | if (path.isEmpty()) { | ||
199 | path = services.at(0)->exec(); | 205 | path = services.at(0)->exec(); | ||
200 | } | 206 | } | ||
201 | 207 | | |||
202 | if (!path.isEmpty()) { | 208 | if (!path.isEmpty()) { | ||
203 | launcherUrl = QUrl::fromLocalFile(path); | 209 | launcherUrl = QUrl::fromLocalFile(path); | ||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |