diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-12-06 22:41:17 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-12-07 11:28:15 +0000 |
commit | 0c9706ada92d838e2c0ef0c300e27567d5ef183f (patch) | |
tree | c6ef0a87ce23324f3c5048d232718ad32669b992 /src/libs/cplusplus | |
parent | e2155a91df81e812c4f086d4558ead70c0ed2551 (diff) | |
download | qt-creator-0c9706ada92d838e2c0ef0c300e27567d5ef183f.tar.gz |
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>
Diffstat (limited to 'src/libs/cplusplus')
-rw-r--r-- | src/libs/cplusplus/LookupContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp index dee9e65d21..14d7f922ef 100644 --- a/src/libs/cplusplus/LookupContext.cpp +++ b/src/libs/cplusplus/LookupContext.cpp @@ -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()) { |