fix: fix bug#127666
Description: 去掉安全、更新、备份、还原相关搜索词条 Log: 去掉安全、更新、备份、还原相关搜索词条
This commit is contained in:
parent
903ba1afd0
commit
ee1458f749
|
@ -1118,67 +1118,7 @@
|
|||
<ChineseFunc2>添加时区</ChineseFunc2>
|
||||
<EnglishFunc1>Date</EnglishFunc1>
|
||||
<EnglishFunc2>Add Timezone</EnglishFunc2>
|
||||
</plugin>
|
||||
<plugin name="security-updates">
|
||||
<pinyinPlugin>gengxin</pinyinPlugin>
|
||||
<pinyinfunc1>beifen</pinyinfunc1>
|
||||
<pinyinfunc2>kaishibeifen</pinyinfunc2>
|
||||
<ChinesePlugin>更新</ChinesePlugin>
|
||||
<ChineseFunc1>备份</ChineseFunc1>
|
||||
<ChineseFunc2>开始备份</ChineseFunc2>
|
||||
<EnglishFunc1>Backup</EnglishFunc1>
|
||||
<EnglishFunc2>Backup</EnglishFunc2>
|
||||
</plugin>
|
||||
<plugin name="security-updates">
|
||||
<pinyinPlugin>gengxin</pinyinPlugin>
|
||||
<pinyinfunc1>gengxin</pinyinfunc1>
|
||||
<pinyinfunc2>chakangengxinlishi</pinyinfunc2>
|
||||
<ChinesePlugin>更新</ChinesePlugin>
|
||||
<ChineseFunc1>更新</ChineseFunc1>
|
||||
<ChineseFunc2>查看更新历史</ChineseFunc2>
|
||||
<EnglishFunc1>upgrade</EnglishFunc1>
|
||||
<EnglishFunc2>View history</EnglishFunc2>
|
||||
</plugin>
|
||||
<plugin name="security-updates">
|
||||
<pinyinPlugin>gengxin</pinyinPlugin>
|
||||
<pinyinfunc1>gengxin</pinyinfunc1>
|
||||
<pinyinfunc2>gengxinshezhi</pinyinfunc2>
|
||||
<ChinesePlugin>更新</ChinesePlugin>
|
||||
<ChineseFunc1>更新</ChineseFunc1>
|
||||
<ChineseFunc2>更新设置</ChineseFunc2>
|
||||
<EnglishFunc1>upgrade</EnglishFunc1>
|
||||
<EnglishFunc2>Update Settings</EnglishFunc2>
|
||||
</plugin>
|
||||
<plugin name="security-updates">
|
||||
<pinyinPlugin>gengxin</pinyinPlugin>
|
||||
<pinyinfunc1>gengxin</pinyinfunc1>
|
||||
<pinyinfunc2>yunxutongzhikegengxindeyingyong</pinyinfunc2>
|
||||
<ChinesePlugin>更新</ChinesePlugin>
|
||||
<ChineseFunc1>更新</ChineseFunc1>
|
||||
<ChineseFunc2>允许通知可更新的应用</ChineseFunc2>
|
||||
<EnglishFunc1>upgrade</EnglishFunc1>
|
||||
<EnglishFunc2>Allowed to renewable notice</EnglishFunc2>
|
||||
</plugin>
|
||||
<plugin name="security-updates">
|
||||
<pinyinPlugin>gengxin</pinyinPlugin>
|
||||
<pinyinfunc1>gengxin</pinyinfunc1>
|
||||
<pinyinfunc2>zidongxiazaiheanzhuanggengxin</pinyinfunc2>
|
||||
<ChinesePlugin>更新</ChinesePlugin>
|
||||
<ChineseFunc1>更新</ChineseFunc1>
|
||||
<ChineseFunc2>自动下载和安装更新</ChineseFunc2>
|
||||
<EnglishFunc1>upgrade</EnglishFunc1>
|
||||
<EnglishFunc2>Automatically download and install updates</EnglishFunc2>
|
||||
</plugin>
|
||||
<plugin name="security-updates">
|
||||
<pinyinPlugin>gengxin</pinyinPlugin>
|
||||
<pinyinfunc1>beifen</pinyinfunc1>
|
||||
<pinyinfunc2>kaishihuanyuan</pinyinfunc2>
|
||||
<ChinesePlugin>更新</ChinesePlugin>
|
||||
<ChineseFunc1>备份</ChineseFunc1>
|
||||
<ChineseFunc2>开始还原</ChineseFunc2>
|
||||
<EnglishFunc1>Backup</EnglishFunc1>
|
||||
<EnglishFunc2>Restore</EnglishFunc2>
|
||||
</plugin>
|
||||
</plugin>
|
||||
<plugin name="application">
|
||||
<pinyinPlugin>yingyong</pinyinPlugin>
|
||||
<pinyinfunc1>kaijiqidong</pinyinfunc1>
|
||||
|
@ -1249,16 +1189,6 @@
|
|||
<EnglishFunc1>defaultapp</EnglishFunc1>
|
||||
<EnglishFunc2>Text Editor</EnglishFunc2>
|
||||
</plugin>
|
||||
<plugin name="security">
|
||||
<pinyinPlugin>anquan</pinyinPlugin>
|
||||
<pinyinfunc1>anquanzhongxin</pinyinfunc1>
|
||||
<pinyinfunc2>dakaianquanzhongxin</pinyinfunc2>
|
||||
<ChinesePlugin>安全</ChinesePlugin>
|
||||
<ChineseFunc1>安全中心</ChineseFunc1>
|
||||
<ChineseFunc2>打开安全中心</ChineseFunc2>
|
||||
<EnglishFunc1>securitycenter</EnglishFunc1>
|
||||
<EnglishFunc2>Run Security Center</EnglishFunc2>
|
||||
</plugin>
|
||||
<plugin name="search">
|
||||
<pinyinPlugin>sousuo</pinyinPlugin>
|
||||
<pinyinfunc1>sousuo</pinyinfunc1>
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <QCompleter>
|
||||
#include <QRegularExpression>
|
||||
#include <mainwindow.h>
|
||||
#include <QProcess>
|
||||
|
||||
extern "C" {
|
||||
#include <glib.h>
|
||||
|
@ -59,7 +60,7 @@ SearchWidget::SearchWidget(QWidget *parent)
|
|||
this->setCompleter(m_completer);
|
||||
m_completer->setWrapAround(false);
|
||||
m_completer->installEventFilter(this);
|
||||
is_ExitBluetooth = MainWindow::isExitBluetooth();
|
||||
mIsExitBluetooth = isExitBluetooth();
|
||||
|
||||
connect(this, &QLineEdit::textEdited, this, [ = ] {
|
||||
if (text() != "") {
|
||||
|
@ -262,7 +263,7 @@ void SearchWidget::loadxml() {
|
|||
}
|
||||
|
||||
if ((!g_file_test("/usr/sbin/ksc-defender", G_FILE_TEST_EXISTS) && m_searchBoxStruct.fullPagePath.contains("securitycenter",Qt::CaseInsensitive))
|
||||
|| (!is_ExitBluetooth && m_searchBoxStruct.fullPagePath.contains("bluetooth",Qt::CaseInsensitive))
|
||||
|| (!mIsExitBluetooth && m_searchBoxStruct.fullPagePath.contains("bluetooth",Qt::CaseInsensitive))
|
||||
|| (!Utils::isCommunity() && m_searchBoxStruct.fullPagePath.contains("update")) ) {
|
||||
break;
|
||||
}
|
||||
|
@ -537,6 +538,19 @@ void SearchWidget::initExcludeSearch() {
|
|||
}
|
||||
}
|
||||
|
||||
void SearchWidget::isExitBluetooth()
|
||||
{
|
||||
QProcess process;
|
||||
process.start("rfkill list");
|
||||
process.waitForFinished();
|
||||
QByteArray output = process.readAllStandardOutput();
|
||||
QString str_output = output;
|
||||
bool isDevice = str_output.contains(QString("hci"), Qt::CaseInsensitive);
|
||||
bool isAddress = true;
|
||||
|
||||
mIsExitBluetooth = (isDevice && isAddress);
|
||||
}
|
||||
|
||||
void SearchWidget::setLanguage(QString type) {
|
||||
m_lang = type;
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ private:
|
|||
void appendChineseData(SearchBoxStruct data);
|
||||
void clearSearchData();
|
||||
void initExcludeSearch();
|
||||
void isExitBluetooth();
|
||||
|
||||
private:
|
||||
QStandardItemModel *m_model;
|
||||
|
@ -81,7 +82,7 @@ private:
|
|||
QList<QString> m_TxtList;
|
||||
|
||||
QStringList mExcludeList;
|
||||
bool is_ExitBluetooth = false;
|
||||
bool mIsExitBluetooth = false;
|
||||
int count;
|
||||
};
|
||||
#endif // SEARCHWIDGET_H
|
||||
|
|
Loading…
Reference in New Issue