diff options
author | Martin Smith <martin.smith@digia.com> | 2013-08-07 11:40:27 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-08 08:58:07 +0200 |
commit | bc87acaa1f72d907c68aa6fdb1586191eee8aead (patch) | |
tree | 719e15bdb254de06b1082cb3045229b7f6775c29 /src/tools/qdoc/config.cpp | |
parent | 097942d328cb405a74c14ee0a501640b1390b2d8 (diff) |
qdoc: Restore support for output in one directory
The basic functionality is working. Add these lines
to qt-html-templates-offline.qdocconf, or add them
to the online version:
HTML.nosubdirs = "true"
HTML.outputsubdir = "html"
Before it opens a .html file for writing, it tests
whether the file alread exists. If so, it writes an
error message, e.g.:
...platform-notes.qdoc:140: error: HTML file already exists;
overwriting .../doc/html/platform-notes-windows.html
There are currently nearly 100 files being overwritten for Qt5.
Task-number: QTBUG-32580
Change-Id: I02b103fd00b9d1e624665ac518d571acc791be9d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc/config.cpp')
-rw-r--r-- | src/tools/qdoc/config.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/qdoc/config.cpp b/src/tools/qdoc/config.cpp index a475ccbfb6..c63dba7a01 100644 --- a/src/tools/qdoc/config.cpp +++ b/src/tools/qdoc/config.cpp @@ -279,10 +279,16 @@ int Config::getInt(const QString& var) const */ QString Config::getOutputDir() const { + QString t; if (overrideOutputDir.isNull()) - return getString(QLatin1String(CONFIG_OUTPUTDIR)); + t = getString(QLatin1String(CONFIG_OUTPUTDIR)); else - return overrideOutputDir; + t = overrideOutputDir; + if (!Generator::useOutputSubdirs()) { + t = t.left(t.lastIndexOf('/')); + t += QLatin1Char('/') + getString("HTML.outputsubdir"); + } + return t; } /*! |