From e7c127c291d3abfbcf715b3a58a19d3628afc079 Mon Sep 17 00:00:00 2001 From: reionwong Date: Sun, 29 Aug 2021 04:16:41 +0800 Subject: [PATCH] Better handle OnlyShowIn --- src/launchermodel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/launchermodel.cpp b/src/launchermodel.cpp index 16175a0..56dfdeb 100755 --- a/src/launchermodel.cpp +++ b/src/launchermodel.cpp @@ -262,10 +262,10 @@ void LauncherModel::addApp(const QString &fileName) return; if (desktop.contains("OnlyShowIn")) { - const QString &value = desktop.value("OnlyShowIn").toString(); - if (!value.contains(detectDesktopEnvironment(), Qt::CaseInsensitive)) { + const QStringList items = desktop.value("OnlyShowIn").toString().split(';'); + + if (!items.contains(detectDesktopEnvironment())) return; - } } if (desktop.value("NoDisplay").toBool() ||