From kde-commits Wed Feb 04 23:06:09 2004 From: Ravikiran Rajagopal Date: Wed, 04 Feb 2004 23:06:09 +0000 To: kde-commits Subject: kdenonbeta/frontman/plugins/basicprocess Message-Id: <20040204230609.685CB9907 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=107593606217101 CVS commit by ravi: Let controller know that a line of input has been submitted. M +8 -0 fmbasicprocess.cpp 1.3 M +1 -0 fmbasicprocess.h 1.3 --- kdenonbeta/frontman/plugins/basicprocess/fmbasicprocess.cpp #1.2:1.3 @@ -78,4 +78,7 @@ namespace FM connect( mProcess, SIGNAL( readReady( KProcIO* ) ), SLOT( readOutput( KProcIO* ) ) ); connect( mProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ), SLOT( partialTextAvailable() ) ); + // Since we only send lines of input to the process, whenever KProcess emits a wroteStdin() signal, it implies that a full input + // line has been sent to the process. We are relying on an undocumented feature of KProcIO here. + connect( mProcess, SIGNAL( wroteStdin( KProcess* ) ), SLOT( lineWritten() ) ); bool result = mProcess->start( KProcess::NotifyOnExit, true ); @@ -180,3 +183,8 @@ namespace FM mTimer->start( 300, true ); } + + void BasicProcess::lineWritten() + { + emit oneInputLineWritten( this ); + } } --- kdenonbeta/frontman/plugins/basicprocess/fmbasicprocess.h #1.2:1.3 @@ -52,4 +52,5 @@ namespace FM void checkForPartial(); void partialTextAvailable(); + void lineWritten(); private: