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

Method startVisiting

plugins/cmake/duchain/usebuilder.cpp:30–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void UseBuilder::startVisiting(CMakeContentIterator* node)
31{
32 for(; node->hasNext(); ) {
33 const CMakeFunctionDesc& func = node->next();
34
35 QString fname = func.name.toLower();
36 if (!s_commands->contains(fname)) {
37 KDevelop::DUChainWriteLocker lock;
38
39 KDevelop::Identifier nameid(fname);
40 QList<KDevelop::Declaration*> declarations = m_ctx->findDeclarations(nameid, func.range().start);
41 if (!declarations.isEmpty()) {
42 newUse(
43 func.nameRange(),
44 KDevelop::DeclarationPointer(declarations.first())
45 );
46 }
47 }
48 }
49}
50
51void UseBuilder::newUse(const KDevelop::RangeInRevision& sr, const KDevelop::DeclarationPointer& d)
52{

Callers 1

runMethod · 0.45

Calls 7

findDeclarationsMethod · 0.80
hasNextMethod · 0.45
nextMethod · 0.45
containsMethod · 0.45
rangeMethod · 0.45
isEmptyMethod · 0.45
firstMethod · 0.45

Tested by

no test coverage detected