Code optimization

This commit is contained in:
sunfengsheng 2021-02-26 11:38:22 +08:00
parent 0e771323a6
commit 883de524e3
2 changed files with 9 additions and 1 deletions

View File

@ -36,6 +36,13 @@ AppMatch::AppMatch(QObject *parent) : QObject(parent)
}
}
AppMatch::~AppMatch(){
if(m_interFace){
delete m_interFace;
m_interFace=NULL;
}
}
QStringList AppMatch::startMatchApp(QString input){
input.replace(" ","");
m_sourceText=input;

View File

@ -34,6 +34,7 @@ class AppMatch : public QObject
Q_OBJECT
public:
explicit AppMatch(QObject *parent = nullptr);
~AppMatch();
QStringList startMatchApp(QString input);
QMap<QString,QList<QString>> startMatchApp(QString input,int i);
@ -53,7 +54,7 @@ private:
QStringList m_filePathList;
QStringList m_returnResult;
QDBusInterface *m_interFace;
QDBusInterface *m_interFace=nullptr;
QMap<QString,QList<QString>> m_softWareCenterMap;
QMap<QString,QList<QString>> m_installAppMap;
QMap<QString,QList<QString>> m_filterInstallAppMap;