summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/location.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2012-10-23 15:11:06 +0200
committerMartin Smith <martin.smith@digia.com>2012-10-23 15:45:45 +0200
commit1c370b2215dbef4f7a9c4adcb26ede5faf980922 (patch)
treeda486b2c9bff468470d1df355c58b51ac14cb9a8 /src/tools/qdoc/location.cpp
parent2b6edec5c205fa1162d8b9e91c45fa42bdbda634 (diff)
qdoc: Clear outputdir in -prepare phase only
qdoc now clears the outputdir in the -prepare phase but not in the -generate phase. It also does not print error and warning messages in the -prepare phase. It does print fatal errors in the -prepare phase, of course, and the QML parser prints syntax errors in the -prepare phase, but all the qdoc errors and warnings are only printed in the -generate phase. Task number: QTBUG-27688 Change-Id: I9973a473260b4f79428f6b8e12a5ac35f3be15b4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/tools/qdoc/location.cpp')
-rw-r--r--src/tools/qdoc/location.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/tools/qdoc/location.cpp b/src/tools/qdoc/location.cpp
index ceb5709aae..8964633125 100644
--- a/src/tools/qdoc/location.cpp
+++ b/src/tools/qdoc/location.cpp
@@ -42,7 +42,7 @@
#include <qdebug.h>
#include "config.h"
#include "location.h"
-
+#include "generator.h"
#include <qdir.h>
#include <qregexp.h>
#include <stdlib.h>
@@ -260,25 +260,30 @@ QString Location::canonicalRelativePath(const QString &path) const
/*!
Writes \a message and \a detals to stderr as a formatted
- warning message.
+ warning message. Does not write the message if qdoc is in
+ the Prepare phase.
*/
void Location::warning(const QString& message, const QString& details) const
{
- emitMessage(Warning, message, details);
+ if (!Generator::runPrepareOnly())
+ emitMessage(Warning, message, details);
}
/*!
Writes \a message and \a detals to stderr as a formatted
- error message.
+ error message. Does not write the message if qdoc is in
+ the Prepare phase.
*/
void Location::error(const QString& message, const QString& details) const
{
- emitMessage(Error, message, details);
+ if (!Generator::runPrepareOnly())
+ emitMessage(Error, message, details);
}
/*!
Writes \a message and \a detals to stderr as a formatted
- error message and then exits the program.
+ error message and then exits the program. qdoc prints fatal
+ errors in either phase (Prepare or Generate).
*/
void Location::fatal(const QString& message, const QString& details) const
{