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

Method itemFromIndex

kdevplatform/project/projectmodel.cpp:955–964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

953}
954
955ProjectBaseItem* ProjectModel::itemFromIndex( const QModelIndex& index ) const
956{
957 if( index.row() >= 0 && index.column() == 0 && index.model() == this ) {
958 auto* parent = static_cast<ProjectBaseItem*>( index.internalPointer() );
959 if( parent ) {
960 return parent->child( index.row() );
961 }
962 }
963 return nullptr;
964}
965
966QVariant ProjectModel::data( const QModelIndex& index, int role ) const
967{

Callers 15

lessThanMethod · 0.45
filterAcceptsRowMethod · 0.45
itemFromProxyIndexMethod · 0.45
findItemMethod · 0.45
pathFromIndexMethod · 0.45
currentItemMethod · 0.45
itemsAddedMethod · 0.45
itemFromIndexMethod · 0.45
rowCountMethod · 0.45
indexMethod · 0.45
testCreateTargetItemsMethod · 0.45

Calls 4

rowMethod · 0.45
columnMethod · 0.45
modelMethod · 0.45
childMethod · 0.45

Tested by 8

testCreateTargetItemsMethod · 0.36
testWithProjectMethod · 0.36
runSelectedTestsMethod · 0.36
showSourceMethod · 0.36