summaryrefslogtreecommitdiff
path: root/src/qdoc/config.cpp
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2017-09-28 12:14:38 +0200
committerTopi Reiniƶ <topi.reinio@qt.io>2017-10-17 11:00:06 +0000
commit4c682533ffdabeb7597c98d2ff5f124796d278cc (patch)
tree26ad2024c6bf93252b910ff0e86d1c1e03b33d21 /src/qdoc/config.cpp
parent0f49c09a6fc5d03b100766e781fc0c98cfbdea7a (diff)
downloadqttools-4c682533ffdabeb7597c98d2ff5f124796d278cc.tar.gz
qdoc: Make doc configuration aware of the output format
With the introduction of the WebXML output format, QDoc can no longer assume that the configuration is specific to HTML. In particular, Config variables: - Output directory and subdirectory can now be set for each format. - 'quotinginformation' can now be prefixed with '<format>.' qualifier. Because the same parsed tree of atoms is used for all generators, we need to include both the quoting information and the related code snippets in the list of atoms; generators then decide what to include in the output. Index files: - Look for index files under the output subdirectory for each specified format. This allows per-format configuration and passing multiple formats in 'outputformats' configuration variable. Clean up and refactor the code related to processing doc config variables. Task-number: PYSIDE-363 Change-Id: I66e9c71311689a777fcb445d3b1a8ef070dff93d Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
Diffstat (limited to 'src/qdoc/config.cpp')
-rw-r--r--src/qdoc/config.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qdoc/config.cpp b/src/qdoc/config.cpp
index 46d7c5bf1..685add0f9 100644
--- a/src/qdoc/config.cpp
+++ b/src/qdoc/config.cpp
@@ -342,11 +342,12 @@ int Config::getInt(const QString& var) const
}
/*!
- Function to return the correct outputdir.
+ Function to return the correct outputdir for the output \a format.
+ If \a format is not specified, defaults to 'HTML'.
outputdir can be set using the qdocconf or the command-line
variable -outputdir.
*/
-QString Config::getOutputDir() const
+QString Config::getOutputDir(const QString &format) const
{
QString t;
if (overrideOutputDir.isNull())
@@ -359,7 +360,7 @@ QString Config::getOutputDir() const
}
if (!Generator::useOutputSubdirs()) {
t = t.left(t.lastIndexOf('/'));
- QString singleOutputSubdir = getString("HTML.outputsubdir");
+ QString singleOutputSubdir = getString(format + Config::dot + "outputsubdir");
if (singleOutputSubdir.isEmpty())
singleOutputSubdir = "html";
t += QLatin1Char('/') + singleOutputSubdir;