1
0
Fork 0

GUI: limit log size

This commit is contained in:
Mr. eXoDia 2014-07-11 01:50:26 +02:00
parent cb2c715445
commit 56fb1b6e40
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}