From 610210a9a352bf68e353563e23aa465b0528d043 Mon Sep 17 00:00:00 2001 From: JunjieBai Date: Tue, 4 Apr 2023 17:00:16 +0800 Subject: [PATCH] Fix the problem that the infos of update signal are incomplete. --- ukui-search-app-data-service/app-db-manager.cpp | 4 ++-- ukui-search-app-data-service/app-db-manager.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ukui-search-app-data-service/app-db-manager.cpp b/ukui-search-app-data-service/app-db-manager.cpp index fee8e92..ee6b110 100644 --- a/ukui-search-app-data-service/app-db-manager.cpp +++ b/ukui-search-app-data-service/app-db-manager.cpp @@ -968,7 +968,7 @@ bool AppDBManager::handleFavoritesStateUpdate(const QString &desktopFilePath, co return res; } -bool AppDBManager::handleChangeFavoritesPos(const QString &desktopFilePath, const uint pos, const int previousPos, ApplicationInfoMap updatedInfo) +bool AppDBManager::handleChangeFavoritesPos(const QString &desktopFilePath, const uint pos, const int previousPos, ApplicationInfoMap &updatedInfo) { if (pos < 1) { qWarning() << "To be moved to a invalid favorites pos , I quit!!"; @@ -1165,7 +1165,7 @@ bool AppDBManager::handleTopStateUpdate(const QString &desktopFilePath, const ui return res; } -bool AppDBManager::handleChangeTopPos(const QString &desktopFilePath, uint pos, const int previousPos, ApplicationInfoMap updatedInfo) +bool AppDBManager::handleChangeTopPos(const QString &desktopFilePath, uint pos, const int previousPos, ApplicationInfoMap &updatedInfo) { if (pos < 1) { qWarning() << "To be moved to a invalid top pos , I quit!!"; diff --git a/ukui-search-app-data-service/app-db-manager.h b/ukui-search-app-data-service/app-db-manager.h index d9b4596..45db0f9 100644 --- a/ukui-search-app-data-service/app-db-manager.h +++ b/ukui-search-app-data-service/app-db-manager.h @@ -104,8 +104,8 @@ private: void initFileSystemWatcher(); //处理置顶收藏移动位置 - bool handleChangeFavoritesPos(const QString &desktopFilePath, const uint pos, const int previousPos, ApplicationInfoMap updatedInfo); - bool handleChangeTopPos(const QString &desktopFilePath, uint pos, const int previousPos, ApplicationInfoMap updatedInfo); + bool handleChangeFavoritesPos(const QString &desktopFilePath, const uint pos, const int previousPos, ApplicationInfoMap &updatedInfo); + bool handleChangeTopPos(const QString &desktopFilePath, uint pos, const int previousPos, ApplicationInfoMap &updatedInfo); private: static QMutex s_mutex;