Modify app-match API
This commit is contained in:
parent
06420dccad
commit
71225ce64e
|
@ -43,25 +43,31 @@ AppMatch::~AppMatch(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList AppMatch::startMatchApp(QString input){
|
//QStringList AppMatch::startMatchApp(QString input){
|
||||||
input.replace(" ","");
|
// input.replace(" ","");
|
||||||
m_sourceText=input;
|
// m_sourceText=input;
|
||||||
m_softWareCenterMap.clear();
|
// m_softWareCenterMap.clear();
|
||||||
m_matchInstallAppMap.clear();
|
// m_matchInstallAppMap.clear();
|
||||||
m_returnResult1.clear();
|
// m_returnResult1.clear();
|
||||||
if(input.isEmpty()){
|
// if(input.isEmpty()){
|
||||||
return m_returnResult;
|
// return m_returnResult;
|
||||||
}
|
// }
|
||||||
softWareCenterSearch();
|
// softWareCenterSearch();
|
||||||
getAppName();
|
// getAppName();
|
||||||
returnAppMap();
|
// returnAppMap();
|
||||||
m_returnResult1=m_midResult;
|
// m_returnResult1=m_midResult;
|
||||||
m_midResult.clear();
|
// m_midResult.clear();
|
||||||
qWarning()<<"m_returnResult :"<<m_returnResult1;
|
// qWarning()<<"m_returnResult :"<<m_returnResult1;
|
||||||
return m_returnResult;
|
// return m_returnResult;
|
||||||
}
|
//}
|
||||||
|
|
||||||
QMap<QString,QList<QString>> AppMatch::startMatchApp(QString input,int i){
|
/**
|
||||||
|
* @brief AppMatch::startMatchApp 查询应用,含所有已安装与未安装
|
||||||
|
* @param input 关键词
|
||||||
|
* @param i
|
||||||
|
* @return QMap<QString,QList<QString>> QMap<应用名,{.desktop(未安装为空),图标(安装的是名字,未安装是路径)}>
|
||||||
|
*/
|
||||||
|
QMap<QString,QList<QString>> AppMatch::startMatchApp(QString input){
|
||||||
input.replace(" ","");
|
input.replace(" ","");
|
||||||
m_sourceText=input;
|
m_sourceText=input;
|
||||||
m_softWareCenterMap.clear();
|
m_softWareCenterMap.clear();
|
||||||
|
|
|
@ -35,8 +35,8 @@ class AppMatch : public QObject
|
||||||
public:
|
public:
|
||||||
explicit AppMatch(QObject *parent = nullptr);
|
explicit AppMatch(QObject *parent = nullptr);
|
||||||
~AppMatch();
|
~AppMatch();
|
||||||
QStringList startMatchApp(QString input);
|
// QStringList startMatchApp(QString input);
|
||||||
QMap<QString,QList<QString>> startMatchApp(QString input,int i);
|
QMap<QString,QList<QString>> startMatchApp(QString input);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void getAllDesktopFilePath(QString path);
|
void getAllDesktopFilePath(QString path);
|
||||||
|
@ -54,7 +54,7 @@ private:
|
||||||
QStringList m_filePathList;
|
QStringList m_filePathList;
|
||||||
QStringList m_returnResult;
|
QStringList m_returnResult;
|
||||||
|
|
||||||
QDBusInterface *m_interFace=nullptr;
|
QDBusInterface *m_interFace;
|
||||||
QMap<QString,QList<QString>> m_softWareCenterMap;
|
QMap<QString,QList<QString>> m_softWareCenterMap;
|
||||||
QMap<QString,QList<QString>> m_installAppMap;
|
QMap<QString,QList<QString>> m_installAppMap;
|
||||||
QMap<QString,QList<QString>> m_filterInstallAppMap;
|
QMap<QString,QList<QString>> m_filterInstallAppMap;
|
||||||
|
|
Loading…
Reference in New Issue