From 9c4e03ddbcdeb3a34931df63bb4bb9899b53010e Mon Sep 17 00:00:00 2001 From: sunfengsheng <327123947@qq.com> Date: Tue, 5 Jan 2021 17:13:13 -0800 Subject: [PATCH] Set the search to duplicate --- libsearch/appsearch/app-match.cpp | 2 +- libsearch/settingsearch/setting-match.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libsearch/appsearch/app-match.cpp b/libsearch/appsearch/app-match.cpp index 21e2bf2..f4ee40d 100644 --- a/libsearch/appsearch/app-match.cpp +++ b/libsearch/appsearch/app-match.cpp @@ -208,7 +208,7 @@ void AppMatch::getAppName() * desktop路径 */ void AppMatch::appNameMatch(QString appname,QString desktoppath){ - if(appname.contains(m_sourceText)){ + if(appname.contains(m_sourceText,Qt::CaseInsensitive)){ m_midResult.append(desktoppath); return; } diff --git a/libsearch/settingsearch/setting-match.cpp b/libsearch/settingsearch/setting-match.cpp index 9e5ba71..2327d86 100644 --- a/libsearch/settingsearch/setting-match.cpp +++ b/libsearch/settingsearch/setting-match.cpp @@ -94,11 +94,13 @@ QStringList SettingsMatch::matching(){ { str=key+"/"+str; returnresult.append(str);//中文名 + continue; } QString pinyin=FileUtils::findMultiToneWords(str).at(0);// 中文转拼音 if(pinyin.contains(m_sourceText,Qt::CaseInsensitive)){ str=key+"/"+str; returnresult.append(str); + continue; } QString shouzimu=FileUtils::findMultiToneWords(str).at(1);// 中文转首字母 if(shouzimu.contains(m_sourceText,Qt::CaseInsensitive)){