diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 1b1f2ff0..b3bfd2c9 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -358,7 +358,7 @@ PStatement CppParser::doFindStatementOf(const QString &fileName, PStatement statement; getFullNamespace(phrase, namespaceName, remainder); if (!namespaceName.isEmpty()) { // (namespace )qualified Name - PStatementList namespaceList = mNamespaces.value(namespaceName); + PStatementList namespaceList = doFindNamespace(namespaceName); if (!namespaceList || namespaceList->isEmpty()) return PStatement(); @@ -1494,7 +1494,7 @@ PStatement CppParser::addStatement(const PStatement& parent, result->type.squeeze(); mStatementList.add(result); if (result->kind == StatementKind::Namespace) { - PStatementList namespaceList = mNamespaces.value(result->fullName,PStatementList()); + PStatementList namespaceList = doFindNamespace(result->fullName); if (!namespaceList) { namespaceList=std::make_shared(); mNamespaces.insert(result->fullName,namespaceList);