diff --git a/ukui-search-app-data-service/app-db-manager.cpp b/ukui-search-app-data-service/app-db-manager.cpp index 79ac926..f06806b 100644 --- a/ukui-search-app-data-service/app-db-manager.cpp +++ b/ukui-search-app-data-service/app-db-manager.cpp @@ -891,7 +891,7 @@ bool AppDBManager::handleFavoritesStateUpdate(const QString &desktopfp, int num) qWarning() << "Fail to exec:" << cmd << "because:" << m_database.lastError(); } else { while (sql.next()) { - if (sql.value("FAVORITES").toInt() == num) { + if (num && sql.value("FAVORITES").toInt() == num) { res = false; if (sql.value("DESKTOP_FILE_PATH").toString() == desktopfp) { qWarning() << "favorites state has no changes, I quit!"; @@ -938,7 +938,7 @@ bool AppDBManager::handleTopStateUpdate(const QString &desktopfp, int num) qWarning() << "Fail to exec:" << cmd << "because:" << m_database.lastError(); } else { while (sql.next()) { - if (sql.value("TOP").toInt() == num) { + if (num && sql.value("TOP").toInt() == num) { res = false; if (sql.value("DESKTOP_FILE_PATH").toString() == desktopfp) { qWarning() << "top state has no changes, I quit!";