summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc/location.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/qdoc/location.cpp')
-rw-r--r--src/tools/qdoc/location.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/tools/qdoc/location.cpp b/src/tools/qdoc/location.cpp
index 040dd0cd88..923901fc34 100644
--- a/src/tools/qdoc/location.cpp
+++ b/src/tools/qdoc/location.cpp
@@ -256,7 +256,7 @@ QString Location::canonicalRelativePath(const QString &path)
*/
void Location::warning(const QString& message, const QString& details) const
{
- if (!Generator::runPrepareOnly())
+ if (!Generator::preparing())
emitMessage(Warning, message, details);
}
@@ -267,7 +267,7 @@ void Location::warning(const QString& message, const QString& details) const
*/
void Location::error(const QString& message, const QString& details) const
{
- if (!Generator::runPrepareOnly())
+ if (!Generator::preparing())
emitMessage(Error, message, details);
}
@@ -286,6 +286,15 @@ void Location::fatal(const QString& message, const QString& details) const
}
/*!
+ Writes \a message and \a detals to stderr as a formatted
+ report message.
+ */
+void Location::report(const QString& message, const QString& details) const
+{
+ emitMessage(Report, message, details);
+}
+
+/*!
Gets several parameters from the \a config, including
tab size, program name, and a regular expression that
appears to be used for matching certain error messages
@@ -371,7 +380,8 @@ void Location::emitMessage(MessageType type,
result.prepend(tr(": error: "));
else if (type == Warning)
result.prepend(tr(": warning: "));
- result.prepend(toString());
+ if (type != Report)
+ result.prepend(toString());
fprintf(stderr, "%s\n", result.toLatin1().data());
fflush(stderr);
}