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

Method pathFromIndex

kdevplatform/project/projectmodel.cpp:908–923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

906}
907
908QStringList ProjectModel::pathFromIndex(const QModelIndex& index) const
909{
910 if (!index.isValid())
911 return QStringList();
912
913 QModelIndex idx = index;
914 QStringList list;
915 do {
916 QString t = data(idx, Qt::DisplayRole).toString();
917 list.prepend(t);
918 QModelIndex parent = idx.parent();
919 idx = parent.sibling(parent.row(), index.column());
920 } while (idx.isValid());
921
922 return list;
923}
924
925int ProjectModel::columnCount( const QModelIndex& ) const
926{

Callers 11

launchAsMethod · 0.45
initializeFromItemMethod · 0.45
removeProjectBasePathFunction · 0.45
joinProjectBasePathFunction · 0.45
testCreateTargetItemsMethod · 0.45
indexToConfigStringMethod · 0.45
launcherSuggestionsMethod · 0.45
suggestionTriggeredMethod · 0.45
visitMethod · 0.45

Calls 8

QStringListClass · 0.85
siblingMethod · 0.80
dataFunction · 0.50
isValidMethod · 0.45
toStringMethod · 0.45
parentMethod · 0.45
rowMethod · 0.45
columnMethod · 0.45

Tested by 2

testCreateTargetItemsMethod · 0.36