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