diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qdoc/clangcodeparser.cpp | 8 | ||||
-rw-r--r-- | src/qdoc/main.cpp | 3 | ||||
-rw-r--r-- | src/qdoc/node.cpp | 2 | ||||
-rw-r--r-- | src/qdoc/qdocindexfiles.cpp | 2 |
4 files changed, 12 insertions, 3 deletions
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index f72896dfd..c7bb37120 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -416,9 +416,12 @@ CXChildVisitResult ClangVisitor::visitHeader(CXCursor cursor, CXSourceLocation l auto type = clang_getCursorType(cursor); auto baseCursor = clang_getTypeDeclaration(type); auto baseNode = findNodeForCursor(qdb_, baseCursor); - if (!baseNode || !baseNode->isClass()) - return CXChildVisit_Continue; auto classe = static_cast<ClassNode*>(parent_); + if (!baseNode || !baseNode->isClass()) { + QString bcName = fromCXString(clang_getCursorSpelling(baseCursor)); + classe->addUnresolvedBaseClass(access, QStringList(bcName), bcName); + return CXChildVisit_Continue; + } auto baseClasse = static_cast<ClassNode*>(baseNode); classe->addResolvedBaseClass(access, baseClasse); return CXChildVisit_Continue; @@ -1007,6 +1010,7 @@ void ClangCodeParser::parseSourceFile(const Location& /*location*/, const QStrin args.pop_back(); // remove the "-xc++"; } } + qdb_->resolveInheritance(); } args.clear(); args.insert(args.begin(), std::begin(defaultArgs), std::end(defaultArgs)); diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp index 5f29f222c..5ba65ac7f 100644 --- a/src/qdoc/main.cpp +++ b/src/qdoc/main.cpp @@ -452,7 +452,8 @@ static void processQdocconfFile(const QString &fileName) ++h; } - qdb->resolveInheritance(); + // Moved into ClangCodeParser after building PCH + //qdb->resolveInheritance(); /* Parse each source text file in the set using the appropriate parser and diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp index f1af55ca6..ce86661cf 100644 --- a/src/qdoc/node.cpp +++ b/src/qdoc/node.cpp @@ -1680,6 +1680,8 @@ void ClassNode::fixBaseClasses() // Remove private and duplicate base classes. while (i < bases_.size()) { ClassNode* bc = bases_.at(i).node_; + if (!bc) + bc = QDocDatabase::qdocDB()->findClassNode(bases_.at(i).path_); if (bc && (bc->access() == Node::Private || found.contains(bc))) { RelatedClass rc = bases_.at(i); bases_.removeAt(i); diff --git a/src/qdoc/qdocindexfiles.cpp b/src/qdoc/qdocindexfiles.cpp index 4918fe795..3b2601f6f 100644 --- a/src/qdoc/qdocindexfiles.cpp +++ b/src/qdoc/qdocindexfiles.cpp @@ -1016,6 +1016,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, ClassNode* n = related.node_; if (n) baseStrings.insert(n->fullName()); + else if (!related.path_.isEmpty()) + baseStrings.insert(related.path_.join(QLatin1String("::"))); } if (!baseStrings.isEmpty()) { |