MCPcopy Create free account
hub / github.com/Murmele/Gittyup / getDisplayRole

Method getDisplayRole

src/ui/DiffTreeModel.cpp:424–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424QVariant DiffTreeModel::getDisplayRole(const QModelIndex &index) const {
425 Node *node = this->node(index);
426 if (asList() && mMultiColumn) {
427 QFileInfo fileInfo(node->path(true));
428 switch (index.column()) {
429 case 0:
430 return fileInfo.fileName();
431 case 1:
432 return fileInfo.path();
433 default:
434 return ""; // State
435 }
436 }
437 return node->name();
438}
439
440//#############################################################################
441//###### DiffTreeModel::Node ##############################################

Callers

nothing calls this directly

Calls 5

nodeMethod · 0.95
asListFunction · 0.85
columnMethod · 0.80
pathMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected