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>
This commit is contained in:
Martin Smith 2012-12-21 13:22:54 +01:00 committed by The Qt Project
parent d208c8b247
commit c72cbfc37f
2 changed files with 6 additions and 3 deletions

View File

@ -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;

View File

@ -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;