MCPcopy Create free account
hub / github.com/KDE/kdevelop / getQMLAttribute

Function getQMLAttribute

plugins/qmljs/duchain/helper.cpp:83–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83QmlJS::AST::Statement* getQMLAttribute(QmlJS::AST::UiObjectMemberList* members, const QString& attribute)
84{
85 for (QmlJS::AST::UiObjectMemberList *it = members; it; it = it->next) {
86 // The member needs to be a script binding whose name matches attribute
87 auto* binding = QmlJS::AST::cast<QmlJS::AST::UiScriptBinding*>(it->member);
88
89 if (binding && binding->qualifiedId && binding->qualifiedId->name == attribute) {
90 return binding->statement;
91 }
92 }
93
94 return nullptr;
95}
96
97QString getNodeValue(AST::Node* node)
98{

Callers 2

visitMethod · 0.85
getQMLAttributeValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected