diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-10-05 15:02:19 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-10-05 15:06:30 +0200 |
commit | 07de2ef9d312f626b0b63681a8f12af7104570ea (patch) | |
tree | 6b5e144c13c5c2667238568ad0a290a1f0f42f73 | |
parent | 048d0f97b6e49fe03399dcb495608f436ed6562b (diff) |
qdoc: Report file overwrites as debug output instead of errors
Change-Id: Ibf846f2ffb6eeccc7837e8ebb0e59db284436048
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r-- | src/qdoc/generator.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp index def06df60..8b7fc9cb0 100644 --- a/src/qdoc/generator.cpp +++ b/src/qdoc/generator.cpp @@ -237,14 +237,15 @@ QFile *Generator::openSubPageFile(const Node *node, const QString &fileName) auto outPath = redirectDocumentationToDevNull_ ? QStringLiteral("/dev/null") : path; auto outFile = new QFile(outPath); - if (!redirectDocumentationToDevNull_ && outFile->exists()) { - node->location().error(QStringLiteral("Output file already exists; overwriting %1") - .arg(outFile->fileName())); - } + + if (!redirectDocumentationToDevNull_ && outFile->exists()) + qCDebug(lcQdoc) << "Output file already exists; overwriting" << qPrintable(outFile->fileName()); + if (!outFile->open(QFile::WriteOnly)) { node->location().fatal( QStringLiteral("Cannot open output file '%1'").arg(outFile->fileName())); } + qCDebug(lcQdoc, "Writing: %s", qPrintable(path)); outFileNames_ << fileName; return outFile; |