From 0e7d204f11d7d09798bca8e09f5f18d231fe3a37 Mon Sep 17 00:00:00 2001 From: JunjieBai Date: Tue, 18 Apr 2023 11:38:00 +0800 Subject: [PATCH] Fix the problem that the app search results contatins the auto-start apps. --- libsearch/searchinterface/searchtasks/app-search-task.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libsearch/searchinterface/searchtasks/app-search-task.cpp b/libsearch/searchinterface/searchtasks/app-search-task.cpp index 3db3dce..24155d6 100644 --- a/libsearch/searchinterface/searchtasks/app-search-task.cpp +++ b/libsearch/searchinterface/searchtasks/app-search-task.cpp @@ -89,7 +89,6 @@ AppSearchWorker::AppSearchWorker(AppSearchTask *AppSarchTask): m_appSearchTask(A void AppSearchWorker::run() { - QStringList results; ApplicationProperties applicationProperties; SearchResultProperties properties = m_appSearchTask->m_searchController->getResultProperties(SearchProperty::SearchType::Application); if(properties.contains(SearchProperty::SearchResultProperty::ApplicationDesktopPath)) { @@ -101,7 +100,7 @@ void AppSearchWorker::run() if(properties.contains(SearchProperty::SearchResultProperty::ApplicationIconName)) { applicationProperties.append(ApplicationProperty::Icon); } - ApplicationInfoMap data = m_appSearchTask->m_appinfo.searchApp(applicationProperties, m_appSearchTask->m_searchController->getKeyword(), ApplicationPropertyMap{{ApplicationProperty::DontDisplay, 0}}); + ApplicationInfoMap data = m_appSearchTask->m_appinfo.searchApp(applicationProperties, m_appSearchTask->m_searchController->getKeyword(), ApplicationPropertyMap{{ApplicationProperty::DontDisplay, 0}, {ApplicationProperty::AutoStart, 0}}); for (const QString &desktop : data.keys()) { if (m_appSearchTask->m_searchController->beginSearchIdCheck(m_currentSearchId)) { ResultItem item(desktop);