| 28 | } |
| 29 | |
| 30 | void 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 | |
| 51 | void UseBuilder::newUse(const KDevelop::RangeInRevision& sr, const KDevelop::DeclarationPointer& d) |
| 52 | { |