diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-10-24 03:17:58 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-11-06 08:46:34 +0900 |
commit | 572cd1d2a9a68b66af98a60f4aad4f01d6589447 (patch) | |
tree | 04812af8cf5e86e8ea53c7249df147cfc7e3880e | |
parent | 511ff539c31d89e3f7132a61dae2ebcb0c4b2912 (diff) | |
download | lwn-572cd1d2a9a68b66af98a60f4aad4f01d6589447.tar.gz lwn-572cd1d2a9a68b66af98a60f4aad4f01d6589447.zip |
kconfig: qconf: avoid unnecessary parentSelected() when ESC is pressed
When the ESC key is pressed, the parentSelected() signal is currently
emitted for singleMode, menuMode, and symbolMode.
However, parentSelected() signal is functional only for singleMode.
In menuMode, the signal is connected to the goBack() slot, but nothing
occurs because configList->rootEntry is always &rootmenu.
In symbolMode (in the right pane), the parentSelected() signal is not
connected to any slot.
This commit prevents the unnecessary emission of the parentSelected()
signal.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
-rw-r--r-- | scripts/kconfig/qconf.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 5b1237bf085a..1948cda048d2 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -724,7 +724,7 @@ void ConfigList::keyPressEvent(QKeyEvent* ev) struct menu *menu; enum prop_type type; - if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) { + if (ev->key() == Qt::Key_Escape && mode == singleMode) { emit parentSelected(); ev->accept(); return; |