diff options
author | Martin Smith <martin.smith@digia.com> | 2012-10-25 14:01:11 +0200 |
---|---|---|
committer | Martin Smith <martin.smith@digia.com> | 2012-10-25 14:19:53 +0200 |
commit | aca24f114627b66e902b4621326cf2b8bc8dbcf6 (patch) | |
tree | ac2ad363e58085bbe7f512cc2b5bfaf8833a1676 /src/tools/qdoc/location.cpp | |
parent | 34d2a7e6b68cfff59c29018b4aea1a7af38512da (diff) |
qdoc: Adding the -log-progress option
qdoc now sends progress log messages to stderr
only if -log-progress appears on the command line.
The progress messages are not printed to stderr
if -log-progress is not used. i.e., -log-progress
is off by default.
Task number: QTBUG-27707
Change-Id: Id605d943506ab38639730bf16473b156d061dc53
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/tools/qdoc/location.cpp')
-rw-r--r-- | src/tools/qdoc/location.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/tools/qdoc/location.cpp b/src/tools/qdoc/location.cpp index 48e5d6153c..ca6521c002 100644 --- a/src/tools/qdoc/location.cpp +++ b/src/tools/qdoc/location.cpp @@ -57,6 +57,7 @@ QT_STATIC_CONST_IMPL Location Location::null; int Location::tabSize; QString Location::programName; QRegExp *Location::spuriousRegExp = 0; +bool Location::logProgress_ = false; /*! \class Location @@ -336,12 +337,15 @@ void Location::information(const QString& message) } /*! - Prints \a message to \c stderr followed by a \c{'\n'}. + Prints \a message to \c stderr followed by a \c{'\n'}, + but only if the -log-progress option is set. */ void Location::logToStdErr(const QString& message) { - fprintf(stderr, "%s\n", message.toLatin1().data()); - fflush(stderr); + if (logProgress_) { + fprintf(stderr, "LOG: %s\n", message.toLatin1().data()); + fflush(stderr); + } } /*! |