| 177 | } |
| 178 | |
| 179 | KDevelop::DUChainBase* ClassModel::duObjectForIndex(const QModelIndex& a_index) |
| 180 | { |
| 181 | if (!a_index.isValid()) |
| 182 | return nullptr; |
| 183 | |
| 184 | Node* node = static_cast<Node*>(a_index.internalPointer()); |
| 185 | |
| 186 | if (auto* identifierNode = dynamic_cast<IdentifierNode*>(node)) |
| 187 | return identifierNode->declaration(); |
| 188 | |
| 189 | // Non was found. |
| 190 | return nullptr; |
| 191 | } |
| 192 | |
| 193 | QModelIndex ClassModel::indexForIdentifier(const KDevelop::IndexedQualifiedIdentifier& a_id) |
| 194 | { |
no test coverage detected