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

Method projectForIndex

kdevplatform/shell/launchconfigurationdialog.cpp:885–893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

883}
884
885IProject* LaunchConfigurationsModel::projectForIndex(const QModelIndex& idx)
886{
887 if(idx.parent().isValid()) {
888 return projectForIndex(idx.parent());
889 } else {
890 const auto* item = dynamic_cast<const ProjectItem*>(topItems[idx.row()]);
891 return item ? item->project : nullptr;
892 }
893}
894
895LaunchConfigPagesContainer::LaunchConfigPagesContainer( const QList<LaunchConfigurationPageFactory*>& factories, QWidget* parent )
896 : QWidget(parent)

Callers 1

createEmptyLauncherMethod · 0.80

Calls 3

isValidMethod · 0.45
parentMethod · 0.45
rowMethod · 0.45

Tested by

no test coverage detected