forked from qt-creator/qt-creator
C++: Fix completion for enum inside member functions
Task-number: QTCREATORBUG-13757 Change-Id: I283306b0c8348ee82e8e9bf47d404c1ecd473fde Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
fb396ffbd4
commit
4c6ad5e305
@@ -824,13 +824,15 @@ ClassOrNamespace *ClassOrNamespace::findBlock(Block *block)
|
||||
{
|
||||
flush();
|
||||
|
||||
QHash<Block *, ClassOrNamespace *>::const_iterator citBlock = _blocks.find(block);
|
||||
if (citBlock != _blocks.end())
|
||||
return citBlock.value();
|
||||
for (ClassOrNamespace *binding = this; binding; binding = binding->_parent) {
|
||||
QHash<Block *, ClassOrNamespace *>::const_iterator citBlock = binding->_blocks.find(block);
|
||||
if (citBlock != binding->_blocks.end())
|
||||
return citBlock.value();
|
||||
|
||||
for (citBlock = _blocks.begin(); citBlock != _blocks.end(); ++citBlock) {
|
||||
if (ClassOrNamespace *foundNestedBlock = citBlock.value()->findBlock(block))
|
||||
return foundNestedBlock;
|
||||
for (citBlock = binding->_blocks.begin(); citBlock != binding->_blocks.end(); ++citBlock) {
|
||||
if (ClassOrNamespace *foundNestedBlock = citBlock.value()->findBlock(block))
|
||||
return foundNestedBlock;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user