summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2015-01-13 15:08:18 +0100
committerTopi Reiniƶ <topi.reinio@digia.com>2015-01-22 12:48:05 +0100
commit3c37066062d61a430b8e7f970cccf6effab5a3ef (patch)
tree6b1b1965b6536069ead5b213760491aaabcfd95b
parent595ed595eabe01a1cf11c8b846fd777de8233721 (diff)
qdoc: Ensure .qhp file is generated for all modules
When run in single-exec mode, QDoc constructs only one instance of HelpProjectWriter, even though it generates documentation for multiple modules in one go. This change adds a reset() function for the help project writer, allowing new parameters to be passed to the existing writer instance, thus ensuring that all .qhp files are correctly generated. Task-number: QTBUG-43815 Change-Id: I1d1c9f713eb5f574a6f8e56616cf5f61bb3e8ff8 Reviewed-by: Martin Smith <martin.smith@digia.com>
-rw-r--r--src/tools/qdoc/helpprojectwriter.cpp10
-rw-r--r--src/tools/qdoc/helpprojectwriter.h3
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp6
3 files changed, 16 insertions, 3 deletions
diff --git a/src/tools/qdoc/helpprojectwriter.cpp b/src/tools/qdoc/helpprojectwriter.cpp
index d0960e48bd..f4b866f856 100644
--- a/src/tools/qdoc/helpprojectwriter.cpp
+++ b/src/tools/qdoc/helpprojectwriter.cpp
@@ -49,8 +49,16 @@ QT_BEGIN_NAMESPACE
HelpProjectWriter::HelpProjectWriter(const Config &config,
const QString &defaultFileName,
Generator* g)
- : gen_(g)
{
+ reset(config, defaultFileName, g);
+}
+
+void HelpProjectWriter::reset(const Config &config,
+ const QString &defaultFileName,
+ Generator* g)
+{
+ projects.clear();
+ gen_ = g;
/*
Get the pointer to the singleton for the qdoc database and
store it locally. This replaces all the local accesses to
diff --git a/src/tools/qdoc/helpprojectwriter.h b/src/tools/qdoc/helpprojectwriter.h
index 2519e62c13..04aa1ce11b 100644
--- a/src/tools/qdoc/helpprojectwriter.h
+++ b/src/tools/qdoc/helpprojectwriter.h
@@ -83,6 +83,9 @@ public:
HelpProjectWriter(const Config &config,
const QString &defaultFileName,
Generator* g);
+ void reset(const Config &config,
+ const QString &defaultFileName,
+ Generator* g);
void addExtraFile(const QString &file);
void addExtraFiles(const QSet<QString> &files);
void generate();
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index fddb53dff1..7cf6c3b609 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -226,7 +226,9 @@ void HtmlGenerator::initializeGenerator(const Config &config)
The help file write should be allocated once and only once
per qdoc execution.
*/
- if (helpProjectWriter == 0)
+ if (helpProjectWriter)
+ helpProjectWriter->reset(config, project.toLower() + ".qhp", this);
+ else
helpProjectWriter = new HelpProjectWriter(config, project.toLower() + ".qhp", this);
// Documentation template handling
@@ -3116,7 +3118,7 @@ void HtmlGenerator::generateQmlItem(const Node *node,
}
marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])</@param>"),
"<i>\\1<sub>\\2</sub></i>");
- marked.replace("<@param>", "<i>");
+ marked.replace("<@param>", "<i> ");
marked.replace("</@param>", "</i>");
if (summary)