feat(frontend):修改设置搜索结果显示方式.

This commit is contained in:
JunjieBai 2023-09-14 14:39:32 +08:00 committed by iaom
parent 0967eafc65
commit 53f36107b2
1 changed files with 6 additions and 0 deletions

View File

@ -439,6 +439,12 @@ void SettingsMatch::createResultInfo(SearchPluginIface::ResultInfo &resultInfo,
{
QLocale ql;
resultInfo.name = ql.language() == QLocale::English ? itemInfo.at(0) : itemInfo.at(1);
if (path.split("/").size() == 3) {
QStringList topInfo = m_dataMap.value(path.left(path.lastIndexOf("/")));
resultInfo.name.prepend("--");
resultInfo.name.prepend(ql.language() == QLocale::English ? topInfo.at(0) : topInfo.at(1));
}
resultInfo.icon = FileUtils::getSettingIcon();
resultInfo.actionKey = path.section("/", 1, 1);
}