MCPcopy Create free account
hub / github.com/KDE/kdevelop / LaunchConfigurationsModel

Method LaunchConfigurationsModel

kdevplatform/shell/launchconfigurationdialog.cpp:478–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478LaunchConfigurationsModel::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
498void LaunchConfigurationsModel::addItemForLaunchConfig( LaunchConfiguration* l )
499{

Callers

nothing calls this directly

Calls 7

projectsMethod · 0.80
projectControllerMethod · 0.80
runControllerInternalMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected