summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/qdoc/main.cpp')
-rw-r--r--src/tools/qdoc/main.cpp15
1 files changed, 10 insertions, 5 deletions
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