Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: qconf: remove ConfigItem::visible member

The " (NEW)" string should be displayed regardless of the visibility
of the associated menu.

The ConfigItem::visible member is not used for any other purpose.

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

+18 -25
+11 -17
scripts/kconfig/qconf.cc
··· 175 175 setText(dataColIdx, sym_get_string_value(sym)); 176 176 break; 177 177 } 178 - if (!sym_has_value(sym) && visible) 178 + if (!sym_has_value(sym)) 179 179 prompt += " (NEW)"; 180 180 set_prompt: 181 181 setText(promptColIdx, prompt); 182 182 } 183 183 184 - void ConfigItem::testUpdateMenu(bool v) 184 + void ConfigItem::testUpdateMenu(void) 185 185 { 186 186 ConfigItem* i; 187 187 188 - visible = v; 189 188 if (!menu) 190 189 return; 191 190 ··· 428 429 item = (ConfigItem*)(*it); 429 430 if (!item->menu) 430 431 continue; 431 - item->testUpdateMenu(menu_is_visible(item->menu)); 432 + item->testUpdateMenu(); 432 433 433 434 ++it; 434 435 } ··· 438 439 if (rootEntry != &rootmenu && mode == singleMode) { 439 440 item = (ConfigItem *)topLevelItem(0); 440 441 if (!item) 441 - item = new ConfigItem(this, 0, true); 442 + item = new ConfigItem(this, 0); 442 443 last = item; 443 444 } 444 445 if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) && 445 446 rootEntry->sym && rootEntry->prompt) { 446 447 item = last ? last->nextSibling() : nullptr; 447 448 if (!item) 448 - item = new ConfigItem(this, last, rootEntry, true); 449 + item = new ConfigItem(this, last, rootEntry); 449 450 else 450 - item->testUpdateMenu(true); 451 + item->testUpdateMenu(); 451 452 452 453 updateMenuList(item, rootEntry); 453 454 update(); ··· 596 597 struct menu* child; 597 598 ConfigItem* item; 598 599 ConfigItem* last; 599 - bool visible; 600 600 enum prop_type type; 601 601 602 602 if (!menu) { ··· 627 629 break; 628 630 } 629 631 630 - visible = menu_is_visible(child); 631 632 if (!menuSkip(child)) { 632 633 if (!child->sym && !child->list && !child->prompt) 633 634 continue; 634 635 if (!item || item->menu != child) 635 - item = new ConfigItem(parent, last, child, visible); 636 + item = new ConfigItem(parent, last, child); 636 637 else 637 - item->testUpdateMenu(visible); 638 + item->testUpdateMenu(); 638 639 639 640 if (mode == fullMode || mode == menuMode || type != P_MENU) 640 641 updateMenuList(item, child); ··· 659 662 struct menu* child; 660 663 ConfigItem* item; 661 664 ConfigItem* last; 662 - bool visible; 663 665 enum prop_type type; 664 666 665 667 if (!menu) { ··· 690 694 break; 691 695 } 692 696 693 - visible = menu_is_visible(child); 694 697 if (!menuSkip(child)) { 695 698 if (!child->sym && !child->list && !child->prompt) 696 699 continue; 697 700 if (!item || item->menu != child) 698 - item = new ConfigItem(this, last, child, visible); 701 + item = new ConfigItem(this, last, child); 699 702 else 700 - item->testUpdateMenu(visible); 703 + item->testUpdateMenu(); 701 704 702 705 if (mode == fullMode || mode == menuMode || type != P_MENU) 703 706 updateMenuList(item, child); ··· 1269 1274 return; 1270 1275 for (p = result; *p; p++) { 1271 1276 for_all_prompts((*p), prop) 1272 - lastItem = new ConfigItem(list, lastItem, prop->menu, 1273 - menu_is_visible(prop->menu)); 1277 + lastItem = new ConfigItem(list, lastItem, prop->menu); 1274 1278 } 1275 1279 } 1276 1280
+7 -8
scripts/kconfig/qconf.h
··· 114 114 class ConfigItem : public QTreeWidgetItem { 115 115 typedef class QTreeWidgetItem Parent; 116 116 public: 117 - ConfigItem(ConfigList *parent, ConfigItem *after, struct menu *m, bool v) 118 - : Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false) 117 + ConfigItem(ConfigList *parent, ConfigItem *after, struct menu *m) 118 + : Parent(parent, after), nextItem(0), menu(m), goParent(false) 119 119 { 120 120 init(); 121 121 } 122 - ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v) 123 - : Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false) 122 + ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m) 123 + : Parent(parent, after), nextItem(0), menu(m), goParent(false) 124 124 { 125 125 init(); 126 126 } 127 - ConfigItem(ConfigList *parent, ConfigItem *after, bool v) 128 - : Parent(parent, after), nextItem(0), menu(0), visible(v), goParent(true) 127 + ConfigItem(ConfigList *parent, ConfigItem *after) 128 + : Parent(parent, after), nextItem(0), menu(0), goParent(true) 129 129 { 130 130 init(); 131 131 } 132 132 ~ConfigItem(void); 133 133 void init(void); 134 134 void updateMenu(void); 135 - void testUpdateMenu(bool v); 135 + void testUpdateMenu(void); 136 136 ConfigList* listView() const 137 137 { 138 138 return (ConfigList*)Parent::treeWidget(); ··· 159 159 160 160 ConfigItem* nextItem; 161 161 struct menu *menu; 162 - bool visible; 163 162 bool goParent; 164 163 165 164 static QIcon symbolYesIcon, symbolModIcon, symbolNoIcon;