summaryrefslogtreecommitdiffstats
path: root/libk3b/core
diff options
context:
space:
mode:
Diffstat (limited to 'libk3b/core')
-rw-r--r--libk3b/core/k3bdefaultexternalprograms.cpp64
-rw-r--r--libk3b/core/k3bexternalbinmanager.h2
-rw-r--r--libk3b/core/k3bglobals.cpp14
-rw-r--r--libk3b/core/k3bprocess.cpp52
-rw-r--r--libk3b/core/k3bprocess.h26
5 files changed, 79 insertions, 79 deletions
diff --git a/libk3b/core/k3bdefaultexternalprograms.cpp b/libk3b/core/k3bdefaultexternalprograms.cpp
index 2cece94..4b86055 100644
--- a/libk3b/core/k3bdefaultexternalprograms.cpp
+++ b/libk3b/core/k3bdefaultexternalprograms.cpp
@@ -148,11 +148,11 @@ bool K3bCdrecordProgram::scan( const TQString& p )
K3bExternalBin* bin = 0;
// probe version
- KProcess vp;
+ TDEProcess vp;
K3bProcessOutputCollector out( &vp );
vp << path << "-version";
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
int pos = -1;
if( wodim ) {
pos = out.output().find( "Wodim" );
@@ -199,10 +199,10 @@ bool K3bCdrecordProgram::scan( const TQString& p )
}
// probe features
- KProcess fp;
+ TDEProcess fp;
out.setProcess( &fp );
fp << path << "-help";
- if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( fp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
if( out.output().contains( "gracetime" ) )
bin->addFeature( "gracetime" );
if( out.output().contains( "-overburn" ) )
@@ -297,10 +297,10 @@ bool K3bMkisofsProgram::scan( const TQString& p )
K3bExternalBin* bin = 0;
// probe version
- KProcess vp;
+ TDEProcess vp;
vp << path << "-version";
K3bProcessOutputCollector out( &vp );
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
int pos = -1;
if( genisoimage )
pos = out.output().find( "genisoimage" );
@@ -333,10 +333,10 @@ bool K3bMkisofsProgram::scan( const TQString& p )
// probe features
- KProcess fp;
+ TDEProcess fp;
fp << path << "-help";
out.setProcess( &fp );
- if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( fp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
if( out.output().contains( "-udf" ) )
bin->addFeature( "udf" );
if( out.output().contains( "-dvd-video" ) )
@@ -412,10 +412,10 @@ bool K3bReadcdProgram::scan( const TQString& p )
K3bExternalBin* bin = 0;
// probe version
- KProcess vp;
+ TDEProcess vp;
vp << path << "-version";
K3bProcessOutputCollector out( &vp );
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
int pos = -1;
if( readom )
pos = out.output().find( "readom" );
@@ -447,10 +447,10 @@ bool K3bReadcdProgram::scan( const TQString& p )
// probe features
- KProcess fp;
+ TDEProcess fp;
fp << path << "-help";
out.setProcess( &fp );
- if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( fp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
if( out.output().contains( "-clone" ) )
bin->addFeature( "clone" );
@@ -503,10 +503,10 @@ bool K3bCdrdaoProgram::scan( const TQString& p )
K3bExternalBin* bin = 0;
// probe version
- KProcess vp;
+ TDEProcess vp;
vp << path ;
K3bProcessOutputCollector out( &vp );
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
int pos = out.output().find( "Cdrdao version" );
if( pos < 0 )
return false;
@@ -535,10 +535,10 @@ bool K3bCdrdaoProgram::scan( const TQString& p )
// probe features
- KProcess fp;
+ TDEProcess fp;
fp << path << "write" << "-h";
out.setProcess( &fp );
- if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( fp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
if( out.output().contains( "--overburn" ) )
bin->addFeature( "overburn" );
if( out.output().contains( "--multi" ) )
@@ -601,10 +601,10 @@ bool K3bTranscodeProgram::scan( const TQString& p )
K3bExternalBin* bin = 0;
// probe version
- KProcess vp;
+ TDEProcess vp;
vp << appPath << "-v";
K3bProcessOutputCollector out( &vp );
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
int pos = out.output().find( "transcode v" );
if( pos < 0 )
return false;
@@ -628,10 +628,10 @@ bool K3bTranscodeProgram::scan( const TQString& p )
// Check features
//
TQString modInfoBin = path + "tcmodinfo";
- KProcess modp;
+ TDEProcess modp;
modp << modInfoBin << "-p";
out.setProcess( &modp );
- if( modp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( modp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
TQString modPath = out.output().stripWhiteSpace();
TQDir modDir( modPath );
if( !modDir.entryList( "*export_xvid*", TQDir::Files ).isEmpty() )
@@ -675,10 +675,10 @@ bool K3bVcdbuilderProgram::scan( const TQString& p )
K3bExternalBin* bin = 0;
// probe version
- KProcess vp;
+ TDEProcess vp;
vp << path << "-V";
K3bProcessOutputCollector out( &vp );
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
int pos = out.output().find( "GNU VCDImager" );
if( pos < 0 )
return false;
@@ -732,11 +732,11 @@ bool K3bNormalizeProgram::scan( const TQString& p )
K3bExternalBin* bin = 0;
// probe version
- KProcess vp;
+ TDEProcess vp;
K3bProcessOutputCollector out( &vp );
vp << path << "--version";
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
int pos = out.output().find( "normalize" );
if( pos < 0 )
return false;
@@ -791,11 +791,11 @@ bool K3bGrowisofsProgram::scan( const TQString& p )
K3bExternalBin* bin = 0;
// probe version
- KProcess vp;
+ TDEProcess vp;
K3bProcessOutputCollector out( &vp );
vp << path << "-version";
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
int pos = out.output().find( "growisofs" );
if( pos < 0 )
return false;
@@ -856,11 +856,11 @@ bool K3bDvdformatProgram::scan( const TQString& p )
K3bExternalBin* bin = 0;
// probe version
- KProcess vp;
+ TDEProcess vp;
K3bProcessOutputCollector out( &vp );
vp << path;
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
// different locales make searching for the +- char difficult
// so we simply ignore it.
int pos = out.output().find( TQRegExp("DVD.*RAM format utility") );
@@ -926,11 +926,11 @@ bool K3bDvdBooktypeProgram::scan( const TQString& p )
K3bExternalBin* bin = 0;
// probe version
- KProcess vp;
+ TDEProcess vp;
K3bProcessOutputCollector out( &vp );
vp << path;
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
int pos = out.output().find( "dvd+rw-booktype" );
if( pos < 0 )
return false;
@@ -975,11 +975,11 @@ bool K3bCdda2wavProgram::scan( const TQString& p )
K3bExternalBin* bin = 0;
// probe version
- KProcess vp;
+ TDEProcess vp;
K3bProcessOutputCollector out( &vp );
vp << path << "-h";
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
+ if( vp.start( TDEProcess::Block, TDEProcess::AllOutput ) ) {
int pos = out.output().find( "cdda2wav" );
if( pos < 0 )
return false;
diff --git a/libk3b/core/k3bexternalbinmanager.h b/libk3b/core/k3bexternalbinmanager.h
index 3ba57ae..74be6b7 100644
--- a/libk3b/core/k3bexternalbinmanager.h
+++ b/libk3b/core/k3bexternalbinmanager.h
@@ -25,7 +25,7 @@
#include "k3bversion.h"
class KConfig;
-class KProcess;
+class TDEProcess;
class K3bExternalProgram;
diff --git a/libk3b/core/k3bglobals.cpp b/libk3b/core/k3bglobals.cpp
index c01e289..23225b6 100644
--- a/libk3b/core/k3bglobals.cpp
+++ b/libk3b/core/k3bglobals.cpp
@@ -177,7 +177,7 @@ TQString K3b::defaultTempPath()
{
TQString oldGroup = kapp->config()->group();
kapp->config()->setGroup( "General Options" );
- TQString url = kapp->config()->readPathEntry( "Temp Dir", KGlobal::dirs()->resourceDirs( "tmp" ).first() );
+ TQString url = kapp->config()->readPathEntry( "Temp Dir", TDEGlobal::dirs()->resourceDirs( "tmp" ).first() );
kapp->config()->setGroup( oldGroup );
return prepareDir(url);
}
@@ -560,11 +560,11 @@ bool K3b::unmount( K3bDevice::Device* dev )
TQString umountBin = K3b::findExe( "umount" );
if( !umountBin.isEmpty() ) {
- KProcess p;
+ TDEProcess p;
p << umountBin;
p << "-l"; // lazy unmount
p << dev->blockDeviceName();
- p.start( KProcess::Block );
+ p.start( TDEProcess::Block );
if( !p.exitStatus() )
return true;
}
@@ -572,11 +572,11 @@ bool K3b::unmount( K3bDevice::Device* dev )
// now try pmount
TQString pumountBin = K3b::findExe( "pumount" );
if( !pumountBin.isEmpty() ) {
- KProcess p;
+ TDEProcess p;
p << pumountBin;
p << "-l"; // lazy unmount
p << dev->blockDeviceName();
- p.start( KProcess::Block );
+ p.start( TDEProcess::Block );
return !p.exitStatus();
}
else {
@@ -610,10 +610,10 @@ bool K3b::mount( K3bDevice::Device* dev )
// now try pmount
TQString pmountBin = K3b::findExe( "pmount" );
if( !pmountBin.isEmpty() ) {
- KProcess p;
+ TDEProcess p;
p << pmountBin;
p << mntDev;
- p.start( KProcess::Block );
+ p.start( TDEProcess::Block );
return !p.exitStatus();
}
return false;
diff --git a/libk3b/core/k3bprocess.cpp b/libk3b/core/k3bprocess.cpp
index c46fd0a..304c0f5 100644
--- a/libk3b/core/k3bprocess.cpp
+++ b/libk3b/core/k3bprocess.cpp
@@ -54,7 +54,7 @@ public:
K3bProcess::K3bProcess()
- : KProcess(),
+ : TDEProcess(),
m_bSplitStdout(false)
{
d = new Data();
@@ -78,25 +78,25 @@ K3bProcess& K3bProcess::operator<<( const K3bExternalBin* bin )
K3bProcess& K3bProcess::operator<<( const TQString& arg )
{
- static_cast<KProcess*>(this)->operator<<( arg );
+ static_cast<TDEProcess*>(this)->operator<<( arg );
return *this;
}
K3bProcess& K3bProcess::operator<<( const char* arg )
{
- static_cast<KProcess*>(this)->operator<<( arg );
+ static_cast<TDEProcess*>(this)->operator<<( arg );
return *this;
}
K3bProcess& K3bProcess::operator<<( const TQCString& arg )
{
- static_cast<KProcess*>(this)->operator<<( arg );
+ static_cast<TDEProcess*>(this)->operator<<( arg );
return *this;
}
K3bProcess& K3bProcess::operator<<( const TQStringList& args )
{
- static_cast<KProcess*>(this)->operator<<( args );
+ static_cast<TDEProcess*>(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(KProcess*, char*, int)),
- this, TQT_SLOT(slotSplitStderr(KProcess*, char*, int)) );
+ connect( this, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)),
+ this, TQT_SLOT(slotSplitStderr(TDEProcess*, char*, int)) );
}
if( com & Stdout ) {
- connect( this, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, TQT_SLOT(slotSplitStdout(KProcess*, char*, int)) );
+ connect( this, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)),
+ this, TQT_SLOT(slotSplitStdout(TDEProcess*, char*, int)) );
}
- return KProcess::start( run, com );
+ return TDEProcess::start( run, com );
}
-void K3bProcess::slotSplitStdout( KProcess*, char* data, int len )
+void K3bProcess::slotSplitStdout( TDEProcess*, 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( KProcess*, char* data, int len )
+void K3bProcess::slotSplitStderr( TDEProcess*, 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( KProcess::setupCommunication( comm ) ) {
+ if( TDEProcess::setupCommunication( comm ) ) {
//
// Setup our own socketpair
@@ -255,13 +255,13 @@ void K3bProcess::commClose()
d->out[0] = -1;
}
- KProcess::commClose();
+ TDEProcess::commClose();
}
int K3bProcess::commSetupDoneP()
{
- int ok = KProcess::commSetupDoneP();
+ int ok = TDEProcess::commSetupDoneP();
if( d->rawStdin )
close(d->in[0]);
@@ -276,7 +276,7 @@ int K3bProcess::commSetupDoneP()
int K3bProcess::commSetupDoneC()
{
- int ok = KProcess::commSetupDoneC();
+ int ok = TDEProcess::commSetupDoneC();
if( d->dupStdoutFd != -1 ) {
//
@@ -396,7 +396,7 @@ bool K3bProcess::closeStdin()
return true;
}
else
- return KProcess::closeStdin();
+ return TDEProcess::closeStdin();
}
@@ -408,27 +408,27 @@ bool K3bProcess::closeStdout()
return true;
}
else
- return KProcess::closeStdout();
+ return TDEProcess::closeStdout();
}
-K3bProcessOutputCollector::K3bProcessOutputCollector( KProcess* p )
+K3bProcessOutputCollector::K3bProcessOutputCollector( TDEProcess* p )
: m_process(0)
{
setProcess( p );
}
-void K3bProcessOutputCollector::setProcess( KProcess* p )
+void K3bProcessOutputCollector::setProcess( TDEProcess* p )
{
if( m_process )
m_process->disconnect( this );
m_process = p;
if( p ) {
- connect( p, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, TQT_SLOT(slotGatherStdout(KProcess*, char*, int)) );
- connect( p, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, TQT_SLOT(slotGatherStderr(KProcess*, char*, int)) );
+ connect( p, TQT_SIGNAL(receivedStdout(TDEProcess*, char*, int)),
+ this, TQT_SLOT(slotGatherStdout(TDEProcess*, char*, int)) );
+ connect( p, TQT_SIGNAL(receivedStderr(TDEProcess*, char*, int)),
+ this, TQT_SLOT(slotGatherStderr(TDEProcess*, char*, int)) );
}
m_gatheredOutput.truncate( 0 );
@@ -436,13 +436,13 @@ void K3bProcessOutputCollector::setProcess( KProcess* p )
m_stdoutOutput.truncate( 0 );
}
-void K3bProcessOutputCollector::slotGatherStderr( KProcess*, char* data, int len )
+void K3bProcessOutputCollector::slotGatherStderr( TDEProcess*, char* data, int len )
{
m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) );
m_stderrOutput.append( TQString::fromLocal8Bit( data, len ) );
}
-void K3bProcessOutputCollector::slotGatherStdout( KProcess*, char* data, int len )
+void K3bProcessOutputCollector::slotGatherStdout( TDEProcess*, char* data, int len )
{
m_gatheredOutput.append( TQString::fromLocal8Bit( data, len ) );
m_stdoutOutput.append( TQString::fromLocal8Bit( data, len ) );
diff --git a/libk3b/core/k3bprocess.h b/libk3b/core/k3bprocess.h
index 009280d..19fb024 100644
--- a/libk3b/core/k3bprocess.h
+++ b/libk3b/core/k3bprocess.h
@@ -26,7 +26,7 @@ class K3bExternalBin;
/**
- * This is an enhanced KProcess.
+ * This is an enhanced TDEProcess.
* It splits the stderr output to lines making sure the client gets every line as it
* was written by the process.
* Aditionally one may set raw stdout and stdin handling using the stdin() and stdout() methods
@@ -35,7 +35,7 @@ class K3bExternalBin;
* K3bProcesses like used in K3bDataJob to duplicate mkisofs' stdout to the stdin of the writer
* (cdrecord or cdrdao)
*/
-class LIBK3B_EXPORT K3bProcess : public KProcess
+class LIBK3B_EXPORT K3bProcess : public TDEProcess
{
Q_OBJECT
@@ -135,8 +135,8 @@ class LIBK3B_EXPORT K3bProcess : public KProcess
bool closeStdout();
private slots:
- void slotSplitStderr( KProcess*, char*, int );
- void slotSplitStdout( KProcess*, char*, int );
+ void slotSplitStderr( TDEProcess*, char*, int );
+ void slotSplitStdout( TDEProcess*, char*, int );
signals:
void stderrLine( const TQString& line );
@@ -150,22 +150,22 @@ class LIBK3B_EXPORT K3bProcess : public KProcess
protected:
/**
- * reimplemeted from KProcess
+ * reimplemeted from TDEProcess
*/
int commSetupDoneP();
/**
- * reimplemeted from KProcess
+ * reimplemeted from TDEProcess
*/
int commSetupDoneC();
/**
- * reimplemeted from KProcess
+ * reimplemeted from TDEProcess
*/
int setupCommunication( Communication comm );
/**
- * reimplemeted from KProcess
+ * reimplemeted from TDEProcess
*/
void commClose();
@@ -184,22 +184,22 @@ class LIBK3B_EXPORT K3bProcessOutputCollector: public TQObject
public:
- K3bProcessOutputCollector( KProcess* );
- void setProcess( KProcess* );
+ K3bProcessOutputCollector( TDEProcess* );
+ void setProcess( TDEProcess* );
const TQString& output() const { return m_gatheredOutput; }
const TQString& stderrOutput() const { return m_stderrOutput; }
const TQString& stdoutOutput() const { return m_stdoutOutput; }
private slots:
- void slotGatherStderr( KProcess*, char*, int );
- void slotGatherStdout( KProcess*, char*, int );
+ void slotGatherStderr( TDEProcess*, char*, int );
+ void slotGatherStdout( TDEProcess*, char*, int );
private:
TQString m_gatheredOutput;
TQString m_stderrOutput;
TQString m_stdoutOutput;
- KProcess* m_process;
+ TDEProcess* m_process;
};