summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2014-10-16 15:12:59 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2014-10-27 08:59:02 +0100
commit5bfe794aaab34d6aa021b5640972509e3bc6ced8 (patch)
tree3d4357aa5cb927c66aac33ecba59b0b36697d55a /src/testlib
parent1ffe1a9a7c5199e46bf280806456a5d86f314169 (diff)
Remove trailing '\n' in qFormatLogMessage output
Do not automatically add a \n to all messages formatted by qFormatLogMessage. Some backends require a final newline, some don't, so it's best to only append it where it's actually needed. The returned string will be null if the pattern is empty. This allows to differentiate between the case that the pattern just didn't apply (empty line is printed), and the case that qSetMessagePattern(QString()) have been called (nothing is printed). Change-Id: I17fde997a4074f58f82de6dea129948155c322d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestlog.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp
index 7ea953232f..e48fdc1ad0 100644
--- a/src/testlib/qtestlog.cpp
+++ b/src/testlib/qtestlog.cpp
@@ -279,7 +279,6 @@ namespace QTest {
return;
QString msg = qFormatLogMessage(type, context, message);
- msg.chop(1); // remove trailing newline
if (type != QtFatalMsg) {
if (counter.load() <= 0)