@ -54,7 +54,7 @@ public:
K3bProcess : : K3bProcess ( )
: K Process( ) ,
: TDE Process( ) ,
m_bSplitStdout ( false )
{
d = new Data ( ) ;
@ -78,25 +78,25 @@ K3bProcess& K3bProcess::operator<<( const K3bExternalBin* bin )
K3bProcess & K3bProcess : : operator < < ( const TQString & arg )
{
static_cast < K Process* > ( this ) - > operator < < ( arg ) ;
static_cast < TDE Process* > ( this ) - > operator < < ( arg ) ;
return * this ;
}
K3bProcess & K3bProcess : : operator < < ( const char * arg )
{
static_cast < K Process* > ( this ) - > operator < < ( arg ) ;
static_cast < TDE Process* > ( this ) - > operator < < ( arg ) ;
return * this ;
}
K3bProcess & K3bProcess : : operator < < ( const TQCString & arg )
{
static_cast < K Process* > ( this ) - > operator < < ( arg ) ;
static_cast < TDE Process* > ( this ) - > operator < < ( arg ) ;
return * this ;
}
K3bProcess & K3bProcess : : operator < < ( const TQStringList & args )
{
static_cast < K Process* > ( this ) - > operator < < ( args ) ;
static_cast < TDE Process* > ( this ) - > operator < < ( args ) ;
return * this ;
}
@ -104,19 +104,19 @@ K3bProcess& K3bProcess::operator<<( const TQStringList& args )
bool K3bProcess : : start ( RunMode run , Communication com )
{
if ( com & Stderr ) {
connect ( this , TQT_SIGNAL ( receivedStderr ( K Process* , char * , int ) ) ,
this , TQT_SLOT ( slotSplitStderr ( K Process* , char * , int ) ) ) ;
connect ( this , TQT_SIGNAL ( receivedStderr ( TDE Process* , char * , int ) ) ,
this , TQT_SLOT ( slotSplitStderr ( TDE Process* , char * , int ) ) ) ;
}
if ( com & Stdout ) {
connect ( this , TQT_SIGNAL ( receivedStdout ( K Process* , char * , int ) ) ,
this , TQT_SLOT ( slotSplitStdout ( K Process* , char * , int ) ) ) ;
connect ( this , TQT_SIGNAL ( receivedStdout ( TDE Process* , char * , int ) ) ,
this , TQT_SLOT ( slotSplitStdout ( TDE Process* , char * , int ) ) ) ;
}
return K Process: : start ( run , com ) ;
return TDE Process: : start ( run , com ) ;
}
void K3bProcess : : slotSplitStdout ( K Process* , char * data , int len )
void K3bProcess : : slotSplitStdout ( TDE Process* , char * data , int len )
{
if ( m_bSplitStdout ) {
TQStringList lines = splitOutput ( data , len , d - > unfinishedStdoutLine , d - > suppressEmptyLines ) ;
@ -134,7 +134,7 @@ void K3bProcess::slotSplitStdout( KProcess*, char* data, int len )
}
void K3bProcess : : slotSplitStderr ( K Process* , char * data , int len )
void K3bProcess : : slotSplitStderr ( TDE Process* , char * data , int len )
{
TQStringList lines = splitOutput ( data , len , d - > unfinishedStderrLine , d - > suppressEmptyLines ) ;
@ -208,7 +208,7 @@ TQStringList K3bProcess::splitOutput( char* data, int len,
int K3bProcess : : setupCommunication ( Communication comm )
{
if ( K Process: : setupCommunication ( comm ) ) {
if ( TDE Process: : setupCommunication ( comm ) ) {
//
// Setup our own socketpair
@ -255,13 +255,13 @@ void K3bProcess::commClose()
d - > out [ 0 ] = - 1 ;
}
K Process: : commClose ( ) ;
TDE Process: : commClose ( ) ;
}
int K3bProcess : : commSetupDoneP ( )
{
int ok = K Process: : commSetupDoneP ( ) ;
int ok = TDE Process: : commSetupDoneP ( ) ;
if ( d - > rawStdin )
close ( d - > in [ 0 ] ) ;
@ -276,7 +276,7 @@ int K3bProcess::commSetupDoneP()
int K3bProcess : : commSetupDoneC ( )
{
int ok = K Process: : commSetupDoneC ( ) ;
int ok = TDE Process: : commSetupDoneC ( ) ;
if ( d - > dupStdoutFd ! = - 1 ) {
//
@ -396,7 +396,7 @@ bool K3bProcess::closeStdin()
return true ;
}
else
return K Process: : closeStdin ( ) ;
return TDE Process: : closeStdin ( ) ;
}
@ -408,27 +408,27 @@ bool K3bProcess::closeStdout()
return true ;
}
else
return K Process: : closeStdout ( ) ;
return TDE Process: : closeStdout ( ) ;
}
K3bProcessOutputCollector : : K3bProcessOutputCollector ( K Process* p )
K3bProcessOutputCollector : : K3bProcessOutputCollector ( TDE Process* p )
: m_process ( 0 )
{
setProcess ( p ) ;
}
void K3bProcessOutputCollector : : setProcess ( K Process* p )
void K3bProcessOutputCollector : : setProcess ( TDE Process* p )
{
if ( m_process )
m_process - > disconnect ( this ) ;
m_process = p ;
if ( p ) {
connect ( p , TQT_SIGNAL ( receivedStdout ( K Process* , char * , int ) ) ,
this , TQT_SLOT ( slotGatherStdout ( K Process* , char * , int ) ) ) ;
connect ( p , TQT_SIGNAL ( receivedStderr ( K Process* , char * , int ) ) ,
this , TQT_SLOT ( slotGatherStderr ( K Process* , char * , int ) ) ) ;
connect ( p , TQT_SIGNAL ( receivedStdout ( TDE Process* , char * , int ) ) ,
this , TQT_SLOT ( slotGatherStdout ( TDE Process* , char * , int ) ) ) ;
connect ( p , TQT_SIGNAL ( receivedStderr ( TDE Process* , char * , int ) ) ,
this , TQT_SLOT ( slotGatherStderr ( TDE Process* , char * , int ) ) ) ;
}
m_gatheredOutput . truncate ( 0 ) ;
@ -436,13 +436,13 @@ void K3bProcessOutputCollector::setProcess( KProcess* p )
m_stdoutOutput . truncate ( 0 ) ;
}
void K3bProcessOutputCollector : : slotGatherStderr ( K Process* , char * data , int len )
void K3bProcessOutputCollector : : slotGatherStderr ( TDE Process* , char * data , int len )
{
m_gatheredOutput . append ( TQString : : fromLocal8Bit ( data , len ) ) ;
m_stderrOutput . append ( TQString : : fromLocal8Bit ( data , len ) ) ;
}
void K3bProcessOutputCollector : : slotGatherStdout ( K Process* , char * data , int len )
void K3bProcessOutputCollector : : slotGatherStdout ( TDE Process* , char * data , int len )
{
m_gatheredOutput . append ( TQString : : fromLocal8Bit ( data , len ) ) ;
m_stdoutOutput . append ( TQString : : fromLocal8Bit ( data , len ) ) ;