MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / typeFromModelIndexToString

Method typeFromModelIndexToString

pcsx2-qt/Debugger/SymbolTree/SymbolTreeModel.cpp:388–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388std::optional<QString> SymbolTreeModel::typeFromModelIndexToString(QModelIndex index)
389{
390 SymbolTreeNode* node = nodeFromIndex(index);
391 if (!node || node->tag != SymbolTreeNode::OBJECT)
392 return std::nullopt;
393
394 QString result;
395 m_cpu.GetSymbolGuardian().Read([&](const ccc::SymbolDatabase& database) -> void {
396 const ccc::ast::Node* type = node->type.lookup_node(database);
397 if (!type)
398 return;
399
400 result = typeToString(type, database);
401 });
402
403 return result;
404}
405
406std::vector<std::unique_ptr<SymbolTreeNode>> SymbolTreeModel::populateChildren(
407 const QString& name,

Callers 1

Calls 3

typeToStringFunction · 0.85
lookup_nodeMethod · 0.80
ReadMethod · 0.45

Tested by

no test coverage detected