summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2010-08-19 10:37:40 +0000
committerdeva <deva>2010-08-19 10:37:40 +0000
commit2f96b1102ee14cc5993ecd98aa0fefea81480059 (patch)
treef20471bf6e3f10fdb38b72f94f70029cd086d17b
parentabfe797a62ac5e1bf9d68df076fb8c2662076dbe (diff)
Performance improvements?
-rw-r--r--client/debug.cc10
1 files changed, 6 insertions, 4 deletions
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;