diff options
author | David Schulz <[email protected]> | 2024-02-09 06:33:25 +0100 |
---|---|---|
committer | David Schulz <[email protected]> | 2024-02-23 10:25:02 +0000 |
commit | 787c2ccee9b003c580877b150be07e7f6b5db414 (patch) | |
tree | 5a53ac50cef30c199c885c0e33faa965fe9251ab /src/plugins/debugger/cdb | |
parent | b7a8ee92beeddf765d5e6000b9f8188ca8541038 (diff) |
Debugger: ensure final new line after debug messages collected by cdb
Since recently cdb seems to report messages without a final new line.
Change-Id: I6b15d6c5668b7a4bec207d56d86da5a0afa77cb4
Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/debugger/cdb')
-rw-r--r-- | src/plugins/debugger/cdb/cdbengine.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index d292028050a..c7e20aae980 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -2096,9 +2096,11 @@ void CdbEngine::handleExtensionMessage(char t, int token, const QString &what, c } if (what == "debuggee_output") { - const QByteArray decoded = QByteArray::fromHex(message.toUtf8()); - showMessage(QString::fromUtf16(reinterpret_cast<const char16_t *>(decoded.data()), decoded.size() / 2), - AppOutput); + const QByteArray encoded = QByteArray::fromHex(message.toUtf8()); + const QString message = QString::fromUtf16(reinterpret_cast<const char16_t *>( + encoded.data()), + encoded.size() / 2); + showMessage(message.endsWith('\n') ? message : message + '\n', AppOutput); return; } |