aboutsummaryrefslogtreecommitdiff
path: root/desktop-utilities
diff options
context:
space:
mode:
authorKris Moore <kris@pcbsd.org>2016-03-10 07:07:26 -0500
committerKris Moore <kris@pcbsd.org>2016-03-10 07:07:26 -0500
commit1fcc56c5cec2560b430cde8f130413aa8bbf9af6 (patch)
tree848fb4943cad03a0477baa17b9b12744310e7dc3 /desktop-utilities
parentFix a freeze when starting the pty process, can't ReadAll() if nothing (diff)
downloadlumina-1fcc56c5cec2560b430cde8f130413aa8bbf9af6.tar.gz
lumina-1fcc56c5cec2560b430cde8f130413aa8bbf9af6.tar.bz2
lumina-1fcc56c5cec2560b430cde8f130413aa8bbf9af6.zip
Push some debugging for pty reading
Diffstat (limited to 'desktop-utilities')
-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