Changeset View
Changeset View
Standalone View
Standalone View
libtaskmanager/xwindowtasksmodel.cpp
Show First 20 Lines • Show All 631 Lines • ▼ Show 20 Line(s) | 535 | if (!classClass.isEmpty()) { | |||
---|---|---|---|---|---|
632 | 632 | | |||
633 | // Try matching mapped name against DesktopEntryName. | 633 | // Try matching mapped name against DesktopEntryName. | ||
634 | if (!mapped.isEmpty() && services.empty()) { | 634 | if (!mapped.isEmpty() && services.empty()) { | ||
635 | services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), QStringLiteral("exist Exec and ('%1' =~ DesktopEntryName)").arg(mapped)); | 635 | services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), QStringLiteral("exist Exec and ('%1' =~ DesktopEntryName)").arg(mapped)); | ||
636 | } | 636 | } | ||
637 | 637 | | |||
638 | // Try matching mapped name against 'Name'. | 638 | // Try matching mapped name against 'Name'. | ||
639 | if (!mapped.isEmpty() && services.empty()) { | 639 | if (!mapped.isEmpty() && services.empty()) { | ||
640 | services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), QStringLiteral("exist Exec and ('%1' =~ Name)").arg(mapped)); | 640 | services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), QStringLiteral("exist Exec and ('%1' =~ Name) and (not exist NoDisplay or not NoDisplay)").arg(mapped)); | ||
641 | } | 641 | } | ||
642 | 642 | | |||
643 | // Try matching WM_CLASS general class against DesktopEntryName. | 643 | // Try matching WM_CLASS general class against DesktopEntryName. | ||
644 | if (services.empty()) { | 644 | if (services.empty()) { | ||
645 | services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), QStringLiteral("exist Exec and ('%1' =~ DesktopEntryName)").arg(classClass)); | 645 | services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), QStringLiteral("exist Exec and ('%1' =~ DesktopEntryName)").arg(classClass)); | ||
646 | } | 646 | } | ||
broulik: Remove | |||||
647 | 647 | | |||
648 | // Try matching WM_CLASS general class against 'Name'. | 648 | // Try matching WM_CLASS general class against 'Name'. | ||
649 | // This has a shaky chance of success as WM_CLASS is untranslated, but 'Name' may be localized. | 649 | // This has a shaky chance of success as WM_CLASS is untranslated, but 'Name' may be localized. | ||
650 | if (services.empty()) { | 650 | if (services.empty()) { | ||
651 | services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), QStringLiteral("exist Exec and ('%1' =~ Name)").arg(classClass)); | 651 | services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), QStringLiteral("exist Exec and ('%1' =~ Name) and (not exist NoDisplay or not NoDisplay)").arg(classClass)); | ||
652 | } | 652 | } | ||
653 | } | 653 | } | ||
654 | 654 | | |||
655 | // Ok, absolute *last* chance, try matching via pid (but only if we have not already tried this!) ... | 655 | // Ok, absolute *last* chance, try matching via pid (but only if we have not already tried this!) ... | ||
656 | if (services.empty() && !triedPid) { | 656 | if (services.empty() && !triedPid) { | ||
657 | services = servicesFromPid(pid); | 657 | services = servicesFromPid(pid); | ||
658 | } | 658 | } | ||
659 | } | 659 | } | ||
▲ Show 20 Lines • Show All 713 Lines • Show Last 20 Lines |
Remove