Skip to content

Commit 572cd1d

Browse files
committed
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 <[email protected]>
1 parent 511ff53 commit 572cd1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/kconfig/qconf.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ void ConfigList::keyPressEvent(QKeyEvent* ev)
724724
struct menu *menu;
725725
enum prop_type type;
726726

727-
if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) {
727+
if (ev->key() == Qt::Key_Escape && mode == singleMode) {
728728
emit parentSelected();
729729
ev->accept();
730730
return;

0 commit comments

Comments
 (0)