summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qdoc/doc/config/qdoc-project.qdocconf1
-rw-r--r--src/tools/qdoc/main.cpp12
2 files changed, 12 insertions, 1 deletions
diff --git a/src/tools/qdoc/doc/config/qdoc-project.qdocconf b/src/tools/qdoc/doc/config/qdoc-project.qdocconf
index d48e132335..10cdfa417b 100644
--- a/src/tools/qdoc/doc/config/qdoc-project.qdocconf
+++ b/src/tools/qdoc/doc/config/qdoc-project.qdocconf
@@ -26,7 +26,6 @@ exampledirs = .. \
imagedirs = ../../../doc/src/templates/images \
images
-outputdir = ../html
tagfile = ../html/qdoc.tags
qhp.projects = QDoc
diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp
index 8d35692a88..03974c5d04 100644
--- a/src/tools/qdoc/main.cpp
+++ b/src/tools/qdoc/main.cpp
@@ -40,6 +40,7 @@
****************************************************************************/
#include <qglobal.h>
+#include <qlibraryinfo.h>
#include <stdlib.h>
#include "codemarker.h"
#include "codeparser.h"
@@ -172,6 +173,12 @@ static void processQdocconfFile(const QString &fileName)
config.setStringList(CONFIG_NOLINKERRORS, QStringList(noLinkErrors ? "true" : "false"));
config.setStringList(CONFIG_OBSOLETELINKS, QStringList(obsoleteLinks ? "true" : "false"));
+ QString 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());
+
/*
With the default configuration values in place, load
the qdoc configuration file. Note that the configuration
@@ -256,6 +263,11 @@ static void processQdocconfFile(const QString &fileName)
dependModules += config.getStringList(CONFIG_DEPENDS);
+ // Allow modules and third-party application/libraries to link
+ // to the Qt docs without having to explicitly pass --indexdir.
+ if (!indexDirs.contains(documentationPath))
+ indexDirs.append(documentationPath);
+
if (dependModules.size() > 0) {
if (indexDirs.size() > 0) {
for (int i = 0; i < indexDirs.size(); i++) {