diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-02-01 14:00:07 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2010-02-01 14:00:07 +0100 |
commit | f672bff3383e3b6f555d0b7712d105003dea6525 (patch) | |
tree | ccb1082bd0ebbd1a1be249b6707a46861b5fd4e4 /src/plugins/debugger/debuggeroutputwindow.cpp | |
parent | 0f6551c43f12512ecd57242bead784f67d2a3fab (diff) | |
download | qt-creator-f672bff3383e3b6f555d0b7712d105003dea6525.tar.gz |
Fix some code scanning issues.
foreach()-Loops.
Diffstat (limited to 'src/plugins/debugger/debuggeroutputwindow.cpp')
-rw-r--r-- | src/plugins/debugger/debuggeroutputwindow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/debugger/debuggeroutputwindow.cpp b/src/plugins/debugger/debuggeroutputwindow.cpp index ca90c72ada..4a84cd2b14 100644 --- a/src/plugins/debugger/debuggeroutputwindow.cpp +++ b/src/plugins/debugger/debuggeroutputwindow.cpp @@ -349,8 +349,10 @@ void DebuggerOutputWindow::showOutput(int channel, const QString &output) foreach (QString line, output.split('\n')) { // FIXME: QTextEdit asserts on really long lines... const int n = 30000; - if (line.size() > n) - line = line.left(n) + " [...] <cut off>"; + if (line.size() > n) { + line.truncate(n); + line += QLatin1String(" [...] <cut off>"); + } if (line != QLatin1String("(gdb) ")) m_combinedText->appendPlainText(charForChannel(channel) + line); } |