MCPcopy Create free account
hub / github.com/Entware/Entware / updateList

Method updateList

scripts/config/qconf.cc:418–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416}
417
418void ConfigList::updateList()
419{
420 ConfigItem* last = 0;
421 ConfigItem *item;
422
423 if (!rootEntry) {
424 if (mode != listMode)
425 goto update;
426 QTreeWidgetItemIterator it(this);
427
428 while (*it) {
429 item = (ConfigItem*)(*it);
430 if (!item->menu)
431 continue;
432 item->testUpdateMenu(menu_is_visible(item->menu));
433
434 ++it;
435 }
436 return;
437 }
438
439 if (rootEntry != &rootmenu && (mode == singleMode ||
440 (mode == symbolMode && rootEntry->parent != &rootmenu))) {
441 item = (ConfigItem *)topLevelItem(0);
442 if (!item)
443 item = new ConfigItem(this, 0, true);
444 last = item;
445 }
446 if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) &&
447 rootEntry->sym && rootEntry->prompt) {
448 item = last ? last->nextSibling() : nullptr;
449 if (!item)
450 item = new ConfigItem(this, last, rootEntry, true);
451 else
452 item->testUpdateMenu(true);
453
454 updateMenuList(item, rootEntry);
455 update();
456 resizeColumnToContents(0);
457 return;
458 }
459update:
460 updateMenuList(rootEntry);
461 update();
462 resizeColumnToContents(0);
463}
464
465void ConfigList::updateListForAll()
466{

Callers 2

updateListForAllMethod · 0.80
updateListAllForAllMethod · 0.80

Calls 3

menu_is_visibleFunction · 0.85
testUpdateMenuMethod · 0.80
nextSiblingMethod · 0.80

Tested by

no test coverage detected