summaryrefslogtreecommitdiffstats
path: root/src/qdbus/qdbusviewer/qdbusviewer.cpp
diff options
context:
space:
mode:
authorAlexander Schlarb <alexander-qt@xmine128.tk>2015-10-09 21:42:31 +0200
committerAlexander Schlarb <alexander-qt@xmine128.tk>2015-10-26 20:26:40 +0000
commit876889cbc4b22e0ef40bd8276b079782ddc55e3b (patch)
tree85c77f41ac8c489c43b284279cfacb7eb550a5ed /src/qdbus/qdbusviewer/qdbusviewer.cpp
parent7a91058c163746f0d2e138460e8d0663bb94a2d6 (diff)
Properly display new lines in QDBusViewer message dumps
Properly convert newline characters (sent by a remote dbus process) to HTML line breaks ("<br/>") to make sure they are displayed correctly. Change-Id: I4b02602cef9ee1d3827458c262c59dd7070a894b Task-number: QTBUG-5403 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/qdbus/qdbusviewer/qdbusviewer.cpp')
-rw-r--r--src/qdbus/qdbusviewer/qdbusviewer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qdbus/qdbusviewer/qdbusviewer.cpp b/src/qdbus/qdbusviewer/qdbusviewer.cpp
index 67a806e45..e2edc29a2 100644
--- a/src/qdbus/qdbusviewer/qdbusviewer.cpp
+++ b/src/qdbus/qdbusviewer/qdbusviewer.cpp
@@ -445,6 +445,8 @@ void QDBusViewer::dumpMessage(const QDBusMessage &message)
QString str = QDBusUtil::argumentToString(arg).toHtmlEscaped();
// turn object paths into clickable links
str.replace(objectPathRegExp, QLatin1String("[ObjectPath: <a href=\"qdbus://bus\\1\">\\1</a>]"));
+ // convert new lines from command to proper HTML line breaks
+ str.replace(QStringLiteral("\n"), QStringLiteral("<br/>"));
out += str;
out += QLatin1String(", ");
}