GUI: limit log size
This commit is contained in:
parent
cb2c715445
commit
56fb1b6e40
|
|
@ -25,7 +25,9 @@ void LogView::updateStyle()
|
|||
|
||||
void LogView::addMsgToLogSlot(QString msg)
|
||||
{
|
||||
this->moveCursor(QTextCursor::End);
|
||||
if(this->document()->characterCount() > 10000 * 100) //limit the log to ~100mb
|
||||
this->clear();
|
||||
this->setTextCursor(QTextCursor::End);
|
||||
this->insertPlainText(msg);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue