linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kconfig: qconf/xconfig: show the OptionsMode radio button setting at startup
@ 2025-08-12 22:35 Randy Dunlap
  2025-08-16 18:49 ` Nicolas Schier
  2025-08-18 18:14 ` Nathan Chancellor
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2025-08-12 22:35 UTC (permalink / raw)
  To: linux-kernel, linux-kbuild
  Cc: Randy Dunlap, Nathan Chancellor, Nicolas Schier,
	Mauro Carvalho Chehab

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>
---
Nathan, Nicolas: do you want me to ask someone else to merge this?
  I don't mind doing that;
  or throw it into your tree and see what breaks.

I know next to nothing about the Qt toolkit, so any comments or
testing are appreciated. There could easily be a better fix for this.
Thanks.

Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nicolas@fjasle.eu>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>

 scripts/kconfig/qconf.cc |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--- linux-next-20250807.orig/scripts/kconfig/qconf.cc
+++ linux-next-20250807/scripts/kconfig/qconf.cc
@@ -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,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kconfig: qconf/xconfig: show the OptionsMode radio button setting at startup
  2025-08-12 22:35 [PATCH] kconfig: qconf/xconfig: show the OptionsMode radio button setting at startup Randy Dunlap
@ 2025-08-16 18:49 ` Nicolas Schier
  2025-08-18 18:14 ` Nathan Chancellor
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Schier @ 2025-08-16 18:49 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: linux-kernel, linux-kbuild, Nathan Chancellor,
	Mauro Carvalho Chehab

[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]

On Tue, Aug 12, 2025 at 03:35:02PM -0700, Randy Dunlap wrote:
> 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>
> ---
> Nathan, Nicolas: do you want me to ask someone else to merge this?
>   I don't mind doing that;
>   or throw it into your tree and see what breaks.
> 
> I know next to nothing about the Qt toolkit, so any comments or
> testing are appreciated. There could easily be a better fix for this.
> Thanks.

Thanks for the fix!  I cannot review this properly but reasoning is
straightforward and testing reveals that its really useful.

Tested-by: Nicolas Schier <nsc@kernel.org>
Acked-by: Nicolas Schier <nsc@kernel.org>


Nathan,  can you take this into kbuild-next?

Kind regards,
Nicolas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kconfig: qconf/xconfig: show the OptionsMode radio button setting at startup
  2025-08-12 22:35 [PATCH] kconfig: qconf/xconfig: show the OptionsMode radio button setting at startup Randy Dunlap
  2025-08-16 18:49 ` Nicolas Schier
@ 2025-08-18 18:14 ` Nathan Chancellor
  1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2025-08-18 18:14 UTC (permalink / raw)
  To: linux-kernel, linux-kbuild, Randy Dunlap
  Cc: Nathan Chancellor, Mauro Carvalho Chehab, Nicolas Schier


On Tue, 12 Aug 2025 15:35:02 -0700, Randy Dunlap wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/1] kconfig: qconf/xconfig: show the OptionsMode radio button setting at startup
      https://git.kernel.org/kbuild/c/75a6b4595daa5

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-18 18:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-12 22:35 [PATCH] kconfig: qconf/xconfig: show the OptionsMode radio button setting at startup Randy Dunlap
2025-08-16 18:49 ` Nicolas Schier
2025-08-18 18:14 ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).