| 476 | } |
| 477 | |
| 478 | LaunchConfigurationsModel::LaunchConfigurationsModel(QObject* parent): QAbstractItemModel(parent) |
| 479 | { |
| 480 | auto* global = new GenericPageItem; |
| 481 | global->text = i18n("Global"); |
| 482 | global->row = 0; |
| 483 | const auto projects = Core::self()->projectController()->projects(); |
| 484 | topItems.reserve(1 + projects.size()); |
| 485 | topItems << global; |
| 486 | for (IProject* p : projects) { |
| 487 | auto* t = new ProjectItem; |
| 488 | t->project = p; |
| 489 | t->row = topItems.count(); |
| 490 | topItems << t; |
| 491 | } |
| 492 | const auto launchConfigurations = Core::self()->runControllerInternal()->launchConfigurationsInternal(); |
| 493 | for (LaunchConfiguration* l : launchConfigurations) { |
| 494 | addItemForLaunchConfig( l ); |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | void LaunchConfigurationsModel::addItemForLaunchConfig( LaunchConfiguration* l ) |
| 499 | { |
nothing calls this directly
no test coverage detected