From af02c8d61370cb02256fc147312e2adedee6c6e5 Mon Sep 17 00:00:00 2001 From: sunfengsheng <327123947@qq.com> Date: Thu, 11 Mar 2021 14:19:04 +0800 Subject: [PATCH 1/2] fix:Type a lot of space, and you'll still see a lot of app names http://172.17.66.192/biz/bug-view-42203.html --- libsearch/appsearch/app-match.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libsearch/appsearch/app-match.cpp b/libsearch/appsearch/app-match.cpp index 45439f3..4b115d7 100644 --- a/libsearch/appsearch/app-match.cpp +++ b/libsearch/appsearch/app-match.cpp @@ -60,6 +60,8 @@ AppMatch::~AppMatch(){ void AppMatch::startMatchApp(QString input,QMap &installed,QMap &softwarereturn){ input.replace(" ",""); + if(input.isEmpty()) + return; m_sourceText=input; getAppName(installed); softWareCenterSearch(softwarereturn); From 08039bebf81ffef450811db2ebe40ec118325d8b Mon Sep 17 00:00:00 2001 From: sunfengsheng <327123947@qq.com> Date: Thu, 11 Mar 2021 15:12:26 +0800 Subject: [PATCH 2/2] fix:In English mode, if you search for Peony or Terminal, you will not find the correct application link:http://172.17.66.192/biz/bug-view-42345.html --- libsearch/appsearch/app-match.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsearch/appsearch/app-match.cpp b/libsearch/appsearch/app-match.cpp index 4b115d7..5ae27ad 100644 --- a/libsearch/appsearch/app-match.cpp +++ b/libsearch/appsearch/app-match.cpp @@ -105,7 +105,7 @@ void AppMatch::getAllDesktopFilePath(QString path){ //过滤LXQt、KDE QString filePathStr=fileInfo.filePath(); if(filePathStr.contains("KDE",Qt::CaseInsensitive)|| - filePathStr.contains("mate",Qt::CaseInsensitive)|| +// filePathStr.contains("mate",Qt::CaseInsensitive)|| filePathStr.contains("LX",Qt::CaseInsensitive) ){ i++; continue; @@ -214,7 +214,7 @@ void AppMatch::getDesktopFilePath() 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-trash.desktop"); - m_filePathList.append("/usr/share/applications/peony.desktop"); +// m_filePathList.append("/usr/share/applications/peony.desktop"); //v10 m_filePathList.append("/usr/share/applications/mate-about.desktop");