Fix the problem that the app search results contatins the auto-start apps.

This commit is contained in:
JunjieBai 2023-04-18 11:38:00 +08:00
parent b59d0a57d8
commit 0e7d204f11
1 changed files with 1 additions and 2 deletions

View File

@ -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);