fix(app-database):classClass为空时会找错desktop文件的问题.

This commit is contained in:
JunjieBai 2024-04-07 16:46:48 +08:00
parent 3becb85efe
commit ac16ee994a
1 changed files with 1 additions and 1 deletions

View File

@ -1313,7 +1313,7 @@ QString AppDBManager::tranWinIdToDesktopFilePath(const QDBusVariant &id)
}
}
//没有查到
if (desktopFilePath.isEmpty()) {
if (desktopFilePath.isEmpty() && !classClass.isEmpty()) {
query.prepare("SELECT DESKTOP_FILE_PATH, START_UP_WMCLASS FROM APPINFO WHERE EXEC LIKE :classClass OR DESKTOP_FILE_PATH LIKE :classClass");
query.bindValue(":classClass", "%" + classClass + "%");