forked from openkylin/ukui-menu
过滤autostart目录应用desktop文件
This commit is contained in:
parent
1506d60e5c
commit
f37cf0ece0
|
@ -109,6 +109,7 @@ void AppDataWorker::initAppData()
|
|||
<< UkuiSearch::ApplicationProperty::Property::Category
|
||||
<< UkuiSearch::ApplicationProperty::Property::FirstLetterAll
|
||||
<< UkuiSearch::ApplicationProperty::Property::DontDisplay
|
||||
<< UkuiSearch::ApplicationProperty::Property::AutoStart
|
||||
<< UkuiSearch::ApplicationProperty::Property::InsertTime
|
||||
<< UkuiSearch::ApplicationProperty::Property::Launched;
|
||||
m_appPropertyMap.insert(UkuiSearch::ApplicationProperty::Property::DontDisplay, 0);
|
||||
|
@ -172,13 +173,19 @@ void AppDataWorker::appendApps(const QStringList &infos, QList<DataEntity> &apps
|
|||
{
|
||||
QMutexLocker locker(&m_appManager->m_mutex);
|
||||
for (const QString &info : infos) {
|
||||
UkuiSearch::ApplicationPropertyMap appinfo = m_applicationInfo->getInfo(info, m_appProperties);
|
||||
if (appinfo.value(UkuiSearch::ApplicationProperty::Property::DontDisplay).toInt() == 0) {
|
||||
DataEntity app;
|
||||
addInfoToApp(appinfo, app);
|
||||
m_appManager->m_normalApps.insert(app.id(), app);
|
||||
apps.append(app);
|
||||
const UkuiSearch::ApplicationPropertyMap appInfo = m_applicationInfo->getInfo(info, m_appProperties);
|
||||
if (appInfo.value(UkuiSearch::ApplicationProperty::Property::DontDisplay).toInt() != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (appInfo.value(UkuiSearch::ApplicationProperty::Property::AutoStart).toInt() != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
DataEntity app;
|
||||
addInfoToApp(appInfo, app);
|
||||
m_appManager->m_normalApps.insert(app.id(), app);
|
||||
apps.append(app);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue