]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
kconfig: qconf: show selected choice in the Value column
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 24 Jun 2025 15:04:51 +0000 (00:04 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 30 Jun 2025 03:39:04 +0000 (12:39 +0900)
It is useful to display the selected choice's value in the Value column.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
scripts/kconfig/qconf.cc

index 546738a5c3b1527c979ae74a76a73f071e5ec162..68640e507ec4396069c7edfbee2c7debfd061541 100644 (file)
@@ -127,6 +127,9 @@ void ConfigItem::updateMenu(void)
                goto set_prompt;
        case M_CHOICE:
                setIcon(promptColIdx, QIcon());
+               sym = sym_calc_choice(menu);
+               if (sym)
+                       setText(dataColIdx, sym->name);
                goto set_prompt;
        default:
                ;
@@ -189,7 +192,11 @@ void ConfigItem::testUpdateMenu(void)
        if (!menu)
                return;
 
-       sym_calc_value(menu->sym);
+       if (menu->type == M_CHOICE)
+               sym_calc_choice(menu);
+       else
+               sym_calc_value(menu->sym);
+
        if (menu->flags & MENU_CHANGED) {
                /* the menu entry changed, so update all list items */
                menu->flags &= ~MENU_CHANGED;