aboutsummaryrefslogtreecommitdiff
path: root/desktop-utilities/lumina-terminal
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-utilities/lumina-terminal')
-rw-r--r--desktop-utilities/lumina-terminal/TerminalWidget.cpp7
-rw-r--r--desktop-utilities/lumina-terminal/TtyProcess.cpp4
2 files changed, 8 insertions, 3 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; }
diff --git a/desktop-utilities/lumina-terminal/TtyProcess.cpp b/desktop-utilities/lumina-terminal/TtyProcess.cpp
index 366a157b..757223ed 100644
--- a/desktop-utilities/lumina-terminal/TtyProcess.cpp
+++ b/desktop-utilities/lumina-terminal/TtyProcess.cpp
@@ -45,8 +45,8 @@ bool TTYProcess::startTTY(QString prog, QStringList args){
else{
childProc = tmp;
this->setFileName( ptsname(FD) );
- //qDebug() << " - PTY:" << this->portName();
- return this->open(QIODevice::ReadWrite);
+ qDebug() << " - PTY:" << ptsname(FD);
+ return this->open(QIODevice::ReadWrite | QIODevice::Unbuffered);
//return true;
}
}
bgstack15