commit
4ca0bc1ff3
|
@ -256,6 +256,8 @@ void AppMatch::getAppName(QMap<NameString,QStringList> &installed)
|
||||||
void AppMatch::appNameMatch(QString appname,QMap<NameString,QStringList> &installed){
|
void AppMatch::appNameMatch(QString appname,QMap<NameString,QStringList> &installed){
|
||||||
NameString name{appname};
|
NameString name{appname};
|
||||||
QStringList list;
|
QStringList list;
|
||||||
|
QStringList pinyinlist;
|
||||||
|
pinyinlist=FileUtils::findMultiToneWords(appname);
|
||||||
QMapIterator<NameString,QStringList> iter(m_installAppMap);
|
QMapIterator<NameString,QStringList> iter(m_installAppMap);
|
||||||
while(iter.hasNext())
|
while(iter.hasNext())
|
||||||
{
|
{
|
||||||
|
@ -270,18 +272,21 @@ void AppMatch::appNameMatch(QString appname,QMap<NameString,QStringList> &instal
|
||||||
installed.insert(name,list);
|
installed.insert(name,list);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString shouzimu=FileUtils::findMultiToneWords(appname).at(1);// 中文转首字母
|
for(int i;i<pinyinlist.size()/2;i++){
|
||||||
if(shouzimu.contains(m_sourceText,Qt::CaseInsensitive)){
|
QString shouzimu=pinyinlist.at(2*i+1);// 中文转首字母
|
||||||
// installed.insert(name,m_installAppMap.value(name));
|
if(shouzimu.contains(m_sourceText,Qt::CaseInsensitive)){
|
||||||
installed.insert(name,list);
|
// installed.insert(name,m_installAppMap.value(name));
|
||||||
return;
|
installed.insert(name,list);
|
||||||
}
|
return;
|
||||||
if(m_sourceText.size()<2)
|
}
|
||||||
return;
|
if(m_sourceText.size()<2)
|
||||||
QString pinyin=FileUtils::findMultiToneWords(appname).at(0);// 中文转拼音
|
return;
|
||||||
if(pinyin.contains(m_sourceText,Qt::CaseInsensitive)){
|
QString pinyin=pinyinlist.at(2*i);// 中文转拼音
|
||||||
// installed.insert(name,m_installAppMap.value(name));
|
if(pinyin.contains(m_sourceText,Qt::CaseInsensitive)){
|
||||||
installed.insert(name,list);
|
// installed.insert(name,m_installAppMap.value(name));
|
||||||
|
installed.insert(name,list);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue