summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/logwindow.cpp
Unidiff
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
@@ -27,26 +27,24 @@ MLogWindow* MLogWindow::_instance;
27 27
28MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f ) 28MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f )
29 :QVBox( parent, name, f ) 29 :QVBox( parent, name, f )
30{ 30{
31 ledit = new QMultiLineEdit( this ); 31 ledit = new QMultiLineEdit( this );
32 ledit->setReadOnly( true ); 32 ledit->setReadOnly( true );
33 ledit->setUndoEnabled( false );
34
33 35
34 MLogWindow::_instance = this; 36 MLogWindow::_instance = this;
35} 37}
36 38
37 39
38void MLogWindow::log( QString text ) 40void MLogWindow::log( QString text )
39{ 41{
40 QTime time = QTime::currentTime(); 42 QTime time = QTime::currentTime();
41 QString line; 43 QString line = QString( "[%1] %2\n" ).arg(time.toString() ).arg( text );
42 line.sprintf( "[%s] %s\n", (const char*) time.toString(), (const char*) text ); 44 ledit->insertLine( line );
43 int col;
44 int row;
45 ledit->getCursorPosition( &col, &row );
46 ledit->insertAt( line, col, row );
47 odebug << line << oendl; 45 odebug << line << oendl;
48} 46}
49 47
50 48
51void MLogWindow::clear() 49void MLogWindow::clear()
52{ 50{