diff options
author | Martin Smith <martin.smith@qt.io> | 2019-06-14 10:42:38 +0200 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2019-06-19 08:53:18 +0200 |
commit | 18f9ac9e9489e48ea756bd89f6f40dd4499c42a3 (patch) | |
tree | 02734515f275ebcbc242c7a9ee3953ee7418c47e | |
parent | 945d7c1f00f08fb1cb29bd548e8c4d0a42857f67 (diff) | |
download | qttools-18f9ac9e9489e48ea756bd89f6f40dd4499c42a3.tar.gz |
qdoc: Don't let qdoc run without a project name
qdoc can't produce useful output if the project variable is
not set in the qdocconf file. This update ensures that the
project name is not empty. If it is empty, qdoc emits an error
message in its log and terminates.
Change-Id: Ic8d84987efe551651a06d720486960c4c62cb8a8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r-- | src/qdoc/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qdoc/main.cpp b/src/qdoc/main.cpp index bb62a9160..ad089eb2e 100644 --- a/src/qdoc/main.cpp +++ b/src/qdoc/main.cpp @@ -242,6 +242,10 @@ static void processQdocconfFile(const QString &fileName) config.load(fileName); QString project = config.getString(CONFIG_PROJECT); QString moduleHeader = config.getString(CONFIG_MODULEHEADER); + if (project.isEmpty()) { + Location::logToStdErrAlways(QLatin1String("qdoc can't run; no project set in qdocconf file")); + exit(1); + } /* Add the defines to the configuration variables. */ |