| 67 | } |
| 68 | |
| 69 | UIIcon* 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 | |
| 82 | Variant GitBranchModel::data( const ModelIndex& index, ModelRole role ) const { |
| 83 | switch ( role ) { |
nothing calls this directly
no test coverage detected