diff --git a/ukui-search-app-data-service/app-db-manager.cpp b/ukui-search-app-data-service/app-db-manager.cpp index 18b9dd3..1d6f023 100644 --- a/ukui-search-app-data-service/app-db-manager.cpp +++ b/ukui-search-app-data-service/app-db-manager.cpp @@ -1540,9 +1540,9 @@ QString AppDBManager::tranWinIdToDesktopFilePath(const QDBusVariant &id) QString classClass = info.windowClassClass(); //the 2nd part of WM_CLASS, specified by the application writer QSqlQuery query(m_database); query.setForwardOnly(true); - query.prepare("SELECT DESKTOP_FILE_PATH, START_UP_WMCLASS FROM APPINFO WHERE EXEC LIKE :classClass OR DESKTOP_FILE_PATH LIKE :classClass OR START_UP_WMCLASS=:windowClassClass"); + query.prepare("SELECT DESKTOP_FILE_PATH, START_UP_WMCLASS FROM APPINFO WHERE EXEC LIKE :classClass OR DESKTOP_FILE_PATH LIKE :classClass OR LOWER(START_UP_WMCLASS)=:windowClassClass"); query.bindValue(":classClass", "%" + classClass + "%"); - query.bindValue(":windowClassClass", classClass); + query.bindValue(":windowClassClass", classClass.toLower()); if (query.exec()) { QMap wmClassInfos; @@ -1557,7 +1557,7 @@ QString AppDBManager::tranWinIdToDesktopFilePath(const QDBusVariant &id) if (it.key().startsWith(AUTOSTART_APP_DESKTOP_PATH)) { continue; } - if (it.key().section("/", -1) == (classClass + ".desktop") || it.value() == classClass) { + if (it.key().section("/", -1) == (classClass + ".desktop") || it.value().toLower() == classClass.toLower()) { desktopFilePath = it.key(); break; }