| 701 | }; |
| 702 | |
| 703 | bool TopDUContext::findDeclarationsInternal(const SearchItem::PtrList& identifiers, const CursorInRevision& position, |
| 704 | const AbstractType::Ptr& dataType, DeclarationList& ret, |
| 705 | const TopDUContext* /*source*/, SearchFlags flags, uint /*depth*/) const |
| 706 | { |
| 707 | ENSURE_CAN_READ |
| 708 | |
| 709 | #ifdef DEBUG_SEARCH |
| 710 | for (const SearchItem::Ptr& idTree : identifiers) { |
| 711 | const auto ids = idTree->toList(); |
| 712 | for (const QualifiedIdentifier& id : ids) { |
| 713 | qCDebug(LANGUAGE) << "searching item" << id.toString(); |
| 714 | } |
| 715 | } |
| 716 | |
| 717 | #endif |
| 718 | |
| 719 | DeclarationChecker check(this, position, dataType, flags); |
| 720 | FindDeclarationsAcceptor storer(this, ret, check, flags); |
| 721 | |
| 722 | ///The actual scopes are found within applyAliases, and each complete qualified identifier is given to FindDeclarationsAcceptor. |
| 723 | ///That stores the found declaration to the output. |
| 724 | applyAliases(identifiers, storer, position, false); |
| 725 | |
| 726 | return true; |
| 727 | } |
| 728 | |
| 729 | //This is used to prevent endless recursion due to "using namespace .." declarations, by storing all imports that are already being used. |
| 730 | struct TopDUContext::ApplyAliasesBuddyInfo |