MCPcopy Create free account
hub / github.com/SpartanJ/eepp / iconFor

Method iconFor

src/tools/ecode/plugins/git/gitbranchmodel.cpp:69–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69UIIcon* GitBranchModel::iconFor( const ModelIndex& index ) const {
70 if ( index.column() == (Int64)treeColumn() ) {
71 if ( index.hasParent() ) {
72 Git::Branch* branch = static_cast<Git::Branch*>( index.internalData() );
73 return mPlugin->findIcon(
74 branch->type == Git::RefType::Tag
75 ? GIT_TAG
76 : ( branch->type == Git::RefType::Stash ? GIT_STASH : GIT_REPO ) );
77 }
78 }
79 return nullptr;
80}
81
82Variant GitBranchModel::data( const ModelIndex& index, ModelRole role ) const {
83 switch ( role ) {

Callers

nothing calls this directly

Calls 4

columnMethod · 0.80
internalDataMethod · 0.80
treeColumnFunction · 0.50
findIconMethod · 0.45

Tested by

no test coverage detected