diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-10-08 15:21:12 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-10-08 15:21:12 +0200 |
commit | a19d905ea502362d75c1a8115320328c20f8fbf3 (patch) | |
tree | 2631ecae5d70d5c4e547283e18a08cbd098fd436 /src/plugins/debugger/logwindow.cpp | |
parent | a3f5fa09f5e2b177f4fbdc20b49f47e68c2184e5 (diff) | |
parent | f0bd0a8baf5a3579a8b06fe6a8ea3cb41c9e59be (diff) |
Merge remote-tracking branch 'origin/4.10' into 4.11
Change-Id: I9b53d00dbc79d52e52f6e18761e6a6c6faec6c84
Diffstat (limited to 'src/plugins/debugger/logwindow.cpp')
-rw-r--r-- | src/plugins/debugger/logwindow.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/debugger/logwindow.cpp b/src/plugins/debugger/logwindow.cpp index dd9530744b..d50ca6e96c 100644 --- a/src/plugins/debugger/logwindow.cpp +++ b/src/plugins/debugger/logwindow.cpp @@ -552,8 +552,14 @@ void LogWindow::showOutput(int channel, const QString &output) out.append(nchar); m_queuedOutput.append(out); - m_outputTimer.setSingleShot(true); - m_outputTimer.start(80); + // flush the output if it exceeds 16k to prevent out of memory exceptions on regular output + if (m_queuedOutput.size() > 16 * 1024) { + m_outputTimer.stop(); + doOutput(); + } else { + m_outputTimer.setSingleShot(true); + m_outputTimer.start(80); + } } void LogWindow::doOutput() |