From de591ea6f94b8e4825da3eed3574bffc3c5bd087 Mon Sep 17 00:00:00 2001 From: sunfengsheng <327123947@qq.com> Date: Mon, 28 Dec 2020 21:56:41 -0800 Subject: [PATCH] Modify the specification --- appmatch/app-match.pri | 7 ------- {appmatch => appsearch}/app-match.cpp | 0 {appmatch => appsearch}/app-match.h | 0 appsearch/appsearch.pri | 6 ++++-- .../setting-match.cpp | 18 +++++++++--------- .../setting-match.h | 10 +++++----- .../settingsearch.pri | 0 ukui-search.pro | 3 +-- 8 files changed, 19 insertions(+), 25 deletions(-) delete mode 100644 appmatch/app-match.pri rename {appmatch => appsearch}/app-match.cpp (100%) rename {appmatch => appsearch}/app-match.h (100%) rename {settingsmatch => settingsearch}/setting-match.cpp (82%) rename {settingsmatch => settingsearch}/setting-match.h (72%) rename settingsmatch/setting-match.pri => settingsearch/settingsearch.pri (100%) diff --git a/appmatch/app-match.pri b/appmatch/app-match.pri deleted file mode 100644 index 4a3d55d..0000000 --- a/appmatch/app-match.pri +++ /dev/null @@ -1,7 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/app-match.h \ - -SOURCES += \ - $$PWD/app-match.cpp \ diff --git a/appmatch/app-match.cpp b/appsearch/app-match.cpp similarity index 100% rename from appmatch/app-match.cpp rename to appsearch/app-match.cpp diff --git a/appmatch/app-match.h b/appsearch/app-match.h similarity index 100% rename from appmatch/app-match.h rename to appsearch/app-match.h diff --git a/appsearch/appsearch.pri b/appsearch/appsearch.pri index 224e0af..4a3d55d 100644 --- a/appsearch/appsearch.pri +++ b/appsearch/appsearch.pri @@ -1,5 +1,7 @@ INCLUDEPATH += $$PWD -HEADERS += +HEADERS += \ + $$PWD/app-match.h \ -SOURCES += +SOURCES += \ + $$PWD/app-match.cpp \ diff --git a/settingsmatch/setting-match.cpp b/settingsearch/setting-match.cpp similarity index 82% rename from settingsmatch/setting-match.cpp rename to settingsearch/setting-match.cpp index 0447e9d..5665765 100644 --- a/settingsmatch/setting-match.cpp +++ b/settingsearch/setting-match.cpp @@ -2,7 +2,7 @@ SettingsMatch::SettingsMatch(QObject *parent) : QObject(parent) { - XmlElement(); + xmlElement(); } QStringList SettingsMatch::startMatchApp(const QString &source){ @@ -12,7 +12,7 @@ QStringList SettingsMatch::startMatchApp(const QString &source){ return settingList; } -void SettingsMatch::XmlElement(){ +void SettingsMatch::xmlElement(){ QString pinyinIndex; QString ChineseIndex; @@ -29,8 +29,8 @@ void SettingsMatch::XmlElement(){ while(!node.isNull()){ QDomElement element=node.toElement(); QString key=element.attribute("name");; - m_Chine_searchResult=m_Chine_searchList.value(key); - m_Pinyin_searchResult=m_Pinyin_searchList.value(key); + m_chine_searchResult=m_chine_searchList.value(key); + m_pinyin_searchResult=m_pinyin_searchList.value(key); QDomNodeList list=element.childNodes(); for(int i=0;i::const_iterator i; - for(i=m_Chine_searchList.constBegin();i!=m_Chine_searchList.constEnd();++i){ + for(i=m_chine_searchList.constBegin();i!=m_chine_searchList.constEnd();++i){ regmatch=*i; key=i.key(); // qDebug()< m_Pinyin_searchList; - QMap m_Chine_searchList; - QStringList m_Pinyin_searchResult; - QStringList m_Chine_searchResult; + QMap m_pinyin_searchList; + QMap m_chine_searchList; + QStringList m_pinyin_searchResult; + QStringList m_chine_searchResult; QString m_sourceText; }; diff --git a/settingsmatch/setting-match.pri b/settingsearch/settingsearch.pri similarity index 100% rename from settingsmatch/setting-match.pri rename to settingsearch/settingsearch.pri diff --git a/ukui-search.pro b/ukui-search.pro index ea03398..25c2e86 100644 --- a/ukui-search.pro +++ b/ukui-search.pro @@ -21,8 +21,7 @@ include(model/model.pri) include(control/control.pri) include(appsearch/appsearch.pri) include(singleapplication/qt-single-application.pri) -include(settingsmatch/setting-match.pri) -include(appmatch/app-match.pri) +include(settingsearch/settingsearch.pri) LIBS = -lxapian -lgsettings-qt # Default rules for deployment.