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

Method uses

kdevplatform/language/duchain/uses.cpp:187–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187KDevVarLengthArray<IndexedTopDUContext> Uses::uses(const DeclarationId& id) const
188{
189 KDevVarLengthArray<IndexedTopDUContext> ret;
190
191 UsesItem item;
192 item.declaration = id;
193 UsesRequestItem request(item);
194
195 LockedItemRepository::read<Uses>([&](const UsesRepo& repo) {
196 uint index = repo.findIndex(item);
197
198 if (index) {
199 const UsesItem* repositoryItem = repo.itemFromIndex(index);
200 FOREACH_FUNCTION(const IndexedTopDUContext& decl, repositoryItem->uses)
201 ret.append(decl);
202 }
203 });
204
205 return ret;
206}
207}

Callers 15

dumpMethod · 0.45
itemUnderCursorInternalFunction · 0.45
hasUseFunction · 0.45
countUsesFunction · 0.45
addUseMethod · 0.45
removeUseMethod · 0.45
countUsesFunction · 0.45
createUseWidgetsFunction · 0.45
visitMethod · 0.45
highlightDUChainMethod · 0.45
highlightUseMethod · 0.45

Calls 3

findIndexMethod · 0.45
itemFromIndexMethod · 0.45
appendMethod · 0.45

Tested by 15

DeclarationTestFunction · 0.36
testIncludeMethod · 0.36
testReparseMethod · 0.36
testBaseClassesMethod · 0.36
testReparseIncludeMethod · 0.36
testMacrosRangesMethod · 0.36
testMacroUsesMethod · 0.36