From 2f96b1102ee14cc5993ecd98aa0fefea81480059 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 19 Aug 2010 10:37:40 +0000 Subject: Performance improvements? --- client/debug.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'client') diff --git a/client/debug.cc b/client/debug.cc index 67608a3..f3eab60 100644 --- a/client/debug.cc +++ b/client/debug.cc @@ -97,7 +97,6 @@ DebugWindow::DebugWindow() toolbar2->addAction(wa); connect(fe, SIGNAL(textChanged(QString)), this, SLOT(filter_changed(QString))); - fe->setText(".*"); QSettings settings("Aasimon.org", "Pracro"); settings.beginGroup("DebugWindow"); @@ -105,6 +104,7 @@ DebugWindow::DebugWindow() move(settings.value("pos", QPoint(0, 0)).toPoint()); settings.endGroup(); + timer.setInterval(1000); timer.setSingleShot(true); connect(&timer, SIGNAL(timeout()), lst, SLOT(scrollToBottom())); } @@ -166,8 +166,10 @@ void DebugWindow::log(const char *func, const char *file, const int line, class_str[(unsigned)cl], file, func, line); txt += " : " + msg; - QRegExp r(filter); - if(r.indexIn(txt) == -1) return; + if(filter != "") { + QRegExp r(filter); + if(r.indexIn(txt) == -1) return; + } timer.stop(); @@ -178,7 +180,7 @@ void DebugWindow::log(const char *func, const char *file, const int line, if(cl == _log) item->setBackground(QBrush(QColor(200, 230, 200))); lst->addItem(item); - timer.start(100); + timer.start(); } static DebugWindow* debugwindow = NULL; -- cgit v1.2.3