From 53f36107b2ea8624007d9967ba17566e1999f77f Mon Sep 17 00:00:00 2001 From: JunjieBai Date: Thu, 14 Sep 2023 14:39:32 +0800 Subject: [PATCH] =?UTF-8?q?feat(frontend):=E4=BF=AE=E6=94=B9=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=96=B9=E5=BC=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libsearch/settingsearch/settings-search-plugin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libsearch/settingsearch/settings-search-plugin.cpp b/libsearch/settingsearch/settings-search-plugin.cpp index 3c1f83f..65c7419 100644 --- a/libsearch/settingsearch/settings-search-plugin.cpp +++ b/libsearch/settingsearch/settings-search-plugin.cpp @@ -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); }