From 6326746d226fa55175a83d6b197630d75cd6a9cb Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 9 Nov 2012 15:33:02 +0100 Subject: qdoc: better copying of .css files This fix searches for the css files specified in the stylesheets variable. It searches for them in the directory specified as the templatedir. It copies them into the style subdirectory of the outputdir. It also tests QT_INSTALL_DOCS before setting it to the library info. If it was set on the command line, it is not set from the library info. This change also includes some debug code, which will be removed after testing. Task-number: QTBUG-27878 Change-Id: I7a9469b840e13b966aca44b99aebba102e5d4f0c Reviewed-by: Jerome Pasion --- src/tools/qdoc/main.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/tools/qdoc/main.cpp') diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index c70160f6ec..fda9bf1e85 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -261,11 +261,16 @@ static void processQdocconfFile(const QString &fileName) config.setStringList(CONFIG_NOLINKERRORS, QStringList(noLinkErrors ? "true" : "false")); config.setStringList(CONFIG_OBSOLETELINKS, QStringList(obsoleteLinks ? "true" : "false")); - documentationPath = QLibraryInfo::rawLocation(QLibraryInfo::DocumentationPath, - QLibraryInfo::EffectivePaths); - - // Set a few environment variables that can be used from the qdocconf file - qputenv("QT_INSTALL_DOCS", documentationPath.toLatin1()); + /* + If QT_INSTALL_DOCS is not set, set it here so it can be used from + the qdocconf files. + */ + QString qt_install_docs = qgetenv("QT_INSTALL_DOCS"); + if (qt_install_docs.isEmpty()) { + documentationPath = QLibraryInfo::rawLocation(QLibraryInfo::DocumentationPath, + QLibraryInfo::EffectivePaths); + qputenv("QT_INSTALL_DOCS", documentationPath.toLatin1()); + } /* With the default configuration values in place, load -- cgit v1.2.3