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

Method SearchItem

kdevplatform/language/duchain/ducontext.cpp:1524–1541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1522}
1523
1524DUContext::SearchItem::SearchItem(const QualifiedIdentifier& id, const Ptr& nextItem, int start)
1525 : isExplicitlyGlobal(start == 0 ? id.explicitlyGlobal() : false)
1526{
1527 if (!id.isEmpty()) {
1528 if (id.count() > start)
1529 identifier = id.indexedAt(start);
1530
1531 if (id.count() > start + 1)
1532 addNext(Ptr(new SearchItem(id, nextItem, start + 1)));
1533 else if (nextItem)
1534 next.append(nextItem);
1535 } else if (nextItem) {
1536 ///If there is no prefix, just copy nextItem
1537 isExplicitlyGlobal = nextItem->isExplicitlyGlobal;
1538 identifier = nextItem->identifier;
1539 next = nextItem->next;
1540 }
1541}
1542
1543DUContext::SearchItem::SearchItem(const QualifiedIdentifier& id, const PtrList& nextItems, int start)
1544 : isExplicitlyGlobal(start == 0 ? id.explicitlyGlobal() : false)

Callers

nothing calls this directly

Calls 5

explicitlyGlobalMethod · 0.80
indexedAtMethod · 0.80
isEmptyMethod · 0.45
countMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected