[PATCH 02/66] kconfig: qconf: do not show checkbox icon for choice

Masahiro Yamada posted 66 patches 3 months, 2 weeks ago
[PATCH 02/66] kconfig: qconf: do not show checkbox icon for choice
Posted by Masahiro Yamada 3 months, 2 weeks ago
When you select "Show All Options" or "Show Prompt Options", choice
entries display a check box icon, but this has no point because
choice is always y since commit

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 scripts/kconfig/qconf.cc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index eaa465b0ccf9..546738a5c3b1 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -92,7 +92,6 @@ void ConfigItem::updateMenu(void)
 {
 	ConfigList* list;
 	struct symbol* sym;
-	struct property *prop;
 	QString prompt;
 	int type;
 	tristate expr;
@@ -105,11 +104,10 @@ void ConfigItem::updateMenu(void)
 	}
 
 	sym = menu->sym;
-	prop = menu->prompt;
 	prompt = menu_get_prompt(menu);
 
-	if (prop) switch (prop->type) {
-	case P_MENU:
+	switch (menu->type) {
+	case M_MENU:
 		if (list->mode == singleMode) {
 			/* a menuconfig entry is displayed differently
 			 * depending whether it's at the view root or a child.
@@ -123,10 +121,13 @@ void ConfigItem::updateMenu(void)
 			setIcon(promptColIdx, QIcon());
 		}
 		goto set_prompt;
-	case P_COMMENT:
+	case M_COMMENT:
 		setIcon(promptColIdx, QIcon());
 		prompt = "*** " + prompt + " ***";
 		goto set_prompt;
+	case M_CHOICE:
+		setIcon(promptColIdx, QIcon());
+		goto set_prompt;
 	default:
 		;
 	}
-- 
2.43.0
Re: [PATCH 02/66] kconfig: qconf: do not show checkbox icon for choice
Posted by Randy Dunlap 3 months, 1 week ago
Hi,

On 6/24/25 8:04 AM, Masahiro Yamada wrote:
> When you select "Show All Options" or "Show Prompt Options", choice
> entries display a check box icon, but this has no point because
> choice is always y since commit
> 

I don't see a check box icon beside the choice entries either before
or after this change. Or do you mean a Radio Button?

(setup: make defconfig for x86_64 in 2 subdirs, one pre-patches
named X64, one post-patches named xx64.)

Enable Show Prompt Options for both testing windows.

E.g., under "Processor types and features", scroll down on the right side
to "TSX enable mode". Under it in each in pre-patches and post-patches,
I see buttons to choose which TSX enable mode to select. They look the
same both pre-patch and post-patch.

What am I missing?


> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  scripts/kconfig/qconf.cc | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
> index eaa465b0ccf9..546738a5c3b1 100644
> --- a/scripts/kconfig/qconf.cc
> +++ b/scripts/kconfig/qconf.cc
> @@ -92,7 +92,6 @@ void ConfigItem::updateMenu(void)
>  {
>  	ConfigList* list;
>  	struct symbol* sym;
> -	struct property *prop;
>  	QString prompt;
>  	int type;
>  	tristate expr;
> @@ -105,11 +104,10 @@ void ConfigItem::updateMenu(void)
>  	}
>  
>  	sym = menu->sym;
> -	prop = menu->prompt;
>  	prompt = menu_get_prompt(menu);
>  
> -	if (prop) switch (prop->type) {
> -	case P_MENU:
> +	switch (menu->type) {
> +	case M_MENU:
>  		if (list->mode == singleMode) {
>  			/* a menuconfig entry is displayed differently
>  			 * depending whether it's at the view root or a child.
> @@ -123,10 +121,13 @@ void ConfigItem::updateMenu(void)
>  			setIcon(promptColIdx, QIcon());
>  		}
>  		goto set_prompt;
> -	case P_COMMENT:
> +	case M_COMMENT:
>  		setIcon(promptColIdx, QIcon());
>  		prompt = "*** " + prompt + " ***";
>  		goto set_prompt;
> +	case M_CHOICE:
> +		setIcon(promptColIdx, QIcon());
> +		goto set_prompt;
>  	default:
>  		;
>  	}

Thanks.
-- 
~Randy
Re: [PATCH 02/66] kconfig: qconf: do not show checkbox icon for choice
Posted by Randy Dunlap 3 months, 1 week ago

On 6/29/25 5:51 PM, Randy Dunlap wrote:
> Hi,
> 
> On 6/24/25 8:04 AM, Masahiro Yamada wrote:
>> When you select "Show All Options" or "Show Prompt Options", choice
>> entries display a check box icon, but this has no point because
>> choice is always y since commit
>>
> 
> I don't see a check box icon beside the choice entries either before
> or after this change. Or do you mean a Radio Button?
> 
> (setup: make defconfig for x86_64 in 2 subdirs, one pre-patches
> named X64, one post-patches named xx64.)
> 
> Enable Show Prompt Options for both testing windows.
> 
> E.g., under "Processor types and features", scroll down on the right side
> to "TSX enable mode". Under it in each in pre-patches and post-patches,
> I see buttons to choose which TSX enable mode to select. They look the
> same both pre-patch and post-patch.
> 
> What am I missing?
> 

Yep, user error. I didn't back out the patches to build xconfig.  :(
My bad.


Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> 
>> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
>> ---
>>
>>  scripts/kconfig/qconf.cc | 11 ++++++-----
>>  1 file changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
>> index eaa465b0ccf9..546738a5c3b1 100644
>> --- a/scripts/kconfig/qconf.cc
>> +++ b/scripts/kconfig/qconf.cc
>> @@ -92,7 +92,6 @@ void ConfigItem::updateMenu(void)
>>  {
>>  	ConfigList* list;
>>  	struct symbol* sym;
>> -	struct property *prop;
>>  	QString prompt;
>>  	int type;
>>  	tristate expr;
>> @@ -105,11 +104,10 @@ void ConfigItem::updateMenu(void)
>>  	}
>>  
>>  	sym = menu->sym;
>> -	prop = menu->prompt;
>>  	prompt = menu_get_prompt(menu);
>>  
>> -	if (prop) switch (prop->type) {
>> -	case P_MENU:
>> +	switch (menu->type) {
>> +	case M_MENU:
>>  		if (list->mode == singleMode) {
>>  			/* a menuconfig entry is displayed differently
>>  			 * depending whether it's at the view root or a child.
>> @@ -123,10 +121,13 @@ void ConfigItem::updateMenu(void)
>>  			setIcon(promptColIdx, QIcon());
>>  		}
>>  		goto set_prompt;
>> -	case P_COMMENT:
>> +	case M_COMMENT:
>>  		setIcon(promptColIdx, QIcon());
>>  		prompt = "*** " + prompt + " ***";
>>  		goto set_prompt;
>> +	case M_CHOICE:
>> +		setIcon(promptColIdx, QIcon());
>> +		goto set_prompt;
>>  	default:
>>  		;
>>  	}
> 
> Thanks.

-- 
~Randy
Re: [PATCH 02/66] kconfig: qconf: do not show checkbox icon for choice
Posted by Randy Dunlap 3 months, 1 week ago

On 6/24/25 8:04 AM, Masahiro Yamada wrote:
> When you select "Show All Options" or "Show Prompt Options", choice
> entries display a check box icon, but this has no point because
> choice is always y since commit

                     since commit _____________________.

> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  scripts/kconfig/qconf.cc | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
> index eaa465b0ccf9..546738a5c3b1 100644
> --- a/scripts/kconfig/qconf.cc
> +++ b/scripts/kconfig/qconf.cc
> @@ -92,7 +92,6 @@ void ConfigItem::updateMenu(void)
>  {
>  	ConfigList* list;
>  	struct symbol* sym;
> -	struct property *prop;
>  	QString prompt;
>  	int type;
>  	tristate expr;
> @@ -105,11 +104,10 @@ void ConfigItem::updateMenu(void)
>  	}
>  
>  	sym = menu->sym;
> -	prop = menu->prompt;
>  	prompt = menu_get_prompt(menu);
>  
> -	if (prop) switch (prop->type) {
> -	case P_MENU:
> +	switch (menu->type) {
> +	case M_MENU:
>  		if (list->mode == singleMode) {
>  			/* a menuconfig entry is displayed differently
>  			 * depending whether it's at the view root or a child.
> @@ -123,10 +121,13 @@ void ConfigItem::updateMenu(void)
>  			setIcon(promptColIdx, QIcon());
>  		}
>  		goto set_prompt;
> -	case P_COMMENT:
> +	case M_COMMENT:
>  		setIcon(promptColIdx, QIcon());
>  		prompt = "*** " + prompt + " ***";
>  		goto set_prompt;
> +	case M_CHOICE:
> +		setIcon(promptColIdx, QIcon());
> +		goto set_prompt;
>  	default:
>  		;
>  	}

-- 
~Randy
Re: [PATCH 02/66] kconfig: qconf: do not show checkbox icon for choice
Posted by Masahiro Yamada 3 months, 1 week ago
On Mon, Jun 30, 2025 at 5:15 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
>
>
> On 6/24/25 8:04 AM, Masahiro Yamada wrote:
> > When you select "Show All Options" or "Show Prompt Options", choice
> > entries display a check box icon, but this has no point because
> > choice is always y since commit
>
>                      since commit _____________________.


since commit fde192511bdb ("kconfig: remove tristate choice support").


I will fix it.
Thanks.



> >
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> >  scripts/kconfig/qconf.cc | 11 ++++++-----
> >  1 file changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
> > index eaa465b0ccf9..546738a5c3b1 100644
> > --- a/scripts/kconfig/qconf.cc
> > +++ b/scripts/kconfig/qconf.cc
> > @@ -92,7 +92,6 @@ void ConfigItem::updateMenu(void)
> >  {
> >       ConfigList* list;
> >       struct symbol* sym;
> > -     struct property *prop;
> >       QString prompt;
> >       int type;
> >       tristate expr;
> > @@ -105,11 +104,10 @@ void ConfigItem::updateMenu(void)
> >       }
> >
> >       sym = menu->sym;
> > -     prop = menu->prompt;
> >       prompt = menu_get_prompt(menu);
> >
> > -     if (prop) switch (prop->type) {
> > -     case P_MENU:
> > +     switch (menu->type) {
> > +     case M_MENU:
> >               if (list->mode == singleMode) {
> >                       /* a menuconfig entry is displayed differently
> >                        * depending whether it's at the view root or a child.
> > @@ -123,10 +121,13 @@ void ConfigItem::updateMenu(void)
> >                       setIcon(promptColIdx, QIcon());
> >               }
> >               goto set_prompt;
> > -     case P_COMMENT:
> > +     case M_COMMENT:
> >               setIcon(promptColIdx, QIcon());
> >               prompt = "*** " + prompt + " ***";
> >               goto set_prompt;
> > +     case M_CHOICE:
> > +             setIcon(promptColIdx, QIcon());
> > +             goto set_prompt;
> >       default:
> >               ;
> >       }
>
> --
> ~Randy
>


-- 
Best Regards
Masahiro Yamada