From b06390cb17114692a9fd5233d77620b385252480 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Tue, 24 Aug 2004 11:53:43 +0000 Subject: 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 --- (limited to 'noncore/net/wellenreiter/gui/logwindow.cpp') 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; } -- cgit v0.9.0.2