Commit 20bc9db9 authored by Milian Wolff's avatar Milian Wolff
Browse files

Actually iterate over all declarations from PersistentSymbolTable

The code in DocumentClassesFolder::updateDocument accidentally (?)
only ever checked the very first declaration returned by the symbol
table. This has to be wrong, fix the code to actually iterate over
all returned declarations.
parent 08de627b
......@@ -273,9 +273,9 @@ bool DocumentClassesFolder::updateDocument(const KDevelop::IndexedString& a_file
for (uint i = 0; i < declsCount; ++i) {
// Look for the first valid declaration.
if (decls->declaration()) {
if (auto decl = decls[i].declaration()) {
// See if it should be namespaced.
if (decls->declaration()->kind() == Declaration::Namespace) {
if (decl->kind() == Declaration::Namespace) {
// This should create the namespace folder and add it to the cache.
parentNode = namespaceFolder(parentIdentifier);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment