forked from qt-creator/qt-creator
CppTypeHierarchy: Don't keep pointers to temp objects
When building type hierarchy the pointers to list elements were put into queue. Later, the list was modified and it was possible that list detaches causing stored pointers to be invalid. Simplify building type hierarchy by adding helper recursive methods. Fixes: QTCREATORBUG-28529 Change-Id: I240513fc097536d2175e2242766127b92aaa6a82 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -433,7 +433,7 @@ QList<LookupItem> LookupContext::lookup(const Name *name, Scope *scope) const
|
||||
{
|
||||
QList<LookupItem> candidates;
|
||||
|
||||
if (! name)
|
||||
if (!name)
|
||||
return candidates;
|
||||
|
||||
for (; scope; scope = scope->enclosingScope()) {
|
||||
|
||||
Reference in New Issue
Block a user