summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/logwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/wellenreiter/gui/logwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/logwindow.cpp10
1 files changed, 4 insertions, 6 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,12 +40,8 @@ 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 );
+ QString line = QString( "[%1] %2\n" ).arg(time.toString() ).arg( text );
+ ledit->insertLine( line );
odebug << line << oendl;
}