| 93 | } |
| 94 | |
| 95 | Variant data( const ModelIndex& index, ModelRole role ) const override { |
| 96 | LSPSymbolInformation* node = static_cast<LSPSymbolInformation*>( index.internalData() ); |
| 97 | if ( node == nullptr ) |
| 98 | return {}; |
| 99 | |
| 100 | if ( role == ModelRole::Display ) { |
| 101 | return Variant( node->name.c_str() ); |
| 102 | } else if ( role == ModelRole::Icon ) { |
| 103 | return mUISceneNode->findIcon( LSPSymbolKindHelper::toIconString( node->kind ) ); |
| 104 | } |
| 105 | return {}; |
| 106 | } |
| 107 | |
| 108 | protected: |
| 109 | UISceneNode* mUISceneNode{ nullptr }; |
nothing calls this directly
no test coverage detected