SystemAppMonitor: Skip terminal app

This commit is contained in:
reionwong 2021-09-08 11:04:21 +08:00
parent ffe9852909
commit 9991e2ab91

View file

@ -113,6 +113,9 @@ void SystemAppMonitor::addApplication(const QString &filePath)
desktop.setIniCodec("UTF-8"); desktop.setIniCodec("UTF-8");
desktop.beginGroup("Desktop Entry"); desktop.beginGroup("Desktop Entry");
if (desktop.value("Terminal").toBool())
return;
if (desktop.contains("OnlyShowIn")) { if (desktop.contains("OnlyShowIn")) {
const QString &value = desktop.value("OnlyShowIn").toString(); const QString &value = desktop.value("OnlyShowIn").toString();
if (!value.contains(detectDesktopEnvironment(), Qt::CaseInsensitive)) { if (!value.contains(detectDesktopEnvironment(), Qt::CaseInsensitive)) {