Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/xwindowtasksmodel.cpp
Show First 20 Lines • Show All 478 Lines • ▼ Show 20 Line(s) | 478 | { | |||
---|---|---|---|---|---|
479 | const KWindowInfo *info = windowInfo(window); | 479 | const KWindowInfo *info = windowInfo(window); | ||
480 | 480 | | |||
481 | QString desktopFile = QString::fromUtf8(info->desktopFileName()); | 481 | QString desktopFile = QString::fromUtf8(info->desktopFileName()); | ||
482 | 482 | | |||
483 | if (!desktopFile.isEmpty()) { | 483 | if (!desktopFile.isEmpty()) { | ||
484 | KService::Ptr service = KService::serviceByStorageId(desktopFile); | 484 | KService::Ptr service = KService::serviceByStorageId(desktopFile); | ||
485 | 485 | | |||
486 | if (service) { | 486 | if (service) { | ||
487 | const QString &menuId = service->menuId(); | ||||
488 | | ||||
489 | if (!menuId.isEmpty()) { | ||||
490 | return QUrl(QStringLiteral("applications:") + menuId); | ||||
491 | } | ||||
492 | | ||||
487 | return QUrl::fromLocalFile(service->entryPath()); | 493 | return QUrl::fromLocalFile(service->entryPath()); | ||
488 | } | 494 | } | ||
489 | 495 | | |||
490 | if (!desktopFile.endsWith(QLatin1String(".desktop"))) { | 496 | if (!desktopFile.endsWith(QLatin1String(".desktop"))) { | ||
491 | desktopFile.append(QLatin1String(".desktop")); | 497 | desktopFile.append(QLatin1String(".desktop")); | ||
492 | } | 498 | } | ||
493 | 499 | | |||
494 | if (KDesktopFile::isDesktopFile(desktopFile) && QFile::exists(desktopFile)) { | 500 | if (KDesktopFile::isDesktopFile(desktopFile) && QFile::exists(desktopFile)) { | ||
▲ Show 20 Lines • Show All 559 Lines • Show Last 20 Lines |