diff --git a/frontend/CMakeLists.txt b/frontend/CMakeLists.txt index 401c86a..c414d0b 100644 --- a/frontend/CMakeLists.txt +++ b/frontend/CMakeLists.txt @@ -42,7 +42,6 @@ set(UKUI_SEARCH_SRC model/best-list-model.cpp model/best-list-model.h model/search-result-manager.cpp model/search-result-manager.h model/search-result-model.cpp model/search-result-model.h - model/web-search-model.cpp model/web-search-model.h search-app-widget-plugin/search.cpp search-app-widget-plugin/search.h ukui-search-dbus-service.cpp ukui-search-dbus-service.h ukui-search-gui.cpp ukui-search-gui.h diff --git a/frontend/model/best-list-model.cpp b/frontend/model/best-list-model.cpp index 436359c..66ba7e3 100644 --- a/frontend/model/best-list-model.cpp +++ b/frontend/model/best-list-model.cpp @@ -25,16 +25,15 @@ using namespace UkuiSearch; BestListModel::BestListModel(QObject *parent) : QAbstractItemModel(parent) { - m_item = new SearchResultItem; initConnections(); } QModelIndex BestListModel::index(int row, int column, const QModelIndex &parent) const { Q_UNUSED(parent) - if(row < 0 || row > m_item->m_result_info_list.length() - 1) + if(row < 0 || row > m_items.length() - 1) return QModelIndex(); - return createIndex(row, column, m_item); + return createIndex(row, column, nullptr); } QModelIndex BestListModel::parent(const QModelIndex &index) const @@ -45,7 +44,7 @@ QModelIndex BestListModel::parent(const QModelIndex &index) const int BestListModel::rowCount(const QModelIndex &parent) const { - return parent.isValid() ? 0 : (m_isExpanded ? m_item->m_result_info_list.length() : NUM_LIMIT_SHOWN_DEFAULT); + return parent.isValid() ? 0 : (m_isExpanded ? m_items.length() : NUM_LIMIT_SHOWN_DEFAULT); } int BestListModel::columnCount(const QModelIndex &parent) const @@ -57,13 +56,13 @@ QVariant BestListModel::data(const QModelIndex &index, int role) const { switch(role) { case Qt::DecorationRole: { - return m_item->m_result_info_list.at(index.row()).icon; + return m_items.at(index.row()).icon; } case Qt::DisplayRole: { - return m_item->m_result_info_list.at(index.row()).name; + return m_items.at(index.row()).name; } case Qt::ToolTipRole: { - return m_item->m_result_info_list.at(index.row()).name; + return m_items.at(index.row()).name; } default: return QVariant(); @@ -73,7 +72,7 @@ QVariant BestListModel::data(const QModelIndex &index, int role) const const SearchPluginIface::ResultInfo &BestListModel::getInfo(const QModelIndex &index) { - return m_item->m_result_info_list.at(index.row()); + return m_items.at(index.row()); } const QString &BestListModel::getPluginInfo(const QModelIndex &index) @@ -86,7 +85,7 @@ void BestListModel::setExpanded(const bool &is_expanded) this->beginResetModel(); m_isExpanded = is_expanded; this->endResetModel(); - Q_EMIT this->itemListChanged(m_item->m_result_info_list.length()); + Q_EMIT this->itemListChanged(m_items.length()); } const bool &BestListModel::isExpanded() @@ -104,8 +103,8 @@ QStringList BestListModel::getActions(const QModelIndex &index) QString BestListModel::getKey(const QModelIndex &index) { - if (m_item->m_result_info_list.length() > index.row() && index.row() >= 0) - return m_item->m_result_info_list.at(index.row()).actionKey; + if (m_items.length() > index.row() && index.row() >= 0) + return m_items.at(index.row()).actionKey; return NULL; } @@ -118,19 +117,19 @@ void BestListModel::appendInfo(const QString &pluginId, const SearchPluginIface: m_plugin_action_key_list.append(info.actionKey); } if (m_plugin_id_list.contains(pluginId)) { - if (info.name == m_item->m_result_info_list.at(m_plugin_id_list.lastIndexOf(pluginId)).name) { + if (info.name == m_items.at(m_plugin_id_list.lastIndexOf(pluginId)).name) { return; } // qDebug()<<"plugin ID:"<clear(); } void SearchResultManager::initConnections() @@ -86,4 +87,5 @@ void ReceiveResultThread::run() Q_EMIT gotResultInfo(oneResult); } } + m_resultQueue->clear(); } diff --git a/frontend/model/search-result-model.cpp b/frontend/model/search-result-model.cpp index 6a6b080..50f3540 100644 --- a/frontend/model/search-result-model.cpp +++ b/frontend/model/search-result-model.cpp @@ -23,7 +23,6 @@ using namespace UkuiSearch; SearchResultModel::SearchResultModel(const QString &plugin_id) { - m_item = new SearchResultItem; m_plugin_id = plugin_id; m_search_manager = new SearchResultManager(plugin_id); m_timer = new QTimer(this); @@ -34,10 +33,11 @@ SearchResultModel::SearchResultModel(const QString &plugin_id) QModelIndex SearchResultModel::index(int row, int column, const QModelIndex &parent) const { Q_UNUSED(parent) - if(row < 0 || row > m_item->m_result_info_list.length() - 1) + if(row < 0 || row > m_items.length() - 1) return QModelIndex(); // QVector * m_info = &m_result_info_list; - return createIndex(row, column, m_item); + return createIndex(row, column, nullptr); + } QModelIndex SearchResultModel::parent(const QModelIndex &child) const @@ -48,7 +48,7 @@ QModelIndex SearchResultModel::parent(const QModelIndex &child) const int SearchResultModel::rowCount(const QModelIndex &index) const { - return index.isValid() ? 0 : (m_isExpanded ? m_item->m_result_info_list.length() : NUM_LIMIT_SHOWN_DEFAULT); + return index.isValid() ? 0 : (m_isExpanded ? m_items.length() : NUM_LIMIT_SHOWN_DEFAULT); } int SearchResultModel::columnCount(const QModelIndex &index) const @@ -58,15 +58,18 @@ int SearchResultModel::columnCount(const QModelIndex &index) const QVariant SearchResultModel::data(const QModelIndex &index, int role) const { + if (!index.isValid() || index.row() >= m_items.count()) { + return {}; + } switch(role) { case Qt::DecorationRole: { - return m_item->m_result_info_list.at(index.row()).icon; + return m_items.at(index.row()).icon; } case Qt::DisplayRole: { - return m_item->m_result_info_list.at(index.row()).name; + return m_items.at(index.row()).name; } case Qt::ToolTipRole: { - return m_item->m_result_info_list.at(index.row()).name; + return m_items.at(index.row()).name; } default: return QVariant(); @@ -76,35 +79,37 @@ QVariant SearchResultModel::data(const QModelIndex &index, int role) const void SearchResultModel::appendInfo(const SearchPluginIface::ResultInfo &info)//TODO 代码逻辑可尝试梳理优化 { - if (m_item->m_result_info_list.length() > 5 //搜索结果大于5个并且搜索结果处于收起状态时只存储数据无需刷新UI + if (m_items.length() > 5 //搜索结果大于5个并且搜索结果处于收起状态时只存储数据无需刷新UI and !m_isExpanded) { - m_item->m_result_info_list.append(info); + m_items.append(info); return; } - if (m_item->m_result_info_list.length() > 50 + if (m_items.length() > 50 and m_isExpanded) {//搜索结果大于50个并且搜索结果处于展开状态时只存储数据并启动定时,500ms刷新一次UI - m_item->m_result_info_list.append(info); + m_items.append(info); if (!m_timer->isActive()) { m_timer->start(); } return; } - this->beginResetModel(); - m_item->m_result_info_list.append(info); - this->endResetModel(); - Q_EMIT this->itemListChanged(m_item->m_result_info_list.length()); +// this->beginResetModel(); + beginInsertRows(QModelIndex(), m_items.length(), m_items.length()); + m_items.append(info); +// this->endResetModel(); + endInsertRows(); + Q_EMIT this->itemListChanged(m_items.length()); if (m_plugin_id != "Web Page") { - Q_EMIT this->sendBestListData(m_plugin_id, m_item->m_result_info_list.at(0)); + Q_EMIT this->sendBestListData(m_plugin_id, m_items.at(0)); } } void SearchResultModel::startSearch(const QString &keyword) { - if (!m_item->m_result_info_list.isEmpty()) { + if (!m_items.isEmpty()) { this->beginResetModel(); - m_item->m_result_info_list.clear(); + m_items.clear(); this->endResetModel(); - Q_EMIT this->itemListChanged(m_item->m_result_info_list.length()); + Q_EMIT this->itemListChanged(m_items.length()); } m_search_manager->startSearch(keyword); } @@ -114,14 +119,14 @@ void SearchResultModel::initConnections() connect(this, &SearchResultModel::stopSearch, m_search_manager, &SearchResultManager::stopSearch); connect(m_search_manager, &SearchResultManager::gotResultInfo, this, &SearchResultModel::appendInfo); connect(m_timer, &QTimer::timeout, [ = ] () {//500ms刷新一次UI,防止搜索结果数据量过大导致的UI卡顿 - Q_EMIT this->itemListChanged(m_item->m_result_info_list.length()); + Q_EMIT this->itemListChanged(m_items.length()); m_timer->stop(); }); } const SearchPluginIface::ResultInfo &SearchResultModel::getInfo(const QModelIndex &index) { - return m_item->m_result_info_list.at(index.row()); + return m_items.at(index.row()); } void SearchResultModel::setExpanded(const bool &is_expanded) @@ -129,7 +134,7 @@ void SearchResultModel::setExpanded(const bool &is_expanded) this->beginResetModel(); m_isExpanded = is_expanded; this->endResetModel(); - Q_EMIT this->itemListChanged(m_item->m_result_info_list.length()); + Q_EMIT this->itemListChanged(m_items.length()); } const bool &SearchResultModel::isExpanded() @@ -143,7 +148,17 @@ void SearchResultModel::refresh() this->endResetModel(); } -SearchResultItem::SearchResultItem(QObject *parent) : QObject(parent) +void SearchResultModel::stopSearchSlot() { - + beginResetModel(); + m_items.clear(); + m_items.squeeze(); + endResetModel(); + Q_EMIT stopSearch(); +} + +SearchResultModel::~SearchResultModel() +{ + m_items.clear(); + m_items.squeeze(); } diff --git a/frontend/model/search-result-model.h b/frontend/model/search-result-model.h index afc8589..c9e92cd 100644 --- a/frontend/model/search-result-model.h +++ b/frontend/model/search-result-model.h @@ -27,24 +27,12 @@ namespace UkuiSearch { -class SearchResultItem : public QObject { - friend class SearchResultModel; - friend class BestListModel; - friend class WebSearchModel; - Q_OBJECT -public: - explicit SearchResultItem(QObject *parent = nullptr); - ~SearchResultItem() = default; -private: - //此插件所有搜索结果<具体信息> - QVector m_result_info_list; -}; class SearchResultModel : public QAbstractItemModel { Q_OBJECT public: SearchResultModel(const QString &plugin_id); - ~SearchResultModel() = default; + ~SearchResultModel(); QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; QModelIndex parent(const QModelIndex &child) const override; int rowCount(const QModelIndex &parent) const override; @@ -59,6 +47,7 @@ public: public Q_SLOTS: void appendInfo(const SearchPluginIface::ResultInfo &); void startSearch(const QString &); + void stopSearchSlot(); Q_SIGNALS: void stopSearch(); @@ -67,7 +56,7 @@ Q_SIGNALS: private: void initConnections(); - SearchResultItem * m_item = nullptr; + QVector m_items; QString m_plugin_id; SearchResultManager * m_search_manager = nullptr; bool m_isExpanded = false; diff --git a/frontend/model/web-search-model.cpp b/frontend/model/web-search-model.cpp deleted file mode 100644 index 6fc9212..0000000 --- a/frontend/model/web-search-model.cpp +++ /dev/null @@ -1,86 +0,0 @@ -/* - * - * Copyright (C) 2021, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Authors: jixiaoxu - * - */ -#include "web-search-model.h" -#include - -using namespace UkuiSearch; -WebSearchModel::WebSearchModel(QObject *parent) - : QAbstractItemModel(parent) -{ - m_item = new SearchResultItem; -} - -QModelIndex WebSearchModel::index(int row, int column, const QModelIndex &parent) const -{ - Q_UNUSED(parent) - if(row < 0 || row > m_item->m_result_info_list.length() - 1) - return QModelIndex(); - return createIndex(row, column, m_item); -} - -QModelIndex WebSearchModel::parent(const QModelIndex &index) const -{ - Q_UNUSED(index) - return QModelIndex(); -} - -int WebSearchModel::rowCount(const QModelIndex &parent) const -{ - if (parent.isValid()) { - return 0; - } - else - return 1; -} - -int WebSearchModel::columnCount(const QModelIndex &parent) const -{ - return parent.isValid() ? 0 : 1; -} - -QVariant WebSearchModel::data(const QModelIndex &index, int role) const -{ - switch(role) { - case Qt::DecorationRole: { - return m_item->m_result_info_list.at(index.row()).icon; - } - case Qt::DisplayRole: { - return m_item->m_result_info_list.at(index.row()).name; - } - case Qt::ToolTipRole: { - return m_item->m_result_info_list.at(index.row()).name; - } - default: - return QVariant(); - } - return QVariant(); -} - -void WebSearchModel::startSearch(const QString &keyword) -{ - this->beginResetModel(); - m_item->m_result_info_list.clear(); - SearchPluginIface::ResultInfo info; - info.icon = QIcon(":/res/icons/edit-find-symbolic.svg"); - info.name = keyword; - m_item->m_result_info_list.append(info); - this->endResetModel(); -} diff --git a/frontend/model/web-search-model.h b/frontend/model/web-search-model.h deleted file mode 100644 index a19b251..0000000 --- a/frontend/model/web-search-model.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (C) 2023, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * - */ -#ifndef WEBSEARCHMODEL_H -#define WEBSEARCHMODEL_H - -#include -#include -#include -#include "search-result-model.h" - -namespace UkuiSearch { -class WebSearchModel : public QAbstractItemModel -{ - Q_OBJECT - -public: - explicit WebSearchModel(QObject *parent = nullptr); - - QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; - QModelIndex parent(const QModelIndex &index) const override; - - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - int columnCount(const QModelIndex &parent = QModelIndex()) const override; - - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; -public Q_SLOTS: - void startSearch(const QString &); - -private: - SearchResultItem * m_item = nullptr; -}; -} -#endif // WEBSEARCHMODEL_H diff --git a/frontend/view/result-view.cpp b/frontend/view/result-view.cpp index 7f76337..889e544 100644 --- a/frontend/view/result-view.cpp +++ b/frontend/view/result-view.cpp @@ -423,7 +423,7 @@ void ResultView::initConnections() m_styleDelegate->setSearchKeyword(keyword); m_model->startSearch(keyword); }); - connect(this, &ResultView::stopSearch, m_model, &SearchResultModel::stopSearch); + connect(this, &ResultView::stopSearch, m_model, &SearchResultModel::stopSearchSlot); //connect(this->selectionModel(), &QItemSelectionModel::selectionChanged, this, &ResultView::onRowSelectedSlot); connect(this, &ResultView::clicked, this, &ResultView::onRowSelectedSlot); connect(this, &ResultView::activated, this, &ResultView::onRowDoubleClickedSlot); diff --git a/libsearch/appsearch/app-match.cpp b/libsearch/appsearch/app-match.cpp deleted file mode 100644 index 859bde2..0000000 --- a/libsearch/appsearch/app-match.cpp +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright (C) 2020, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Authors: sunfengsheng - * - */ -#include "app-match.h" -#include -#include -#include -#include -#include "file-utils.h" -#include "app-search-plugin.h" - -using namespace UkuiSearch; -static AppMatch *app_match_Class = nullptr; - -AppMatch *AppMatch::getAppMatch() { - if(!app_match_Class) { - app_match_Class = new AppMatch; - } - return app_match_Class; -} -AppMatch::AppMatch(QObject *parent) : QThread(parent) -// m_versionCommand(new QProcess(this)) -{ - qDBusRegisterMetaType>(); - qDBusRegisterMetaType>>(); - m_interFace = new QDBusInterface("com.kylin.softwarecenter.getsearchresults", "/com/kylin/softwarecenter/getsearchresults", - "com.kylin.getsearchresults", - QDBusConnection::sessionBus()); - if(!m_interFace->isValid()) { - qWarning() << qPrintable(QDBusConnection::sessionBus().lastError().message()); - } - m_interFace->setTimeout(1500); - m_appInfoTable = new AppInfoTable; - qDebug() << "AppMatch init finished."; -} - -AppMatch::~AppMatch() { - if(m_interFace) { - delete m_interFace; - } - m_interFace = NULL; - if(m_appInfoTable) { - delete m_appInfoTable; - } - m_appInfoTable = NULL; -} - -void AppMatch::startMatchApp(QString input, size_t uniqueSymbol, DataQueue *searchResult) { - appNameMatch(input, uniqueSymbol, searchResult); - slotDBusCallFinished(input, uniqueSymbol, searchResult); - qDebug() << "App match finished!"; -} - -/** - * @brief AppMatch::appNameMatch - * 进行匹配 - * @param appname - * 应用名字 - */ -void AppMatch::appNameMatch(QString keyWord, size_t uniqueSymbol, DataQueue *searchResult) { - QStringList results; - //m_appInfoTable->searchInstallAppOrderByFavoritesDesc(keyWord, results); - for (int i = 0; i < results.size() / 3; i++) { - { - QMutexLocker locker(&AppSearchPlugin::m_mutex); - if (uniqueSymbol != AppSearchPlugin::uniqueSymbol) { - return; - } - } - - SearchPluginIface::ResultInfo ri; - ri.actionKey = results.at(i*3); - ri.name = results.at(i*3 + 1); - ri.icon = XdgIcon::fromTheme(results.at(i*3 + 2), QIcon(":/res/icons/desktop.png")); - ri.type = 0; - - searchResult->enqueue(ri); - } - -/* QMultiMap installAppMap; - m_appInfoTable->getInstallAppMap(installAppMap); - QMap resultAppMap; - for (auto i = installAppMap.begin(); i != installAppMap.end(); ++i) { - NameString name; - name.app_name = i.key(); - QStringList infoList; - infoList = i.value(); - resultAppMap.insert(name, infoList); - } - QMapIterator iter(resultAppMap); - while(iter.hasNext()) { - iter.next(); - if(iter.key().app_name.contains(keyWord, Qt::CaseInsensitive)) { - SearchPluginIface::ResultInfo ri; - creatResultInfo(ri, iter, true); - AppSearchPlugin::m_mutex.lock(); - if (uniqueSymbol == AppSearchPlugin::uniqueSymbol) { - searchResult->enqueue(ri); - AppSearchPlugin::m_mutex.unlock(); - continue; - } else { - AppSearchPlugin::m_mutex.unlock(); - return; - } - } - - if(iter.value().at(3) == ""){ - continue; - } - QStringList pinyinlist; - pinyinlist = FileUtils::findMultiToneWords(iter.value().at(3)); - - bool matched = false; - for(int i = 0; i < pinyinlist.size() / 2; i++) { - QString shouzimu = pinyinlist.at(2 * i + 1); // 中文转首字母 - if(shouzimu.contains(keyWord, Qt::CaseInsensitive)) { - SearchPluginIface::ResultInfo ri; - creatResultInfo(ri, iter, true); - AppSearchPlugin::m_mutex.lock(); - if (uniqueSymbol == AppSearchPlugin::uniqueSymbol) { - searchResult->enqueue(ri); - AppSearchPlugin::m_mutex.unlock(); - matched = true; - break; - } else { - AppSearchPlugin::m_mutex.unlock(); - return; - } - } - if(keyWord.size() < 2) - break; - QString pinyin = pinyinlist.at(2 * i); // 中文转拼音 - if(pinyin.contains(keyWord, Qt::CaseInsensitive)) { - SearchPluginIface::ResultInfo ri; - AppSearchPlugin::m_mutex.lock(); - creatResultInfo(ri, iter, true); - if (uniqueSymbol == AppSearchPlugin::uniqueSymbol) { - searchResult->enqueue(ri); - AppSearchPlugin::m_mutex.unlock(); - matched = true; - break; - } else { - AppSearchPlugin::m_mutex.unlock(); - return; - } - } - } - if(matched) { - continue; - } - QStringList tmpList; - tmpList << iter.value().at(2) << iter.value().at(3); - for(QString s : tmpList) { - if(s.contains(keyWord, Qt::CaseInsensitive)) { - SearchPluginIface::ResultInfo ri; - AppSearchPlugin::m_mutex.lock(); - creatResultInfo(ri, iter, true); - if (uniqueSymbol == AppSearchPlugin::uniqueSymbol) { - searchResult->enqueue(ri); - AppSearchPlugin::m_mutex.unlock(); - break; - } else { - AppSearchPlugin::m_mutex.unlock(); - return; - } - } - } - }*/ -} - -void AppMatch::slotDBusCallFinished(QString keyWord, size_t uniqueSymbol, DataQueue *searchResult) { - QDBusReply>> reply = m_interFace->call("get_search_result", keyWord); //阻塞,直到远程方法调用完成。 - if(reply.isValid()) { - parseSoftWareCenterReturn(reply.value(), uniqueSymbol, searchResult); - } else { - qWarning() << "SoftWareCenter dbus called failed!"; - } -} - -void AppMatch::parseSoftWareCenterReturn(QList> list, size_t uniqueSymbol, DataQueue *searchResult) { - qDebug() << "Begin parseSoftWareCenterReturn"; - QLocale locale; - for(int i = 0; i < list.size(); i++) { - SearchPluginIface::ResultInfo ri; - if(locale.language() == QLocale::Chinese) { - ri.name = list.at(i).value("displayname_cn"); - } else { - ri.name = list.at(i).value("appname"); - } - ri.icon = !(QIcon(list.at(i).value("icon")).isNull()) ? QIcon(list.at(i).value("icon")) : QIcon(":/res/icons/desktop.png"); - SearchPluginIface::DescriptionInfo di; - di.key = QString(tr("Application Description:")); - di.value = list.at(i).value("discription"); - ri.description.append(di); - ri.actionKey = list.at(i).value("appname"); - ri.type = 1; //1 means not installed apps. - AppSearchPlugin::m_mutex.lock(); - if (uniqueSymbol == AppSearchPlugin::uniqueSymbol) { - searchResult->enqueue(ri); - AppSearchPlugin::m_mutex.unlock(); - } else { - AppSearchPlugin::m_mutex.unlock(); - break; - } - } -} - -//void AppMatch::creatResultInfo(SearchPluginIface::ResultInfo &ri, QMapIterator &iter, bool isInstalled) -//{ -//// ri.icon = QIcon::fromTheme(iter.value().at(1), QIcon(":/res/icons/desktop.png")); -// ri.icon = XdgIcon::fromTheme(iter.value().at(1), QIcon(":/res/icons/desktop.png")); -// ri.name = iter.key().app_name; -// ri.actionKey = iter.value().at(0); -// ri.type = 0; //0 means installed apps. -//} - -void AppMatch::run() { - qDebug() << "App map init.."; - - qDebug() << "App map init finished.."; -} diff --git a/libsearch/appsearch/app-match.h b/libsearch/appsearch/app-match.h deleted file mode 100644 index aee056d..0000000 --- a/libsearch/appsearch/app-match.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2020, KylinSoft Co., Ltd. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - * Authors: sunfengsheng - * - */ -#ifndef APPMATCH_H -#define APPMATCH_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include "search-plugin-iface.h" -#include "../appdata/app-info-table.h" - -namespace UkuiSearch { -class AppMatch : public QThread { - Q_OBJECT -public: - static AppMatch *getAppMatch(); - void startMatchApp(QString input, size_t uniqueSymbol, DataQueue *searchResult); - -protected: - void run() override; - -private: - explicit AppMatch(QObject *parent = nullptr); - ~AppMatch(); - void getAllDesktopFilePath(QString path); - void appNameMatch(QString keyWord, size_t uniqueSymbol, DataQueue *searchResult); - void parseSoftWareCenterReturn(QList> list, size_t uniqueSymbol, DataQueue *searchResult); - //void creatResultInfo(SearchPluginIface::ResultInfo &ri, QMapIterator &iter, bool isInstalled = true); - QString m_sourceText; - size_t m_uniqueSymbol; - DataQueue *m_search_result = nullptr; - QDBusInterface *m_interFace = nullptr; - -private Q_SLOTS: - void slotDBusCallFinished(QString keyWord, size_t uniqueSymbol, DataQueue *searchResult); -}; -} - -#endif // APPMATCH_H diff --git a/libsearch/appsearch/app-search-plugin.cpp b/libsearch/appsearch/app-search-plugin.cpp index 9328457..50a6063 100644 --- a/libsearch/appsearch/app-search-plugin.cpp +++ b/libsearch/appsearch/app-search-plugin.cpp @@ -205,6 +205,7 @@ void AppSearchPlugin::run() m_searchResult->enqueue(ri); } } + m_appSearchResults->clear(); } void AppSearchPlugin::initDetailPage() diff --git a/libsearch/appsearch/app-search-plugin.h b/libsearch/appsearch/app-search-plugin.h index b03526e..8c26ebc 100644 --- a/libsearch/appsearch/app-search-plugin.h +++ b/libsearch/appsearch/app-search-plugin.h @@ -39,7 +39,6 @@ namespace UkuiSearch { class LIBSEARCH_EXPORT AppSearchPlugin : public QThread, public SearchPluginIface { friend class AppSearch; - friend class AppMatch; Q_OBJECT public: AppSearchPlugin(QObject *parent = nullptr); diff --git a/libsearch/libsearch.h b/libsearch/libsearch.h index 544338d..08bf752 100644 --- a/libsearch/libsearch.h +++ b/libsearch/libsearch.h @@ -21,7 +21,6 @@ #define LIBSEARCH_H #include "libsearch_global.h" -#include "appsearch/app-match.h" #include "file-utils.h" #include "global-settings.h" diff --git a/libsearch/plugininterface/data-queue.h b/libsearch/plugininterface/data-queue.h index 898e678..ade8cb6 100644 --- a/libsearch/plugininterface/data-queue.h +++ b/libsearch/plugininterface/data-queue.h @@ -40,7 +40,7 @@ public: inline void clear() { QMutexLocker locker(&m_mutex); QList::clear(); - return; + QList::reserve(QList::size()); } inline bool isEmpty() { QMutexLocker locker(&m_mutex); diff --git a/libsearch/plugininterface/search-plugin-iface.h b/libsearch/plugininterface/search-plugin-iface.h index e59186e..cb30d01 100644 --- a/libsearch/plugininterface/search-plugin-iface.h +++ b/libsearch/plugininterface/search-plugin-iface.h @@ -70,6 +70,10 @@ public: actionKey = actionKeyToSet; type = typeToSet; } + ~ResultInfo() { + description.clear(); + description.squeeze(); + } }; virtual ~SearchPluginIface() {} diff --git a/search-ukcc-plugin/translations/bo_CN.ts b/search-ukcc-plugin/translations/bo_CN.ts index d86e477..baa4772 100644 --- a/search-ukcc-plugin/translations/bo_CN.ts +++ b/search-ukcc-plugin/translations/bo_CN.ts @@ -42,13 +42,13 @@ 360 - + Block Folders ལྐོག་བཀོད་མིང་ཐོ། /Search/Block Folders - + Following folders will not be searched. You can set it by adding and removing folders. གཤམ་གྱི་ཡིག་སྣོད་འཚོལ་བཤེར་མི་བྱེད། ཡིག་སྣོད་གསར་སྣོན་དང་གསུབ་འཕྲི་བྱས་ཚེ་ཡིག་ཆའི་དཀར་ཆག་སྒྲིག་འགོད་བྱ་ཐུབ། @@ -57,14 +57,14 @@ བསལ་འདེམས་ཀྱི་དཀར་ཆག། - - + + delete བསུབ་པ། - - + + Directories དཀར་ཆག @@ -74,106 +74,106 @@ /Search/File Content Search - + show more results that match the keyword ངེས་མངོན་པ་དེ་བས་མང་བ་དང་ནང་འདྲེན་བྱེད་པའི་ནང་དོན་གཉིས་དོ་མཉམ་པའི་འཚོལ་ཞིབ་བྱས་པའི་འབྲས་བུ། - + Fuzzy Search རབ་རིབ་བཤེར་འཚོལ - + Create file index ཡིག་ཆའི་མིང་གི་སྟོན་གྲངས་གསར་སྐྲུན་བྱེད་པ། /Search/Create file index - + Create file content index ཡིག་ཆའི་ནང་དོན་སྟོན་གྲངས་གསར་སྐྲུན་བྱེད་པ། /Search/Create file content index - + Precise Search གནད་ལ་འཁེལ་བའི་བཤེར་འཚོལ - + show the results that exactly match the keyword ཕྱིར་མངོན་པ་དང་ནང་འཇུག་གི་ནང་དོན་ཡོངས་སུ་མཐུན་པའི་འཚོལ་ཞིབ་ཀྱི་མཇུག་འབྲས - + Search Folders བཤེར་འཚོལ་གྱི་ཁྱབ་ཁོངས། /Search/Search Folders - + Following folders will be searched. You can set it by adding and removing folders. གཤམ་གྱི་ཡིག་ཆ་འཚོལ་བཤེར་བྱེད་སྲིད།ཁྱོད་ཀྱིས་ཡིག་ཆའི་སྒམ་ནང་འཇུག་དང་མེད་པར་བཟོས་ནས་འཚོལ་བཤེར་གྱི་ཁྱབ་ཁོངས་བཀོད་སྒྲིག་བྱེད་ཆོག - + select blocked folder བཀག་སྡོམ་བྱས་པའི་ཡིག་སྣོད་གདམ་གསེས - - + + Select བདམས་ཐོན་བྱུང་བ། - - + + Position: གོ་གནས་ནི། - - + + FileName: ཡིག་ཆའི་མིང་ནི། - - + + FileType: ཡིག་ཆའི་རིགས་དབྱིབས་ནི། - - + + Cancel ཕྱིར་འཐེན། - - - - - - - - - - - + + + + + + + + + + + Warning ཐ་ཚིག་སྒྲོག་པ། - - + + Add search folder failed, hidden path is not supported! ཡིག་ཆའི་སྒམ་དེ་མིང་ཐོ་ནག་པོའི་ནང་དུ་འཇོག་མི་རུང་།རྒྱུ་མཚན་ནི་སྦས་ཡོད་པའི་ཡིག་ཆའི་སྒམ་འཇོག་མི་རུང་། - + Add search folder failed, permission denied! ཡིག་ཆའི་སྒམ་དེ་མིང་ཐོ་ནག་པོའི་ནང་དུ་འཇོག་མི་རུང་།རྒྱུ་མཚན་ནི་ལྟ་སྤྱོད་བྱེད་པའི་དབང་ཆ་མེད་པའི་ཡིག་ཆའི་སྒམ་ཁ་སྣོན་བྱེད་མི་ཐུབ། @@ -186,47 +186,47 @@ སྦྱོར་རྟ་ལྐོག་བཀོད་མིང་ཐོ་ཕམ་ཁ་བསལ་འདེམས་ཀྱི་དཀར་ཆག་མི་ཁྱིམ་དཀར་ཆག་འོག། - + Add blocked folder failed, its parent dir has been added! སྦྱོར་རྟ་ལྐོག་བཀོད་མིང་ཐོ་ཕམ་ཁ་བསལ་འདེམས་ཀྱི་དཀར་ཆག་ནི་ལྐོག་བཀོད་མིང་ཐོ་འི་ཁྲོད་ཀྱི་དཀར་ཆག་འོག - + Add blocked folder failed, choosen path is not exist! ཡིག་ཆའི་སྒམ་དེ་མིང་ཐོ་ནག་པོའི་ནང་དུ་འཇོག་མི་རུང་།རྒྱུ་མཚན་ནི་མི་གནས་པའི་ཡིག་ཆའི་སྒམ་འཇོག་མི་རུང་། - + Add blocked folder failed, it has already been blocked! སྦྱོར་རྟ་ལྐོག་བཀོད་མིང་ཐོ་ཕམ་ཁ་བསལ་འདེམས་ཀྱི་དཀར་ཆག་ནི་ལྐོག་བཀོད་མིང་ཐོ་འི་ཁྲོད་ཀྱི་དཀར་ཆག་འོག - + select search folder འཚོལ་ཞིབ་བྱེད་དགོས་པའི་དཀར་ཆག་འདེམས་དགོས། - + Add search folder failed, choosen path is not supported currently! ཡིག་ཆའི་སྒམ་དེ་འཚོལ་བཤེར་གྱི་ཁྱབ་ཁོངས་སུ་འཇོག་མི་རུང་།རྒྱུ་མཚན་ནི་མིག་སྔར་ད་དུང་རྒྱབ་སྐྱོར་མི་བྱེད་པའི་ཡིག་ཆའི་སྒམ་ཁ་སྣོན་བྱེད་མི་རུང་། - + Add search folder failed, another path which is in the same device has been added! ཡིག་ཁུག་འཚོལ་བཤེར་ཁྱབ་ཁོངས་སུ་ཁ་སྣོན་བྱེད་མི་ཆོགགང་ལགས་ཤེ་ན།སྒྲིག་ཆས་འོག་གི་ཡིག་ཁུག་ཅིག་ཁ་སྣོན་བྱས་ཡོད་པས་རེད། - + Add search folder failed, choosen path or its parent dir has been added! ཡིག་ཆ་འཚོལ་བཤེར་གྱི་ཁྱབ་ཁོངས་སུ་འཇོག་མི་རུང་།རྒྱུ་མཚན་ནི་དེའི་ཨ་ཕའི་ཡིག་ཆ་འཚོལ་བཤེར་གྱི་ཁྱབ་ཁོངས་སུ་ཁ་སྣོན་བྱས་ཡོད། - + Add search folder failed, choosen path is in repeat mounted devices and another path which is in the same device has been added! ཡིག་ཆའི་སྒམ་དེ་འཚོལ་བཤེར་གྱི་ཁྱབ་ཁོངས་སུ་འཇོག་མི་རུང་།རྒྱུ་མཚན་ནི་དེ་ནི་བསྐྱར་ཟློས་ཀྱི་སྒྲིག་ཆས་འོག་གི་ཡིག་ཆའི་སྒམ་ཡིན་པར་མ་ཟད།སྒྲིག་ཆས་འདིའི་འོག་གི་ཡིག་ཆའི་སྒམ་ཁ་སྣོན་བྱས་ཡོད། - + Add search folder failed, choosen path is not exists! ཡིག་ཆའི་སྒམ་དེ་འཚོལ་བཤེར་གྱི་ཁྱབ་ཁོངས་སུ་འཇོག་མི་རུང་།རྒྱུ་མཚན་ནི་མི་གནས་པའི་ཡིག་ཆའི་སྒམ་ཁ་སྣོན་བྱེད་མི་རུང་། diff --git a/search-ukcc-plugin/translations/en_US.ts b/search-ukcc-plugin/translations/en_US.ts index 13c0867..932679e 100644 --- a/search-ukcc-plugin/translations/en_US.ts +++ b/search-ukcc-plugin/translations/en_US.ts @@ -43,174 +43,174 @@ /Search/File Content Search - + Precise Search - + show the results that exactly match the keyword - + Fuzzy Search - + show more results that match the keyword - + Search Folders Search Folders /Search/Search Folders - + Following folders will be searched. You can set it by adding and removing folders. - + Block Folders Block Folders /Search/Block Folders - + Following folders will not be searched. You can set it by adding and removing folders. - - + + Directories - + select blocked folder - - + + Select - - + + Position: - - + + FileName: - - + + FileType: - - + + Cancel - - - - - - - - - - - + + + + + + + + + + + Warning - + Add blocked folder failed, its parent dir has been added! - + Add blocked folder failed, choosen path is not exist! Add blocked folder failed, choosen path is not exist! - + Add blocked folder failed, it has already been blocked! - + select search folder - + Add search folder failed, choosen path or its parent dir has been added! - + Add search folder failed, choosen path is not supported currently! - + Add search folder failed, choosen path is in repeat mounted devices and another path which is in the same device has been added! - + Add search folder failed, another path which is in the same device has been added! - + Add search folder failed, choosen path is not exists! - - + + Add search folder failed, hidden path is not supported! Add search folder failed, hidden path is not supported! - + Create file index Create file index /Search/Create file index - + Create file content index Create file content index /Search/Create file content index - + Add search folder failed, permission denied! Add search folder failed, permission denied! - - + + delete diff --git a/search-ukcc-plugin/translations/mn.ts b/search-ukcc-plugin/translations/mn.ts index fdabd9f..4bdf4e3 100644 --- a/search-ukcc-plugin/translations/mn.ts +++ b/search-ukcc-plugin/translations/mn.ts @@ -42,25 +42,25 @@ 360 - + Create file index ᠪᠢᠴᠢᠭ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠤᠨ ᠨᠡᠷ᠎ᠡ ᠶᠢᠨ ᠰᠦᠪᠡᠭᠴᠢ ᠶᠢ ᠡᠭᠦᠳᠦᠨ ᠪᠠᠶᠢᠭᠤᠯᠬᠤ ᠬᠡᠷᠡᠭᠲᠡᠶ᠃ /Search/Create file index - + Create file content index ᠪᠢᠴᠢᠭ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠤᠨ ᠠᠭᠤᠯᠭ᠎ᠠ ᠶᠢᠨ ᠰᠦᠪᠡᠭᠴᠢ ᠶᠢ ᠡᠭᠦᠳᠦᠨ ᠪᠠᠶᠢᠭᠤᠯᠬᠤ ᠬᠡᠷᠡᠭᠲᠡᠶ᠃ /Search/Create file content index - + Block Folders ᠢᠯᠭᠠᠵᠤ ᠭᠠᠷᠭᠠᠭᠰᠠᠨ ᠴᠤᠮᠤᠭ /Search/Block Folders - + Following folders will not be searched. You can set it by adding and removing folders. ᠬᠠᠢᠯᠲᠠ᠎ᠪᠠᠷ ᠳᠠᠷᠠᠭᠠᠬᠢ ᠴᠤᠮᠤᠭ᠎ᠢ ᠪᠠᠢᠴᠠᠭᠠᠵᠤ ᠦᠵᠡᠬᠦ᠌ ᠦᠬᠡᠢ ᠂ ᠨᠡᠮᠡᠬᠦ᠌ ᠪᠤᠶᠤ ᠬᠠᠰᠤᠬᠤ᠎ᠪᠠᠷ ᠳᠠᠮᠵᠢᠭᠤᠯᠤᠨ ᠢᠯᠭᠠᠵᠤ ᠭᠠᠷᠭᠠᠭᠰᠠᠨ ᠴᠤᠮᠤᠭ᠎ᠤᠨ ᠪᠠᠢᠷᠢ᠎ᠶᠢ ᠳᠤᠬᠢᠷᠠᠭᠤᠯᠵᠤ ᠪᠤᠯᠤᠨ᠎ᠠ ᠃ @@ -69,14 +69,14 @@ ᠨᠡᠮᠡᠬᠦ᠌ - - + + delete ᠬᠠᠰᠤᠬᠤ - - + + Directories ᠴᠤᠮᠤᠭ @@ -86,139 +86,139 @@ /Search/File Content Search - + Precise Search ᠣᠨᠣᠪᠴᠢᠲᠠᠢ ᠡᠷᠢᠬᠦ - + show the results that exactly match the keyword ᠵᠠᠩᠭᠢᠯᠠᠭ᠎ᠠ ᠶᠢᠨ ᠦᠰᠦᠭ ᠲᠡᠢ ᠪᠦᠷᠢᠮᠦᠰᠦᠨ ᠲᠣᠬᠢᠷᠠᠯᠴᠠᠭᠰᠠᠨ ᠦᠷ᠎ᠡ ᠳ᠋ᠦᠩ ᠢ ᠢᠯᠡᠷᠡᠭᠦᠯᠵᠡᠢ - + Fuzzy Search ᠪᠠᠯᠠᠷᠬᠠᠢ ᠡᠷᠢᠬᠦ - + show more results that match the keyword ᠨᠡᠩ ᠠᠷᠪᠢᠨ ᠵᠠᠩᠭᠢᠯᠠᠭ᠎ᠠ ᠶᠢᠨ ᠦᠰᠦᠭ ᠲᠡᠢ ᠲᠣᠬᠢᠷᠠᠯᠴᠠᠭᠰᠠᠨ ᠦᠷ᠎ᠡ ᠳ᠋ᠦᠩ ᠢ ᠢᠯᠡᠷᠡᠭᠦᠯᠵᠡᠢ - + Search Folders ᠡᠷᠢᠬᠦ ᠭᠠᠷᠴᠠᠭ /Search/Search Folders - + Following folders will be searched. You can set it by adding and removing folders. ᠳᠣᠣᠷᠠᠬᠢ ᠭᠠᠷᠴᠠᠭ ᠢ ᠡᠷᠢᠨ᠎ᠡ ᠃ ᠲᠠ ᠭᠠᠷᠴᠠᠭ ᠢᠶᠠᠷ ᠳᠠᠮᠵᠢᠨ ᠡᠷᠢᠬᠦ ᠬᠡᠪᠴᠢᠶ᠎ᠡ ᠶᠢ ᠵᠢᠭᠠᠨ ᠲᠣᠭᠲᠠᠭᠠᠵᠤ ᠪᠣᠯᠣᠨ᠎ᠠ᠃ - + select blocked folder ᠢᠯᠭᠠᠵᠤ ᠭᠠᠷᠭᠠᠭᠰᠠᠨ ᠴᠤᠮᠤᠭ᠎ᠢ ᠰᠤᠩᠭᠤᠬᠤ - - + + Select ᠰᠤᠩᠭᠤᠬᠤ - - + + Position: ᠪᠠᠢᠷᠢ ᠄ - - + + FileName: ᠹᠠᠢᠯ᠎ᠤᠨ ᠨᠡᠷ᠎ᠡ ᠄ - - + + FileType: ᠬᠡᠯᠪᠡᠷᠢ ᠮᠠᠶᠢᠭ - - + + Cancel ᠦᠬᠡᠢᠰᠭᠡᠬᠦ᠌ - - - - - - - - - - - + + + + + + + + + + + Warning ᠰᠡᠷᠡᠮᠵᠢᠯᠡᠬᠦᠯᠬᠦ᠌ - + Add blocked folder failed, its parent dir has been added! ᠡᠨᠡ ᠭᠠᠷᠴᠠᠭ ᠢ ᠨᠡᠮᠡᠵᠦ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ ᠂ ᠲᠡᠭᠦᠨ ᠦ ᠡᠴᠢᠭᠡ ᠶᠢᠨ ᠭᠠᠷᠴᠠᠭ ᠨᠢᠭᠡᠨᠲᠡ ᠨᠡᠮᠡᠭ᠍ᠳᠡᠵᠡᠢ ! - + Add blocked folder failed, choosen path is not exist! ᠭᠠᠷᠴᠠᠭ ᠨᠡᠮᠡᠵᠦ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ ᠂ ᠡᠨᠡ ᠭᠠᠷᠴᠠᠭ ᠣᠷᠣᠰᠢᠬᠤ ᠦᠭᠡᠢ ! - + Add blocked folder failed, it has already been blocked! ᠭᠠᠷᠴᠠᠭ ᠨᠡᠮᠡᠵᠦ ᠳᠡᠶᠢᠯᠬᠦ ᠦᠭᠡᠢ ᠂ ᠡᠨᠡ ᠭᠠᠷᠴᠠᠭ ᠨᠢᠭᠡᠨᠲᠡ ᠨᠡᠮᠡᠭ᠍ᠳᠡᠵᠡᠢ ! - - + + Add search folder failed, hidden path is not supported! ᠭᠠᠷᠴᠠᠭ ᠨᠡᠮᠡᠬᠦ ᠶᠢᠨ ᠠᠷᠭ᠎ᠠ ᠦᠭᠡᠢ ᠂ ᠨᠢᠭᠤᠴᠠ ᠭᠠᠷᠴᠠᠭ ᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠭᠡᠢ ! - + select search folder ᠡᠷᠢᠬᠦ ᠭᠠᠷᠴᠠᠭ ᠢ ᠰᠣᠩᠭᠣᠨ᠎ᠠ - + Add search folder failed, choosen path or its parent dir has been added! ᠡᠷᠢᠬᠦ ᠪᠢᠴᠢᠭ᠌ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠢ ᠨᠡᠮᠡᠵᠦ ᠢᠯᠠᠭᠳᠠᠵᠠᠢ ᠂ ᠨᠢᠭᠡᠨᠲᠡ ᠰᠤᠩᠭ᠋ᠤᠬᠤ ᠵᠠᠮ ᠪᠤᠶᠤ ᠲᠡᠭᠦᠨ ᠦ ᠡᠴᠢᠭᠡ ᠶᠢᠨ ᠭᠠᠷᠴᠠᠭ ᠨᠡᠮᠡᠵᠡᠢ ! - + Add search folder failed, choosen path is not supported currently! ᠡᠷᠢᠬᠦ ᠭᠠᠷᠴᠠᠭ ᠢ ᠨᠡᠮᠡᠵᠦ ᠢᠯᠠᠭᠳᠠᠵᠠᠢ ᠂ ᠣᠳᠣᠬᠠᠨ ᠳᠤ ᠡᠨᠡ ᠭᠠᠷᠴᠠᠭ ᠢ ᠳᠡᠮᠵᠢᠬᠦ ᠦᠭᠡᠢ ! - + Add search folder failed, choosen path is in repeat mounted devices and another path which is in the same device has been added! ᠡᠷᠢᠬᠦ ᠪᠢᠴᠢᠭ᠌ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠢ ᠬᠠᠪᠴᠢᠭᠤᠯᠤᠨ ᠢᠯᠠᠭᠳᠠᠵᠠᠢ ᠂ ᠠᠷᠭ᠎ᠠ ᠵᠠᠮ ᠢ ᠰᠣᠩᠭᠣᠵᠤ ᠳᠠᠬᠢᠨ ᠳᠠᠪᠲᠠᠨ ᠠᠴᠢᠶᠠᠯᠠᠭᠰᠠᠨ ᠲᠥᠬᠥᠭᠡᠷᠦᠮᠵᠢ ᠳᠦ ᠨᠡᠮᠡᠵᠦ ᠂ ᠨᠢᠭᠡᠨᠲᠡ ᠠᠳᠠᠯᠢ ᠨᠢᠭᠡᠨ ᠲᠥᠬᠥᠭᠡᠷᠦᠮᠵᠢ ᠳᠣᠲᠣᠷᠠᠬᠢ ᠨᠥᠭᠥᠭᠡ ᠨᠢᠭᠡ ᠠᠷᠭ᠎ᠠ ᠵᠠᠮ ᠨᠡᠮᠡᠵᠡᠢ ! - + Add search folder failed, another path which is in the same device has been added! ᠡᠷᠢᠬᠦ ᠪᠢᠴᠢᠭ᠌ ᠮᠠᠲ᠋ᠧᠷᠢᠶᠠᠯ ᠢ ᠨᠡᠮᠡᠵᠦ ᠢᠯᠠᠭᠳᠠᠵᠠᠢ ᠂ ᠨᠢᠭᠡᠨᠲᠡ ᠠᠳᠠᠯᠢ ᠨᠢᠭᠡᠨ ᠲᠥᠬᠥᠭᠡᠷᠦᠮᠵᠢ ᠳᠣᠲᠣᠷᠠᠬᠢ ᠨᠥᠭᠥᠭᠡ ᠨᠢᠭᠡ ᠠᠷᠭ᠎ᠠ ᠵᠠᠮ ᠢ ᠨᠡᠮᠡᠵᠡᠢ ! - + Add search folder failed, choosen path is not exists! ᠨᠡᠮᠡᠵᠦ ᠡᠷᠢᠬᠦ ᠭᠠᠷᠴᠠᠭ ᠢᠯᠠᠭᠳᠠᠵᠠᠢ ᠂ ᠡᠨᠡ ᠭᠠᠷᠴᠠᠭ ᠣᠷᠣᠰᠢᠬᠤ ᠦᠭᠡᠢ ! - + Add search folder failed, permission denied! ᠡᠷᠢᠬᠦ ᠭᠠᠷᠴᠠᠭ ᠢ ᠨᠡᠮᠡᠵᠦ ᠢᠯᠠᠭᠳᠠᠵᠠᠢ ᠂ ᠡᠨᠡ ᠭᠠᠷᠴᠠᠭ ᠢ ᠰᠤᠷᠪᠤᠯᠵᠢᠯᠠᠬᠤ ᠡᠷᠬᠡ ᠦᠭᠡᠢ ! diff --git a/search-ukcc-plugin/translations/zh_CN.ts b/search-ukcc-plugin/translations/zh_CN.ts index 1871dc0..56a2e2a 100644 --- a/search-ukcc-plugin/translations/zh_CN.ts +++ b/search-ukcc-plugin/translations/zh_CN.ts @@ -42,13 +42,13 @@ 360 - + Block Folders 排除的文件夹 /Search/Block Folders - + Following folders will not be searched. You can set it by adding and removing folders. 搜索将不查看以下文件夹,通过添加和删除可以设置排除的文件夹位置 @@ -57,14 +57,14 @@ 添加 - - + + delete 删除 - - + + Directories 文件夹 @@ -74,151 +74,151 @@ /Search/File Content Search - + show more results that match the keyword 显示更多与输入内容匹配的搜索结果 - + Fuzzy Search 模糊搜索 - + Create file index 文件索引 /Search/Create file index - + Create file content index 文件内容索引 /Search/Create file content index - + Precise Search 精确搜索 - + show the results that exactly match the keyword 仅显示与输入内容完全一致的搜索结果 - + Search Folders 搜索范围 /Search/Search Folders - + Following folders will be searched. You can set it by adding and removing folders. 以下文件的内容将出现在全局搜索的结果中 - + select blocked folder 选择排除的文件夹 - - + + Select 选择 - - + + Position: 位置 - - + + FileName: 文件名 - - + + FileType: 类型 - - + + Cancel 取消 - - - - - - - - - - - + + + + + + + + + + + Warning 警告 - - + + Add search folder failed, hidden path is not supported! 添加失败,不支持隐藏目录! - + Add search folder failed, permission denied! 添加失败,该目录无权限访问! - + Add blocked folder failed, its parent dir has been added! 添加失败,父目录已被添加! - + Add blocked folder failed, choosen path is not exist! 添加失败,要添加的路径不存在! - + Add blocked folder failed, it has already been blocked! 添加失败,这个文件夹已经被添加过了! - + select search folder 选择要搜索的文件夹 - + Add search folder failed, choosen path is not supported currently! 添加失败,暂不支持该目录! - + Add search folder failed, another path which is in the same device has been added! 添加失败,文件夹位于重复挂载设备下,相同内容的文件夹已被添加! - + Add search folder failed, choosen path or its parent dir has been added! 添加失败,该目录或其父目录已被添加! - + Add search folder failed, choosen path is in repeat mounted devices and another path which is in the same device has been added! 添加失败,文件夹位于重复挂载设备下,且该设备另一个挂载点的文件夹已被添加! - + Add search folder failed, choosen path is not exists! 添加失败,要添加的路径不存在! diff --git a/translations/libukui-search/libukui-search_bo_CN.ts b/translations/libukui-search/libukui-search_bo_CN.ts index 79eb112..8d84dc0 100644 --- a/translations/libukui-search/libukui-search_bo_CN.ts +++ b/translations/libukui-search/libukui-search_bo_CN.ts @@ -17,34 +17,33 @@ UkuiSearch::AppMatch - Application Description: - ཉེར་སྤྱོད་གོ་རིམ་གྱི་གསལ་བཤད། + ཉེར་སྤྱོད་གོ་རིམ་གྱི་གསལ་བཤད། UkuiSearch::AppSearchPlugin - + Open སྒོ་ཕྱེ་བ། - + Add Shortcut to Desktop ཅོག་ངོས་སུ་མྱུར་འཐེབ་སྣོན་པ། - + Add Shortcut to Panel ལས་འགན་གྱི་སྒྲོམ་ཐོག་མགྱོགས་མྱུར་གྱི་བྱེད་ཐབས་གསར་སྣོན་བྱ་དགོས - + Install སྒྲིག་སྦྱོར་བྱེད་པ diff --git a/translations/libukui-search/libukui-search_mn.ts b/translations/libukui-search/libukui-search_mn.ts index 38adef7..de822c9 100644 --- a/translations/libukui-search/libukui-search_mn.ts +++ b/translations/libukui-search/libukui-search_mn.ts @@ -17,9 +17,8 @@ UkuiSearch::AppMatch - Application Description: - 应用描述: + 应用描述: @@ -33,25 +32,25 @@ UkuiSearch::AppSearchPlugin - + Open ᠨᠡᠬᠡᠬᠡᠬᠦ᠌ - + Add Shortcut to Desktop ᠱᠢᠷᠡᠭᠡᠨ ᠨᠢᠭᠤᠷ᠎ᠤᠨ ᠲᠦᠳᠡ ᠴᠦᠷᠬᠡ᠎ᠶᠢᠨ ᠠᠷᠭ᠎ᠠ᠎ᠳᠤ ᠨᠡᠮᠡᠬᠦ᠌ - + Add Shortcut to Panel ᠡᠬᠦᠷᠭᠡ᠎ᠶᠢᠨ ᠬᠡᠷᠡᠭᠰᠡᠬᠡ᠎ᠶᠢᠨ ᠲᠦᠲᠡ ᠴᠦᠷᠬᠡ᠎ᠳᠦ ᠨᠡᠮᠡᠬᠦ᠌ - + Install ᠤᠭᠰᠠᠷᠠᠬᠤ diff --git a/translations/libukui-search/libukui-search_zh_CN.ts b/translations/libukui-search/libukui-search_zh_CN.ts index e074e29..62cc0c0 100644 --- a/translations/libukui-search/libukui-search_zh_CN.ts +++ b/translations/libukui-search/libukui-search_zh_CN.ts @@ -17,9 +17,8 @@ UkuiSearch::AppMatch - Application Description: - 应用描述: + 应用描述: @@ -33,25 +32,25 @@ UkuiSearch::AppSearchPlugin - + Open 打开 - + Add Shortcut to Desktop 添加到桌面快捷方式 - + Add Shortcut to Panel 添加到任务栏快捷方式 - + Install 安装