kconfig: qconf: remove 'parent' from ConfigList::updateMenuList()
All the call-sites of this function pass 'this' to the first argument. So, 'parent' is always the 'this' pointer. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
1031685c5e
commit
5b75a6c896
@ -446,7 +446,7 @@ void ConfigList::updateList()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
update:
|
update:
|
||||||
updateMenuList(this, rootEntry);
|
updateMenuList(rootEntry);
|
||||||
update();
|
update();
|
||||||
resizeColumnToContents(0);
|
resizeColumnToContents(0);
|
||||||
}
|
}
|
||||||
@ -524,7 +524,7 @@ void ConfigList::setRootMenu(struct menu *menu)
|
|||||||
type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN;
|
type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN;
|
||||||
if (type != P_MENU)
|
if (type != P_MENU)
|
||||||
return;
|
return;
|
||||||
updateMenuList(this, 0);
|
updateMenuList(0);
|
||||||
rootEntry = menu;
|
rootEntry = menu;
|
||||||
updateListAll();
|
updateListAll();
|
||||||
if (currentItem()) {
|
if (currentItem()) {
|
||||||
@ -628,7 +628,7 @@ hide:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
|
void ConfigList::updateMenuList(struct menu *menu)
|
||||||
{
|
{
|
||||||
struct menu* child;
|
struct menu* child;
|
||||||
ConfigItem* item;
|
ConfigItem* item;
|
||||||
@ -637,19 +637,19 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
|
|||||||
enum prop_type type;
|
enum prop_type type;
|
||||||
|
|
||||||
if (!menu) {
|
if (!menu) {
|
||||||
while (parent->topLevelItemCount() > 0)
|
while (topLevelItemCount() > 0)
|
||||||
{
|
{
|
||||||
delete parent->takeTopLevelItem(0);
|
delete takeTopLevelItem(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
last = (ConfigItem*)parent->topLevelItem(0);
|
last = (ConfigItem *)topLevelItem(0);
|
||||||
if (last && !last->goParent)
|
if (last && !last->goParent)
|
||||||
last = 0;
|
last = 0;
|
||||||
for (child = menu->list; child; child = child->next) {
|
for (child = menu->list; child; child = child->next) {
|
||||||
item = last ? last->nextSibling() : (ConfigItem*)parent->topLevelItem(0);
|
item = last ? last->nextSibling() : (ConfigItem *)topLevelItem(0);
|
||||||
type = child->prompt ? child->prompt->type : P_UNKNOWN;
|
type = child->prompt ? child->prompt->type : P_UNKNOWN;
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
@ -670,7 +670,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
|
|||||||
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(this, last, child, visible);
|
||||||
else
|
else
|
||||||
item->testUpdateMenu(visible);
|
item->testUpdateMenu(visible);
|
||||||
|
|
||||||
@ -683,7 +683,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu)
|
|||||||
}
|
}
|
||||||
hide:
|
hide:
|
||||||
if (item && item->menu == child) {
|
if (item && item->menu == child) {
|
||||||
last = (ConfigItem*)parent->topLevelItem(0);
|
last = (ConfigItem *)topLevelItem(0);
|
||||||
if (last == item)
|
if (last == item)
|
||||||
last = 0;
|
last = 0;
|
||||||
else while (last->nextSibling() != item)
|
else while (last->nextSibling() != item)
|
||||||
|
@ -102,7 +102,7 @@ public:
|
|||||||
bool menuSkip(struct menu *);
|
bool menuSkip(struct menu *);
|
||||||
|
|
||||||
void updateMenuList(ConfigItem *parent, struct menu*);
|
void updateMenuList(ConfigItem *parent, struct menu*);
|
||||||
void updateMenuList(ConfigList *parent, struct menu*);
|
void updateMenuList(struct menu *menu);
|
||||||
|
|
||||||
bool updateAll;
|
bool updateAll;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user