Merge pull request #168 from sunfengsheng/main

fix:Type a lot of space, and you'll still see a lot of app names
This commit is contained in:
iaom 2021-03-11 22:34:46 +08:00 committed by GitHub
commit 19f9017121
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -60,6 +60,8 @@ AppMatch::~AppMatch(){
void AppMatch::startMatchApp(QString input,QMap<NameString,QStringList> &installed,QMap<NameString,QStringList> &softwarereturn){ void AppMatch::startMatchApp(QString input,QMap<NameString,QStringList> &installed,QMap<NameString,QStringList> &softwarereturn){
input.replace(" ",""); input.replace(" ","");
if(input.isEmpty())
return;
m_sourceText=input; m_sourceText=input;
getAppName(installed); getAppName(installed);
softWareCenterSearch(softwarereturn); softWareCenterSearch(softwarereturn);
@ -103,7 +105,7 @@ void AppMatch::getAllDesktopFilePath(QString path){
//过滤LXQt、KDE //过滤LXQt、KDE
QString filePathStr=fileInfo.filePath(); QString filePathStr=fileInfo.filePath();
if(filePathStr.contains("KDE",Qt::CaseInsensitive)|| if(filePathStr.contains("KDE",Qt::CaseInsensitive)||
filePathStr.contains("mate",Qt::CaseInsensitive)|| // filePathStr.contains("mate",Qt::CaseInsensitive)||
filePathStr.contains("LX",Qt::CaseInsensitive) ){ filePathStr.contains("LX",Qt::CaseInsensitive) ){
i++; i++;
continue; continue;
@ -212,7 +214,7 @@ void AppMatch::getDesktopFilePath()
m_filePathList.append("/usr/share/applications/peony-computer.desktop"); m_filePathList.append("/usr/share/applications/peony-computer.desktop");
m_filePathList.append("/usr/share/applications/peony-home.desktop"); m_filePathList.append("/usr/share/applications/peony-home.desktop");
m_filePathList.append("/usr/share/applications/peony-trash.desktop"); m_filePathList.append("/usr/share/applications/peony-trash.desktop");
m_filePathList.append("/usr/share/applications/peony.desktop"); // m_filePathList.append("/usr/share/applications/peony.desktop");
//v10 //v10
m_filePathList.append("/usr/share/applications/mate-about.desktop"); m_filePathList.append("/usr/share/applications/mate-about.desktop");