summaryrefslogtreecommitdiff
path: root/src/qdoc/clangcodeparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qdoc/clangcodeparser.cpp')
-rw-r--r--src/qdoc/clangcodeparser.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp
index 94ec289cb..142b495be 100644
--- a/src/qdoc/clangcodeparser.cpp
+++ b/src/qdoc/clangcodeparser.cpp
@@ -958,7 +958,8 @@ void ClangCodeParser::buildPCH()
if (!pchFileDir_) {
pchFileDir_.reset(new QTemporaryDir(QDir::tempPath() + QLatin1String("/qdoc_pch")));
if (pchFileDir_->isValid()) {
- const QByteArray module = qdb_->primaryTreeRoot()->tree()->camelCaseModuleName().toUtf8();
+ //const QByteArray module = qdb_->primaryTreeRoot()->tree()->camelCaseModuleName().toUtf8();
+ const QByteArray module = moduleHeader().toUtf8();
QByteArray header;
QByteArray privateHeaderDir;
// Find the path to the module's header (e.g. QtGui/QtGui) to be used
@@ -972,6 +973,15 @@ void ClangCodeParser::buildPCH()
}
}
}
+ if (header.isEmpty()) {
+ for (const auto &p : qAsConst(includePaths_)) {
+ QByteArray candidate = p + "/" + module;
+ if (QFile::exists(QString::fromUtf8(candidate))) {
+ header = candidate;
+ break;
+ }
+ }
+ }
// Find the path to the module's private header directory (e.g.
// include/QtGui/5.8.0/QtGui/private) to use for including all
// the private headers in the PCH.