diff options
Diffstat (limited to 'desktop-utilities/lumina-terminal/TerminalWidget.cpp')
-rw-r--r-- | desktop-utilities/lumina-terminal/TerminalWidget.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/desktop-utilities/lumina-terminal/TerminalWidget.cpp b/desktop-utilities/lumina-terminal/TerminalWidget.cpp index 3ab850bb..de7e47ff 100644 --- a/desktop-utilities/lumina-terminal/TerminalWidget.cpp +++ b/desktop-utilities/lumina-terminal/TerminalWidget.cpp @@ -29,7 +29,7 @@ TerminalWidget::TerminalWidget(QWidget *parent, QString dir) : QTextEdit(parent) upTimer = new QTimer(this); upTimer->setInterval(1000); - // connect(upTimer, SIGNAL(timeout()), this, SLOT(UpdateText()) ); + connect(upTimer, SIGNAL(timeout()), this, SLOT(UpdateText()) ); upTimer->start(); } @@ -48,7 +48,12 @@ void TerminalWidget::aboutToClose(){ // ================== void TerminalWidget::UpdateText(){ //read the data from the process + qDebug() << "UpdateText"; if(!PROC->isOpen()){ return; } + if ( PROC->bytesAvailable() <= 0 ) + return; + + qDebug() << "Reading all data"; QByteArray data = PROC->readAll(); //TTY PORT //QByteArray data = PROC->readAllStandardOutput(); //QProcess if(data.length()<=0){ return; } |