]> www.infradead.org Git - users/hch/misc.git/commitdiff
kconfig: qconf/xconfig: show the OptionsMode radio button setting at startup
authorRandy Dunlap <rdunlap@infradead.org>
Tue, 12 Aug 2025 22:35:02 +0000 (15:35 -0700)
committerNathan Chancellor <nathan@kernel.org>
Mon, 18 Aug 2025 17:48:15 +0000 (10:48 -0700)
When qconf (xconfig) exits, it saves the current Option settings
for Show Name, Show Debug Info, and Show {Normal|All|Prompt} Options.
When it is next run, it loads these Option settings from its
config file. It correctly shows the flag settings for Show Name
and Show Debug Info, but it does not show which of the 3 Show...Options
is set. This can lead to confusing output, e.g., if the user thinks
that xconfig is in Show All Options mode but kconfig options which
have an unmet dependency are still being listed.

Add code to show the radio button for the current Show...Options
mode during startup so that it will reflect the current config
setting.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Nicolas Schier <nsc@kernel.org>
Acked-by: Nicolas Schier <nsc@kernel.org>
Link: https://lore.kernel.org/r/20250812223502.1356426-1-rdunlap@infradead.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
scripts/kconfig/qconf.cc

index f8992db1870ab461c121dec55b60d052cd9a5050..b84c9f2485d15ab90aba12814cfda29e11402044 100644 (file)
@@ -1377,6 +1377,19 @@ ConfigMainWindow::ConfigMainWindow(void)
        ConfigList::showPromptAction = new QAction("Show Prompt Options", optGroup);
        ConfigList::showPromptAction->setCheckable(true);
 
+       switch (configList->optMode) {
+       case allOpt:
+               ConfigList::showAllAction->setChecked(true);
+               break;
+       case promptOpt:
+               ConfigList::showPromptAction->setChecked(true);
+               break;
+       case normalOpt:
+       default:
+               ConfigList::showNormalAction->setChecked(true);
+               break;
+       }
+
        QAction *showDebugAction = new QAction("Show Debug Info", this);
          showDebugAction->setCheckable(true);
        connect(showDebugAction, &QAction::toggled,