Skip to content

Commit ccf56e5

Browse files
committed
kconfig: qconf: remove wrong ConfigList::firstChild()
This function returns the first child object, but the returned pointer is not compatible with (ConfigItem *). Commit cc1c08e ("kconfig: qconf: don't show goback button on splitMode") uncovered this issue because using the pointer from this function would make qconf crash. (https://lkml.org/lkml/2020/7/18/411) This function does not work. Remove. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 4b20e10 commit ccf56e5

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

scripts/kconfig/qconf.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ void ConfigList::updateList(ConfigItem* item)
434434
}
435435
if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) &&
436436
rootEntry->sym && rootEntry->prompt) {
437-
item = last ? last->nextSibling() : firstChild();
437+
item = last ? last->nextSibling() : nullptr;
438438
if (!item)
439439
item = new ConfigItem(this, last, rootEntry, true);
440440
else

scripts/kconfig/qconf.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ public slots:
9292
{
9393
return this;
9494
}
95-
ConfigItem* firstChild() const
96-
{
97-
return (ConfigItem *)children().first();
98-
}
9995
void addColumn(colIdx idx)
10096
{
10197
showColumn(idx);

0 commit comments

Comments
 (0)