mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-11-07 04:49:18 +00:00
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>
This commit is contained in:
parent
76567f93b3
commit
511ff539c3
@ -175,17 +175,16 @@ void ConfigItem::updateMenu(void)
|
|||||||
setText(dataColIdx, sym_get_string_value(sym));
|
setText(dataColIdx, sym_get_string_value(sym));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!sym_has_value(sym) && visible)
|
if (!sym_has_value(sym))
|
||||||
prompt += " (NEW)";
|
prompt += " (NEW)";
|
||||||
set_prompt:
|
set_prompt:
|
||||||
setText(promptColIdx, prompt);
|
setText(promptColIdx, prompt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigItem::testUpdateMenu(bool v)
|
void ConfigItem::testUpdateMenu(void)
|
||||||
{
|
{
|
||||||
ConfigItem* i;
|
ConfigItem* i;
|
||||||
|
|
||||||
visible = v;
|
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -429,7 +428,7 @@ void ConfigList::updateList()
|
|||||||
item = (ConfigItem*)(*it);
|
item = (ConfigItem*)(*it);
|
||||||
if (!item->menu)
|
if (!item->menu)
|
||||||
continue;
|
continue;
|
||||||
item->testUpdateMenu(menu_is_visible(item->menu));
|
item->testUpdateMenu();
|
||||||
|
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
@ -439,16 +438,16 @@ void ConfigList::updateList()
|
|||||||
if (rootEntry != &rootmenu && mode == singleMode) {
|
if (rootEntry != &rootmenu && mode == singleMode) {
|
||||||
item = (ConfigItem *)topLevelItem(0);
|
item = (ConfigItem *)topLevelItem(0);
|
||||||
if (!item)
|
if (!item)
|
||||||
item = new ConfigItem(this, 0, true);
|
item = new ConfigItem(this, 0);
|
||||||
last = item;
|
last = item;
|
||||||
}
|
}
|
||||||
if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) &&
|
if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) &&
|
||||||
rootEntry->sym && rootEntry->prompt) {
|
rootEntry->sym && rootEntry->prompt) {
|
||||||
item = last ? last->nextSibling() : nullptr;
|
item = last ? last->nextSibling() : nullptr;
|
||||||
if (!item)
|
if (!item)
|
||||||
item = new ConfigItem(this, last, rootEntry, true);
|
item = new ConfigItem(this, last, rootEntry);
|
||||||
else
|
else
|
||||||
item->testUpdateMenu(true);
|
item->testUpdateMenu();
|
||||||
|
|
||||||
updateMenuList(item, rootEntry);
|
updateMenuList(item, rootEntry);
|
||||||
update();
|
update();
|
||||||
@ -597,7 +596,6 @@ void ConfigList::updateMenuList(ConfigItem *parent, struct menu* menu)
|
|||||||
struct menu* child;
|
struct menu* child;
|
||||||
ConfigItem* item;
|
ConfigItem* item;
|
||||||
ConfigItem* last;
|
ConfigItem* last;
|
||||||
bool visible;
|
|
||||||
enum prop_type type;
|
enum prop_type type;
|
||||||
|
|
||||||
if (!menu) {
|
if (!menu) {
|
||||||
@ -629,14 +627,13 @@ void ConfigList::updateMenuList(ConfigItem *parent, struct menu* menu)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
visible = menu_is_visible(child);
|
|
||||||
if (!menuSkip(child)) {
|
if (!menuSkip(child)) {
|
||||||
if (!child->sym && !child->list && !child->prompt)
|
if (!child->sym && !child->list && !child->prompt)
|
||||||
continue;
|
continue;
|
||||||
if (!item || item->menu != child)
|
if (!item || item->menu != child)
|
||||||
item = new ConfigItem(parent, last, child, visible);
|
item = new ConfigItem(parent, last, child);
|
||||||
else
|
else
|
||||||
item->testUpdateMenu(visible);
|
item->testUpdateMenu();
|
||||||
|
|
||||||
if (mode == fullMode || mode == menuMode || type != P_MENU)
|
if (mode == fullMode || mode == menuMode || type != P_MENU)
|
||||||
updateMenuList(item, child);
|
updateMenuList(item, child);
|
||||||
@ -662,7 +659,6 @@ void ConfigList::updateMenuList(struct menu *menu)
|
|||||||
struct menu* child;
|
struct menu* child;
|
||||||
ConfigItem* item;
|
ConfigItem* item;
|
||||||
ConfigItem* last;
|
ConfigItem* last;
|
||||||
bool visible;
|
|
||||||
enum prop_type type;
|
enum prop_type type;
|
||||||
|
|
||||||
if (!menu) {
|
if (!menu) {
|
||||||
@ -694,14 +690,13 @@ void ConfigList::updateMenuList(struct menu *menu)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
visible = menu_is_visible(child);
|
|
||||||
if (!menuSkip(child)) {
|
if (!menuSkip(child)) {
|
||||||
if (!child->sym && !child->list && !child->prompt)
|
if (!child->sym && !child->list && !child->prompt)
|
||||||
continue;
|
continue;
|
||||||
if (!item || item->menu != child)
|
if (!item || item->menu != child)
|
||||||
item = new ConfigItem(this, last, child, visible);
|
item = new ConfigItem(this, last, child);
|
||||||
else
|
else
|
||||||
item->testUpdateMenu(visible);
|
item->testUpdateMenu();
|
||||||
|
|
||||||
if (mode == fullMode || mode == menuMode || type != P_MENU)
|
if (mode == fullMode || mode == menuMode || type != P_MENU)
|
||||||
updateMenuList(item, child);
|
updateMenuList(item, child);
|
||||||
@ -1274,8 +1269,7 @@ void ConfigSearchWindow::search(void)
|
|||||||
return;
|
return;
|
||||||
for (p = result; *p; p++) {
|
for (p = result; *p; p++) {
|
||||||
for_all_prompts((*p), prop)
|
for_all_prompts((*p), prop)
|
||||||
lastItem = new ConfigItem(list, lastItem, prop->menu,
|
lastItem = new ConfigItem(list, lastItem, prop->menu);
|
||||||
menu_is_visible(prop->menu));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -114,25 +114,25 @@ public:
|
|||||||
class ConfigItem : public QTreeWidgetItem {
|
class ConfigItem : public QTreeWidgetItem {
|
||||||
typedef class QTreeWidgetItem Parent;
|
typedef class QTreeWidgetItem Parent;
|
||||||
public:
|
public:
|
||||||
ConfigItem(ConfigList *parent, ConfigItem *after, struct menu *m, bool v)
|
ConfigItem(ConfigList *parent, ConfigItem *after, struct menu *m)
|
||||||
: Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false)
|
: Parent(parent, after), nextItem(0), menu(m), goParent(false)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v)
|
ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m)
|
||||||
: Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false)
|
: Parent(parent, after), nextItem(0), menu(m), goParent(false)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
ConfigItem(ConfigList *parent, ConfigItem *after, bool v)
|
ConfigItem(ConfigList *parent, ConfigItem *after)
|
||||||
: Parent(parent, after), nextItem(0), menu(0), visible(v), goParent(true)
|
: Parent(parent, after), nextItem(0), menu(0), goParent(true)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
~ConfigItem(void);
|
~ConfigItem(void);
|
||||||
void init(void);
|
void init(void);
|
||||||
void updateMenu(void);
|
void updateMenu(void);
|
||||||
void testUpdateMenu(bool v);
|
void testUpdateMenu(void);
|
||||||
ConfigList* listView() const
|
ConfigList* listView() const
|
||||||
{
|
{
|
||||||
return (ConfigList*)Parent::treeWidget();
|
return (ConfigList*)Parent::treeWidget();
|
||||||
@ -159,7 +159,6 @@ public:
|
|||||||
|
|
||||||
ConfigItem* nextItem;
|
ConfigItem* nextItem;
|
||||||
struct menu *menu;
|
struct menu *menu;
|
||||||
bool visible;
|
|
||||||
bool goParent;
|
bool goParent;
|
||||||
|
|
||||||
static QIcon symbolYesIcon, symbolModIcon, symbolNoIcon;
|
static QIcon symbolYesIcon, symbolModIcon, symbolNoIcon;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user