Commit ddf9b478 authored by Robert Knight's avatar Robert Knight
Browse files

Rewrite old-fashioned list construction as per Oswald's suggestion. Remove...

Rewrite old-fashioned list construction as per Oswald's suggestion.  Remove the zmodem resume / continue handling from Konsole::Session as Konsole::Pty provides its own buffering.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=677088
parent a7d94b2f
......@@ -726,13 +726,7 @@ void Session::startZModem(const QString &zmodem, const QString &dir, const QStri
_zmodemProc = new KProcess();
_zmodemProc->setOutputChannelMode( KProcess::SeparateChannels );
*_zmodemProc << zmodem << "-v";
for(QStringList::ConstIterator it = list.begin();
it != list.end();
++it)
{
*_zmodemProc << (*it);
}
*_zmodemProc << zmodem << "-v" << list;
if (!dir.isEmpty())
_zmodemProc->setWorkingDirectory(dir);
......@@ -748,7 +742,6 @@ void Session::startZModem(const QString &zmodem, const QString &dir, const QStri
disconnect( _shellProcess,SIGNAL(block_in(const char*,int)), this, SLOT(onReceiveBlock(const char*,int)) );
connect( _shellProcess,SIGNAL(block_in(const char*,int)), this, SLOT(zmodemRcvBlock(const char*,int)) );
connect( _shellProcess,SIGNAL(buffer_empty()), this, SLOT(zmodemContinue()));
_zmodemProgress = new ZModemDialog(QApplication::activeWindow(), false,
i18n("ZModem Progress"));
......@@ -764,22 +757,10 @@ void Session::zmodemReadAndSendBlock()
_zmodemProc->setReadChannel( QProcess::StandardOutput );
QByteArray data = _zmodemProc->readAll();
_shellProcess->sendData(data.constData(),data.count());
// TODO Port suspend() and resume() calls here and in zmodemContinue()
#warning "Handle suspend and resume of ZModem when internal buffer is full."
if ( data.count() == 0 )
return;
if (_shellProcess->bufferFull())
{
//_zmodemProc->suspend();
}
}
void Session::zmodemContinue()
{
//_zmodemProc->resume();
// qWarning("ZModem resume");
_shellProcess->sendData(data.constData(),data.count());
}
void Session::zmodemReadStatus()
......@@ -826,7 +807,6 @@ void Session::zmodemFinished()
_zmodemBusy = false;
disconnect( _shellProcess,SIGNAL(block_in(const char*,int)), this ,SLOT(zmodemRcvBlock(const char*,int)) );
disconnect( _shellProcess,SIGNAL(buffer_empty()), this, SLOT(zmodemContinue()));
connect( _shellProcess,SIGNAL(block_in(const char*,int)), this, SLOT(onReceiveBlock(const char*,int)) );
_shellProcess->sendData("\030\030\030\030", 4); // Abort
......
......@@ -447,7 +447,6 @@ private slots:
void zmodemReadAndSendBlock();
void zmodemRcvBlock(const char *data, int len);
void zmodemFinished();
void zmodemContinue();
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment