| 416 | } |
| 417 | |
| 418 | void 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 | } |
| 459 | update: |
| 460 | updateMenuList(rootEntry); |
| 461 | update(); |
| 462 | resizeColumnToContents(0); |
| 463 | } |
| 464 | |
| 465 | void ConfigList::updateListForAll() |
| 466 | { |
no test coverage detected