@ -36,7 +36,7 @@ namespace KMF {
KProcessWrapper * KProcessWrapper : : m_instance = 0 ;
KProcessWrapper * KProcessWrapper : : instance ( ) {
if ( ! m_instance ) {
m_instance = new KProcessWrapper ( TQT_TQOBJECT ( K Application: : kApplication ( ) - > mainWidget ( ) ) , " KProcessWrapper " ) ;
m_instance = new KProcessWrapper ( TQT_TQOBJECT ( TDE Application: : kApplication ( ) - > mainWidget ( ) ) , " KProcessWrapper " ) ;
}
return m_instance ;
}
@ -71,7 +71,7 @@ void KProcessWrapper::slotStartLocalJob( const TQString& jobName, const TQString
m_stdErr = " " ;
TQString localScriptFile = command ;
KTempFile * f = new KTempFile ( ) ;
if ( ! KIO : : NetAccess : : exists ( localScriptFile , false , K Application: : kApplication ( ) - > mainWidget ( ) ) ) {
if ( ! KIO : : NetAccess : : exists ( localScriptFile , false , TDE Application: : kApplication ( ) - > mainWidget ( ) ) ) {
kdDebug ( ) < < " KProcessWrapper::slotStartLocalJob(...) - creating temporary script file. " < < endl ;
TQTextStream * ts = f - > textStream ( ) ;
* ts < < command < < endl ;
@ -105,7 +105,7 @@ void KProcessWrapper::slotStartRemoteJob( const TQString& jobName, const TQStrin
m_stdOut = " " ;
m_stdErr = " " ;
KTempFile * f = new KTempFile ( ) ;
if ( ! KIO : : NetAccess : : exists ( scriptFile , false , K Application: : kApplication ( ) - > mainWidget ( ) ) ) {
if ( ! KIO : : NetAccess : : exists ( scriptFile , false , TDE Application: : kApplication ( ) - > mainWidget ( ) ) ) {
kdDebug ( ) < < " KProcessWrapper::slotStartRemoteJob(...) - creating temporary script file. " < < endl ;
TQTextStream * ts = f - > textStream ( ) ;
* ts < < scriptFile < < endl ;
@ -119,7 +119,7 @@ void KProcessWrapper::slotStartRemoteJob( const TQString& jobName, const TQStrin
KURL remFileUrl ( execHost - > getFishUrl ( ) + " /tmp/ " + uuid . toString ( ) ) ;
kdDebug ( ) < < " UPLOADING: Temporary script file: " < < localScriptFile < < " to: " < < remFileUrl . url ( ) < < endl ;
if ( ! KIO : : NetAccess : : upload ( localScriptFile , remFileUrl , K Application: : kApplication ( ) - > mainWidget ( ) ) ) {
if ( ! KIO : : NetAccess : : upload ( localScriptFile , remFileUrl , TDE Application: : kApplication ( ) - > mainWidget ( ) ) ) {
kdDebug ( ) < < " ERROR: Could not upload temp file. " < < endl ;
m_exitedNormal = false ;
m_status = 1 ;
@ -136,8 +136,8 @@ void KProcessWrapper::slotStartRemoteJob( const TQString& jobName, const TQStrin
TQString cmd = " bash /tmp/ " + uuid . toString ( ) ;
kdDebug ( ) < < " Execute: " < < cmd < < " at: " < < execHost - > getFishUrl ( ) < < endl ;
const TQString & ret = KIO : : NetAccess : : fish_execute ( execHost - > getFishUrl ( ) , cmd , K Application: : kApplication ( ) - > mainWidget ( ) ) ;
if ( ! KIO : : NetAccess : : del ( remFileUrl , K Application: : kApplication ( ) - > mainWidget ( ) ) ) {
const TQString & ret = KIO : : NetAccess : : fish_execute ( execHost - > getFishUrl ( ) , cmd , TDE Application: : kApplication ( ) - > mainWidget ( ) ) ;
if ( ! KIO : : NetAccess : : del ( remFileUrl , TDE Application: : kApplication ( ) - > mainWidget ( ) ) ) {
m_exitedNormal = false ;
m_status = 1 ;
m_stdErr = i18n ( " Could not delete the temporary comand script file. " ) ;