| 234 | } |
| 235 | |
| 236 | bool SymbolTreeModel::canFetchMore(const QModelIndex& parent) const |
| 237 | { |
| 238 | if (!parent.isValid()) |
| 239 | return false; |
| 240 | |
| 241 | SymbolTreeNode* parent_node = nodeFromIndex(parent); |
| 242 | if (!parent_node || !parent_node->type.valid()) |
| 243 | return false; |
| 244 | |
| 245 | bool result = false; |
| 246 | m_cpu.GetSymbolGuardian().Read([&](const ccc::SymbolDatabase& database) -> void { |
| 247 | const ccc::ast::Node* parent_type = parent_node->type.lookup_node(database); |
| 248 | if (!parent_type) |
| 249 | return; |
| 250 | |
| 251 | result = nodeHasChildren(*parent_type, database) && !parent_node->childrenFetched(); |
| 252 | }); |
| 253 | |
| 254 | return result; |
| 255 | } |
| 256 | |
| 257 | Qt::ItemFlags SymbolTreeModel::flags(const QModelIndex& index) const |
| 258 | { |
nothing calls this directly
no test coverage detected