diff options
author | Kai Koehne <kai.koehne@digia.com> | 2014-03-13 16:24:08 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-15 10:44:25 +0100 |
commit | 82fd626ded2282a38930ddeb8dbf26bffdae235e (patch) | |
tree | e73c24fac50994340be90c8a0942570b0615e9dc | |
parent | 7fba691110f3c85974b18edb760303e0b0993787 (diff) |
Document %{if-category} in default message pattern
Commit 15ddb91b introduced %{if-category}, and changed the default
message pattern. Adapt the documentation accordingly.
Change-Id: I1d500122300c4d62171de3607553b3a5a822d4a7
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
-rw-r--r-- | src/corelib/global/qlogging.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index f67b87e2bc..8c1d8b867d 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1484,12 +1484,15 @@ void qErrnoWarning(int code, const char *msg, ...) \c %{if-warning}, \c %{if-critical} or \c %{if-fatal} followed by an \c %{endif}. What is inside the \c %{if-*} and \c %{endif} will only be printed if the type matches. + Finally, text inside \c %{if-category} ... \c %{endif} is only printed if the category + is not the default one. + Example: \code QT_MESSAGE_PATTERN="[%{if-debug}D%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}] %{file}:%{line} - %{message}" \endcode - The default \a pattern is "%{message}". + The default \a pattern is "%{if-category}%{category}: %{endif}%{message}". The \a pattern can also be changed at runtime by setting the QT_MESSAGE_PATTERN environment variable; if both qSetMessagePattern() is called and QT_MESSAGE_PATTERN is |