Changeset View
Changeset View
Standalone View
Standalone View
codecompletion/context.cpp
Show First 20 Lines • Show All 639 Lines • ▼ Show 20 Line(s) | 631 | { | |||
---|---|---|---|---|---|
640 | foreach ( const QString& component, components ) { | 640 | foreach ( const QString& component, components ) { | ||
641 | if ( ! alnum.exactMatch(component) ) return items; | 641 | if ( ! alnum.exactMatch(component) ) return items; | ||
642 | } | 642 | } | ||
643 | 643 | | |||
644 | if ( components.isEmpty() ) { | 644 | if ( components.isEmpty() ) { | ||
645 | return items; | 645 | return items; | ||
646 | } | 646 | } | ||
647 | 647 | | |||
648 | Declaration* existing = Helper::declarationForName(QualifiedIdentifier(components.first()), | 648 | Declaration* existing = Helper::declarationForName(components.first(), m_position, | ||
649 | RangeInRevision(m_position, m_position), | | |||
650 | DUChainPointer<const DUContext>(m_duContext.data())); | 649 | DUChainPointer<const DUContext>(m_duContext.data())); | ||
651 | if ( existing ) { | 650 | if ( existing ) { | ||
652 | // There's already a declaration for the first component; no need to suggest it | 651 | // There's already a declaration for the first component; no need to suggest it | ||
653 | return items; | 652 | return items; | ||
654 | } | 653 | } | ||
655 | 654 | | |||
656 | // See if there's a module called like that. | 655 | // See if there's a module called like that. | ||
657 | auto found = ContextBuilder::findModulePath(components.join("."), m_workingOnDocument); | 656 | auto found = ContextBuilder::findModulePath(components.join("."), m_workingOnDocument); | ||
▲ Show 20 Lines • Show All 652 Lines • Show Last 20 Lines |