From 86841dc919921924f08fcf88e97da4e15e4e2550 Mon Sep 17 00:00:00 2001 From: kangshuning Date: Tue, 14 Dec 2021 14:40:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?bug#96758=20Esc=E5=85=B3=E9=97=AD=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=20#97277=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/netdetails/netdetail.cpp | 5 ++++- translations/kylin-nm_zh_CN.qm | Bin 7668 -> 7668 bytes translations/kylin-nm_zh_CN.ts | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/frontend/netdetails/netdetail.cpp b/src/frontend/netdetails/netdetail.cpp index 176d1002..611b7ecf 100644 --- a/src/frontend/netdetails/netdetail.cpp +++ b/src/frontend/netdetails/netdetail.cpp @@ -169,6 +169,7 @@ void NetDetail::initUI() securityPage = new SecurityPage(this); createNetPage = new CreatNetPage(this); + this->installEventFilter(this); detailPage->installEventFilter(this); ipv4Page->installEventFilter(this); ipv6Page->installEventFilter(this); @@ -929,8 +930,10 @@ bool NetDetail::eventFilter(QObject *w, QEvent *event) emit confimBtn->clicked(); } return true; + } else if (mEvent->key() == Qt::Key_Escape) { + close(); + return true; } - } return QWidget::eventFilter(w, event); } diff --git a/translations/kylin-nm_zh_CN.qm b/translations/kylin-nm_zh_CN.qm index acb345c396facb4ab35ea136272535c280de5f24..bd54f10ab621662c55e6d9190d37720636cfc7c5 100644 GIT binary patch delta 17 Zcmexj{l$92Q+}5Ez`8q|U-EPF0RT|}2lW5| delta 17 Zcmexj{l$92Q+}5Id&x^TzvSoU0{~O<2tWV; diff --git a/translations/kylin-nm_zh_CN.ts b/translations/kylin-nm_zh_CN.ts index 957563ed..b83b4f4d 100644 --- a/translations/kylin-nm_zh_CN.ts +++ b/translations/kylin-nm_zh_CN.ts @@ -644,7 +644,7 @@ Add Lan Connect - 添加有线连接 + 添加有线网络 From 9bd7487b89c4cabf34aec45f215a21764b493d1b Mon Sep 17 00:00:00 2001 From: kangshuning Date: Wed, 15 Dec 2021 09:29:52 +0800 Subject: [PATCH 2/2] remove useless --- src/frontend/netdetails/netdetail.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/frontend/netdetails/netdetail.cpp b/src/frontend/netdetails/netdetail.cpp index 611b7ecf..4604d6e2 100644 --- a/src/frontend/netdetails/netdetail.cpp +++ b/src/frontend/netdetails/netdetail.cpp @@ -170,11 +170,6 @@ void NetDetail::initUI() createNetPage = new CreatNetPage(this); this->installEventFilter(this); - detailPage->installEventFilter(this); - ipv4Page->installEventFilter(this); - ipv6Page->installEventFilter(this); - securityPage->installEventFilter(this); - createNetPage->installEventFilter(this); centerWidget = new QWidget(this); bottomWidget = new QWidget(this);