|
|
@ -46,7 +46,7 @@ void ExternalLanguage::deleteLanguageProcess()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ExternalLanguage::receivedStdout( KProcess *, char * buffer, int buflen )
|
|
|
|
void ExternalLanguage::receivedStdout( TDEProcess *, char * buffer, int buflen )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQStringList lines = TQStringList::split( '\n', TQString::fromLocal8Bit( buffer, buflen ), false );
|
|
|
|
TQStringList lines = TQStringList::split( '\n', TQString::fromLocal8Bit( buffer, buflen ), false );
|
|
|
|
TQStringList::iterator end = lines.end();
|
|
|
|
TQStringList::iterator end = lines.end();
|
|
|
@ -72,7 +72,7 @@ void ExternalLanguage::receivedStdout( KProcess *, char * buffer, int buflen )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ExternalLanguage::receivedStderr( KProcess *, char * buffer, int buflen )
|
|
|
|
void ExternalLanguage::receivedStderr( TDEProcess *, char * buffer, int buflen )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQStringList lines = TQStringList::split( '\n', TQString::fromLocal8Bit( buffer, buflen ), false );
|
|
|
|
TQStringList lines = TQStringList::split( '\n', TQString::fromLocal8Bit( buffer, buflen ), false );
|
|
|
|
TQStringList::iterator end = lines.end();
|
|
|
|
TQStringList::iterator end = lines.end();
|
|
|
@ -93,7 +93,7 @@ void ExternalLanguage::receivedStderr( KProcess *, char * buffer, int buflen )
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ExternalLanguage::processExited( KProcess * )
|
|
|
|
void ExternalLanguage::processExited( TDEProcess * )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( !m_languageProcess )
|
|
|
|
if ( !m_languageProcess )
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -114,7 +114,7 @@ bool ExternalLanguage::start()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
displayProcessCommand();
|
|
|
|
displayProcessCommand();
|
|
|
|
|
|
|
|
|
|
|
|
return m_languageProcess->start( KProcess::NotifyOnExit, KProcess::All );
|
|
|
|
return m_languageProcess->start( TDEProcess::NotifyOnExit, TDEProcess::All );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -124,16 +124,16 @@ void ExternalLanguage::resetLanguageProcess()
|
|
|
|
deleteLanguageProcess();
|
|
|
|
deleteLanguageProcess();
|
|
|
|
m_errorCount = 0;
|
|
|
|
m_errorCount = 0;
|
|
|
|
|
|
|
|
|
|
|
|
m_languageProcess = new KProcess(this);
|
|
|
|
m_languageProcess = new TDEProcess(this);
|
|
|
|
|
|
|
|
|
|
|
|
connect( m_languageProcess, TQT_SIGNAL(receivedStdout( KProcess*, char*, int )),
|
|
|
|
connect( m_languageProcess, TQT_SIGNAL(receivedStdout( TDEProcess*, char*, int )),
|
|
|
|
this, TQT_SLOT(receivedStdout( KProcess*, char*, int )) );
|
|
|
|
this, TQT_SLOT(receivedStdout( TDEProcess*, char*, int )) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( m_languageProcess, TQT_SIGNAL(receivedStderr( KProcess*, char*, int )),
|
|
|
|
connect( m_languageProcess, TQT_SIGNAL(receivedStderr( TDEProcess*, char*, int )),
|
|
|
|
this, TQT_SLOT(receivedStderr( KProcess*, char*, int )) );
|
|
|
|
this, TQT_SLOT(receivedStderr( TDEProcess*, char*, int )) );
|
|
|
|
|
|
|
|
|
|
|
|
connect( m_languageProcess, TQT_SIGNAL(processExited( KProcess* )),
|
|
|
|
connect( m_languageProcess, TQT_SIGNAL(processExited( TDEProcess* )),
|
|
|
|
this, TQT_SLOT(processExited( KProcess* )) );
|
|
|
|
this, TQT_SLOT(processExited( TDEProcess* )) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -152,7 +152,7 @@ void ExternalLanguage::displayProcessCommand()
|
|
|
|
for ( TQValueList<TQCString>::const_iterator it = arguments.begin(); it != end; ++it )
|
|
|
|
for ( TQValueList<TQCString>::const_iterator it = arguments.begin(); it != end; ++it )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( (*it).isEmpty() || (*it).contains( TQRegExp("[\\s]") ) )
|
|
|
|
if ( (*it).isEmpty() || (*it).contains( TQRegExp("[\\s]") ) )
|
|
|
|
quotedArguments << KProcess::quote( *it );
|
|
|
|
quotedArguments << TDEProcess::quote( *it );
|
|
|
|
else
|
|
|
|
else
|
|
|
|
quotedArguments << *it;
|
|
|
|
quotedArguments << *it;
|
|
|
|
}
|
|
|
|
}
|
|
|
|