diff --git a/libsearch/appsearch/app-match.cpp b/libsearch/appsearch/app-match.cpp index c099ae8..2e541c1 100644 --- a/libsearch/appsearch/app-match.cpp +++ b/libsearch/appsearch/app-match.cpp @@ -256,6 +256,8 @@ void AppMatch::getAppName(QMap &installed) void AppMatch::appNameMatch(QString appname,QMap &installed){ NameString name{appname}; QStringList list; + QStringList pinyinlist; + pinyinlist=FileUtils::findMultiToneWords(appname); QMapIterator iter(m_installAppMap); while(iter.hasNext()) { @@ -270,18 +272,21 @@ void AppMatch::appNameMatch(QString appname,QMap &instal installed.insert(name,list); return; } - QString shouzimu=FileUtils::findMultiToneWords(appname).at(1);// 中文转首字母 - if(shouzimu.contains(m_sourceText,Qt::CaseInsensitive)){ -// installed.insert(name,m_installAppMap.value(name)); - installed.insert(name,list); - return; - } - if(m_sourceText.size()<2) - return; - QString pinyin=FileUtils::findMultiToneWords(appname).at(0);// 中文转拼音 - if(pinyin.contains(m_sourceText,Qt::CaseInsensitive)){ -// installed.insert(name,m_installAppMap.value(name)); - installed.insert(name,list); + for(int i;i