summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-03-17 09:41:24 +0100
committerTopi Reinio <topi.reinio@qt.io>2020-03-20 09:56:47 +0100
commitcc92cb9329e1fc17758ef432cfa5e2c938a18da0 (patch)
tree2a36a2ae3c9c5bf3c53a57b9829de3451d09ffa4
parent6c28b30cacc72959b8efdb4644b3d2bde2dd86f9 (diff)
downloadqttools-cc92cb9329e1fc17758ef432cfa5e2c938a18da0.tar.gz
qdoc: Support relative paths in the master qdocconf file
In single-exec mode, QDoc loads a master qdocconf file containing a list of paths for each doc project that is part of the build. These paths were considered relative to the current working dir, meaning that one could not use paths relative to the master file. Fixes: QTBUG-82918 Change-Id: I44208620f59fec17f4e35d63852cfaf9f035ab24 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r--src/qdoc/config.cpp3
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/singleexec/singleexec.qdocconf4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/qdoc/config.cpp b/src/qdoc/config.cpp
index 0f5acb406..695d59444 100644
--- a/src/qdoc/config.cpp
+++ b/src/qdoc/config.cpp
@@ -993,9 +993,10 @@ QStringList Config::loadMaster(const QString &fileName)
stream.setCodec("UTF-8");
#endif
QStringList qdocFiles;
+ QDir configDir(QFileInfo(fileName).canonicalPath());
QString line = stream.readLine();
while (!line.isNull()) {
- qdocFiles.append(line);
+ qdocFiles.append(QFileInfo(configDir, line).filePath());
line = stream.readLine();
}
fin.close();
diff --git a/tests/auto/qdoc/generatedoutput/testdata/singleexec/singleexec.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/singleexec/singleexec.qdocconf
index eee0253d0..037cfc74a 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/singleexec/singleexec.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/singleexec/singleexec.qdocconf
@@ -1,2 +1,2 @@
-./testdata/configs/testcpp_singleexec.qdocconf
-./testdata/crossmodule/crossmodule_singleexec.qdocconf
+../configs/testcpp_singleexec.qdocconf
+../crossmodule/crossmodule_singleexec.qdocconf