From 5fecc6512f0e869713658502674665f9077cc340 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 31 Jan 2014 11:56:10 +0100 Subject: qdoc: Teach qdoc to use multiple trees (part 2) qdoc now knows how to search the forrest of node trees in an optimal order. But there remain some problems with specific searches that cross module boundaries. These include group membership and C++ and QML module membership, as well ass C++ base class resolution. Part 3 will be concerned with fixing these remaining bugs. With this update, qdoc now takes less time to generate the docs for Qt 5. Testing indicates that qdoc run time has dropped from about 14 minutes to about 7.5 minutes on an iMac. Task-number: QTBUG-35377 Change-Id: I6bded6ef54124b4f6e5914cad4548f0b600209b0 Reviewed-by: Martin Smith --- src/tools/qdoc/generator.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/tools/qdoc/generator.cpp') diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp index d563546192..ec8eb14aa9 100644 --- a/src/tools/qdoc/generator.cpp +++ b/src/tools/qdoc/generator.cpp @@ -97,23 +97,26 @@ QStringList Generator::styleDirs; QStringList Generator::styleFiles; bool Generator::debugging_ = false; bool Generator::noLinkErrors_ = false; +bool Generator::autolinkErrors_ = false; bool Generator::redirectDocumentationToDevNull_ = false; Generator::Passes Generator::qdocPass_ = Both; bool Generator::useOutputSubdirs_ = true; -void Generator::setDebugSegfaultFlag(bool b) +void Generator::setDebugFlag(bool b) { +#if 0 if (b) qDebug() << "DEBUG: Setting debug flag."; else qDebug() << "DEBUG: Clearing debug flag."; +#endif debugging_ = b; } /*! Prints \a message as an aid to debugging the release version. */ -void Generator::debugSegfault(const QString& message) +void Generator::debug(const QString& message) { if (debugging()) qDebug() << "DEBUG:" << message; @@ -275,7 +278,7 @@ void Generator::beginSubPage(const InnerNode* node, const QString& fileName) node->location().error(tr("HTML file already exists; overwriting %1").arg(outFile->fileName())); if (!outFile->open(QFile::WriteOnly)) node->location().fatal(tr("Cannot open output file '%1'").arg(outFile->fileName())); - Generator::debugSegfault("Writing: " + path); + Generator::debug("Writing: " + path); outFileNames.insert(fileName,fileName); QTextStream* out = new QTextStream(outFile); @@ -1365,11 +1368,11 @@ void Generator::generateThreadSafeness(const Node *node, CodeMarker *marker) } /*! - Traverses the database recursivly to generate all the documentation. + Traverses the current tree to generate all the documentation. */ -void Generator::generateTree() +void Generator::generateDocs() { - generateInnerNode(qdb_->treeRoot()); + generateInnerNode(qdb_->primaryTreeRoot()); } Generator *Generator::generatorForFormat(const QString& format) @@ -1653,6 +1656,7 @@ void Generator::initialize(const Config &config) else outputPrefixes[QLatin1String("QML")] = QLatin1String("qml-"); noLinkErrors_ = config.getBool(CONFIG_NOLINKERRORS); + autolinkErrors_ = config.getBool(CONFIG_AUTOLINKERRORS); } /*! -- cgit v1.2.3