From bc87acaa1f72d907c68aa6fdb1586191eee8aead Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 7 Aug 2013 11:40:27 +0200 Subject: 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 --- src/tools/qdoc/config.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/tools/qdoc/config.cpp') 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; } /*! -- cgit v1.2.3