C++: fix auto completion for member of classes accessed by using

Example:
namespace NS { struct S { int member; void fun(); }; }
using NS::S;
void S::fun()
{
mem// ctrl+space
}

Task-number: QTCREATORBUG-9037
Change-Id: I5a568be1b5c44deb02caa04996167a88a9c5d4d7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Przemyslaw Gorszkowski
2013-09-03 22:51:53 +02:00
committed by Nikolai Kosjar
parent 4b4e5f6990
commit 4836fa0106
3 changed files with 49 additions and 0 deletions

View File

@@ -1380,6 +1380,9 @@ void CppCompletionAssistProcessor::globalCompletion(CPlusPlus::Scope *currentSco
}
for (; currentBinding; currentBinding = currentBinding->parent()) {
foreach (ClassOrNamespace* u, currentBinding->usings())
usingBindings.append(u);
const QList<Symbol *> symbols = currentBinding->symbols();
if (!symbols.isEmpty()) {