diff options
author | Martin Smith <martin.smith@digia.com> | 2012-12-21 13:22:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-11 12:02:21 +0100 |
commit | c72cbfc37f74f6f71d6be92a83f2ac838dbef64e (patch) | |
tree | 0b811ed66f354f93f33986479e880bb952883108 /src | |
parent | d208c8b2474d352223f78e315893ebfaa7c56ec1 (diff) |
qdoc: Fix problem of missing inherited members
This was another bug resulting from modularization.
qdoc is now run twice for each module in Qt 5.
First, qdoc is run with the -prepare flag for each
module. The only thing qdoc generates is the .index
file for each module. Then qdoc is run with the
-generate flag for each module. Here, for each
module, qdoc first reads the .index files for the
modules on which the current module depends. Then
qdoc generates the docs for the module.
qdoc was not reading the index files for the
prerequisite modules, when it was run in the
-prepare phase. This has now been corrected.
qdoc now reads the prerequisite .index files
in both the -prepare phase and the -generate
phase.
Note that this requires that the order qdoc
runs in the -prepare phase must be the same
as the order of building modules when building
Qt 5.
This change also tells qdoc to ignore nodes,
when traversing its main data structure to
output docs, if the nodes came from reading
a .index file, because the docs for these
nodes are generated in the -generate phase
for their respective modules.
Task-number: QTBUG-28508
Change-Id: Id73652ae1c4022e4c9e4f199caab12a854e5f9b4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/qdoc/main.cpp | 4 | ||||
-rw-r--r-- | src/tools/qdoc/qdocindexfiles.cpp | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index 064617e6f4..e6fdbc8ab6 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -357,8 +357,8 @@ static void processQdocconfFile(const QString &fileName) QSet<QString> outputFormats = config.getOutputFormats(); Location outputFormatsLocation = config.lastLocation(); - if (!Generator::runPrepareOnly()) - loadIndexFiles(config); + //if (!Generator::runPrepareOnly()) + loadIndexFiles(config); QSet<QString> excludedDirs; QSet<QString> excludedFiles; diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp index fec4f304e3..a15f0219b5 100644 --- a/src/tools/qdoc/qdocindexfiles.cpp +++ b/src/tools/qdoc/qdocindexfiles.cpp @@ -555,7 +555,10 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer, Node* node, bool generateInternalNodes) { - if (node->subType() == Node::DitaMap) + /* + Don't include index nodes in a new index file. Or DITA map nodes. + */ + if (node->isIndexNode() || node->subType() == Node::DitaMap) return false; QString nodeName; |