diff options
author | Topi Reinio <topi.reinio@qt.io> | 2021-12-22 14:06:48 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-01-03 09:55:33 +0000 |
commit | 65f2348734d767ad2fd7d63a425141166708de3d (patch) | |
tree | fd8e47d4566acc04f91eb839590468c8e5d9a3b1 | |
parent | 6b297b7adf6dc2f66e066f06d412e5477fda443e (diff) | |
download | qttools-65f2348734d767ad2fd7d63a425141166708de3d.tar.gz |
qdoc: Ignore empty lines in the master qdocconf file
When compiling a master .qdocconf file either manually or
programmatically, it's possible to end up with empty lines or a trailing
newline in the file. In this case, QDoc fails with less-than-helpful
error message. Ignore empty lines.
Fixes: QTBUG-99409
Done-with: Luca Di Sera <luca.disera@qt.io>
Change-Id: I5157b63bcdbcd65731615fc7bad388a2385d8cfb
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit 18d293ab75b0b081fc6e236b1549ab83e714ed7d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/qdoc/config.cpp | 3 | ||||
-rw-r--r-- | tests/auto/qdoc/generatedoutput/testdata/singleexec/singleexec.qdocconf | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/qdoc/config.cpp b/src/qdoc/config.cpp index 41dc9b2c6..d5e6f9ca3 100644 --- a/src/qdoc/config.cpp +++ b/src/qdoc/config.cpp @@ -989,7 +989,8 @@ QStringList Config::loadMaster(const QString &fileName) QDir configDir(QFileInfo(fileName).canonicalPath()); QString line = stream.readLine(); while (!line.isNull()) { - qdocFiles.append(QFileInfo(configDir, line).filePath()); + if (!line.isEmpty()) + 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 037cfc74a..7a3354329 100644 --- a/tests/auto/qdoc/generatedoutput/testdata/singleexec/singleexec.qdocconf +++ b/tests/auto/qdoc/generatedoutput/testdata/singleexec/singleexec.qdocconf @@ -1,2 +1,4 @@ ../configs/testcpp_singleexec.qdocconf + ../crossmodule/crossmodule_singleexec.qdocconf + |