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

Method index

kdevplatform/shell/launchconfigurationdialog.cpp:655–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

653}
654
655QModelIndex LaunchConfigurationsModel::index(int row, int column, const QModelIndex& parent) const
656{
657 if( !hasIndex( row, column, parent ) )
658 return QModelIndex();
659 TreeItem* tree;
660
661 if( !parent.isValid() )
662 {
663 tree = topItems.at( row );
664 } else
665 {
666 auto* t = static_cast<TreeItem*>( parent.internalPointer() );
667 tree = t->children.at( row );
668 }
669 if( tree )
670 {
671 return createIndex( row, column, tree );
672 }
673 return QModelIndex();
674}
675
676QModelIndex LaunchConfigurationsModel::parent(const QModelIndex& child) const
677{

Callers 4

renameSelectedMethod · 0.45
createConfigurationMethod · 0.45
addConfigurationMethod · 0.45

Calls 4

createIndexFunction · 0.85
QModelIndexClass · 0.70
isValidMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected