summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/logwindow.cpp
authormickeyl <mickeyl>2004-08-24 11:53:43 (UTC)
committer mickeyl <mickeyl>2004-08-24 11:53:43 (UTC)
commitb06390cb17114692a9fd5233d77620b385252480 (patch) (side-by-side diff)
tree91de2ed5b0eb6ed739eb6bd0126e2ad004d6a9bd /noncore/net/wellenreiter/gui/logwindow.cpp
parent94611edc1942717faa15861adef25418e40ea626 (diff)
downloadopie-b06390cb17114692a9fd5233d77620b385252480.zip
opie-b06390cb17114692a9fd5233d77620b385252480.tar.gz
opie-b06390cb17114692a9fd5233d77620b385252480.tar.bz2
apply megapatch courtesy Holger 'Zecke' Freyther:
- bump version to 1.0.3-cvs - fix compile warnings - fix PacketViewer not to scroll, when watching in "real time" - fix appending text to log view - update statistics when tab is getting activated
Diffstat (limited to 'noncore/net/wellenreiter/gui/logwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/logwindow.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp
index 714a9a9..a83f700 100644
--- a/noncore/net/wellenreiter/gui/logwindow.cpp
+++ b/noncore/net/wellenreiter/gui/logwindow.cpp
@@ -30,6 +30,8 @@ MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f )
{
ledit = new QMultiLineEdit( this );
ledit->setReadOnly( true );
+ ledit->setUndoEnabled( false );
+
MLogWindow::_instance = this;
}
@@ -38,13 +40,9 @@ MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f )
void MLogWindow::log( QString text )
{
QTime time = QTime::currentTime();
- QString line;
- line.sprintf( "[%s] %s\n", (const char*) time.toString(), (const char*) text );
- int col;
- int row;
- ledit->getCursorPosition( &col, &row );
- ledit->insertAt( line, col, row );
- odebug << line << oendl;
+ QString line = QString( "[%1] %2\n" ).arg(time.toString() ).arg( text );
+ ledit->insertLine( line );
+ odebug << line << oendl;
}