All the call-sites of this function pass 'this' to the first argument. So, 'parent' is always the 'this' pointer.
Unified · Split
| @@ -446,7 +446,7 @@ void ConfigList::updateList() · 445 unmodified lines | |||
| 446 | return; | 446 | return; |
| 447 | } | 447 | } |
| 448 | update: | 448 | update: |
| 449 | updateMenuList(this, rootEntry); | 449 | updateMenuList(rootEntry); |
| 450 | update(); | 450 | update(); |
| 451 | resizeColumnToContents(0); | 451 | resizeColumnToContents(0); |
| 452 | } | 452 | } |
| @@ -524,7 +524,7 @@ void ConfigList::setRootMenu(struct menu *menu) · 71 unmodified lines | |||
| 524 | type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN; | 524 | type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN; |
| 525 | if (type != P_MENU) | 525 | if (type != P_MENU) |
| 526 | return; | 526 | return; |
| 527 | updateMenuList(this, 0); | 527 | updateMenuList(0); |
| 528 | rootEntry = menu; | 528 | rootEntry = menu; |
| 529 | updateListAll(); | 529 | updateListAll(); |
| 530 | if (currentItem()) { | 530 | if (currentItem()) { |
| @@ -628,7 +628,7 @@ hide: · 97 unmodified lines | |||
| 628 | } | 628 | } |
| 629 | } | 629 | } |
| 630 | 630 | ||
| 631 | void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) | 631 | void ConfigList::updateMenuList(struct menu *menu) |
| 632 | { | 632 | { |
| 633 | struct menu* child; | 633 | struct menu* child; |
| 634 | ConfigItem* item; | 634 | ConfigItem* item; |
| @@ -637,19 +637,19 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) · 2 unmodified lines | |||
| 637 | enum prop_type type; | 637 | enum prop_type type; |
| 638 | 638 | ||
| 639 | if (!menu) { | 639 | if (!menu) { |
| 640 | while (parent->topLevelItemCount() > 0) | 640 | while (topLevelItemCount() > 0) |
| 641 | { | 641 | { |
| 642 | delete parent->takeTopLevelItem(0); | 642 | delete takeTopLevelItem(0); |
| 643 | } | 643 | } |
| 644 | 644 | ||
| 645 | return; | 645 | return; |
| 646 | } | 646 | } |
| 647 | 647 | ||
| 648 | last = (ConfigItem*)parent->topLevelItem(0); | 648 | last = (ConfigItem *)topLevelItem(0); |
| 649 | if (last && !last->goParent) | 649 | if (last && !last->goParent) |
| 650 | last = 0; | 650 | last = 0; |
| 651 | for (child = menu->list; child; child = child->next) { | 651 | for (child = menu->list; child; child = child->next) { |
| 652 | item = last ? last->nextSibling() : (ConfigItem*)parent->topLevelItem(0); | 652 | item = last ? last->nextSibling() : (ConfigItem *)topLevelItem(0); |
| 653 | type = child->prompt ? child->prompt->type : P_UNKNOWN; | 653 | type = child->prompt ? child->prompt->type : P_UNKNOWN; |
| 654 | 654 | ||
| 655 | switch (mode) { | 655 | switch (mode) { |
| @@ -670,7 +670,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) · 14 unmodified lines | |||
| 670 | if (!child->sym && !child->list && !child->prompt) | 670 | if (!child->sym && !child->list && !child->prompt) |
| 671 | continue; | 671 | continue; |
| 672 | if (!item || item->menu != child) | 672 | if (!item || item->menu != child) |
| 673 | item = new ConfigItem(parent, last, child, visible); | 673 | item = new ConfigItem(this, last, child, visible); |
| 674 | else | 674 | else |
| 675 | item->testUpdateMenu(visible); | 675 | item->testUpdateMenu(visible); |
| 676 | 676 | ||
| @@ -683,7 +683,7 @@ void ConfigList::updateMenuList(ConfigList *parent, struct menu* menu) · 6 unmodified lines | |||
| 683 | } | 683 | } |
| 684 | hide: | 684 | hide: |
| 685 | if (item && item->menu == child) { | 685 | if (item && item->menu == child) { |
| 686 | last = (ConfigItem*)parent->topLevelItem(0); | 686 | last = (ConfigItem *)topLevelItem(0); |
| 687 | if (last == item) | 687 | if (last == item) |
| 688 | last = 0; | 688 | last = 0; |
| 689 | else while (last->nextSibling() != item) | 689 | else while (last->nextSibling() != item) |
| @@ -102,7 +102,7 @@ public: · 101 unmodified lines | |||
| 102 | bool menuSkip(struct menu *); | 102 | bool menuSkip(struct menu *); |
| 103 | 103 | ||
| 104 | void updateMenuList(ConfigItem *parent, struct menu*); | 104 | void updateMenuList(ConfigItem *parent, struct menu*); |
| 105 | void updateMenuList(ConfigList *parent, struct menu*); | 105 | void updateMenuList(struct menu *menu); |
| 106 | 106 | ||
| 107 | bool updateAll; | 107 | bool updateAll; |
| 108 | 108 | ||