summaryrefslogtreecommitdiffstats
path: root/lib/util/execcommand.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /lib/util/execcommand.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/util/execcommand.cpp')
-rw-r--r--lib/util/execcommand.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/util/execcommand.cpp b/lib/util/execcommand.cpp
index 7618bd6e..7c4fea89 100644
--- a/lib/util/execcommand.cpp
+++ b/lib/util/execcommand.cpp
@@ -24,27 +24,27 @@
#include <klocale.h>
#include <kmessagebox.h>
-ExecCommand::ExecCommand( const QString& executable, const QStringList& args,
- const QString& workingDir, const QStringList& env,
- QObject* parent, const char* name ):
- QObject( parent, name ), out( "" ) /* make sure out is not QString::null since that would mean "error" */
+ExecCommand::ExecCommand( const TQString& executable, const TQStringList& args,
+ const TQString& workingDir, const TQStringList& env,
+ TQObject* parent, const char* name ):
+ TQObject( parent, name ), out( "" ) /* make sure out is not TQString::null since that would mean "error" */
{
progressDlg = 0;
proc = new KProcess();
proc->setWorkingDirectory( workingDir );
- for ( QStringList::ConstIterator it = env.begin(); it != env.end(); ++it )
+ for ( TQStringList::ConstIterator it = env.begin(); it != env.end(); ++it )
proc->setEnvironment( (*it).section( '=', 0, 0 ), (*it).section( '=', 1, 1 ) );
*proc << executable;
*proc << args;
- connect( proc, SIGNAL(processExited(KProcess*)),
- this, SLOT(processExited()) );
- connect( proc, SIGNAL(receivedStdout(KProcess*,char*,int)),
- this, SLOT(receivedStdout(KProcess*,char*,int)) );
- connect( proc, SIGNAL(receivedStderr(KProcess*,char*,int)),
- this, SLOT(receivedStderr(KProcess*,char*,int)) );
+ connect( proc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(processExited()) );
+ connect( proc, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ this, TQT_SLOT(receivedStdout(KProcess*,char*,int)) );
+ connect( proc, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ this, TQT_SLOT(receivedStderr(KProcess*,char*,int)) );
bool ok = proc->start( KProcess::NotifyOnExit, KProcess::AllOutput );
@@ -52,25 +52,25 @@ ExecCommand::ExecCommand( const QString& executable, const QStringList& args,
KMessageBox::error( 0, i18n("Could not invoke \"%1\". Please make sure it is installed correctly").arg( executable ),
i18n("Error Invoking Command") );
- emit finished( QString::null, QString::null );
+ emit finished( TQString::null, TQString::null );
deleteLater();
} else {
progressDlg = new KProgressDialog( 0, 0, i18n("Command running..."),
i18n("Please wait until the \"%1\" command finishes.").arg( executable ), false );
- connect( progressDlg, SIGNAL(cancelClicked()),
- this, SLOT(cancelClicked()) );
+ connect( progressDlg, TQT_SIGNAL(cancelClicked()),
+ this, TQT_SLOT(cancelClicked()) );
}
}
void ExecCommand::receivedStdout (KProcess*, char *buffer, int buflen)
{
- out += QString::fromUtf8( buffer, buflen );
+ out += TQString::fromUtf8( buffer, buflen );
}
void ExecCommand::receivedStderr (KProcess*, char *buffer, int buflen)
{
- err += QString::fromUtf8( buffer, buflen );
+ err += TQString::fromUtf8( buffer, buflen );
}
void ExecCommand::processExited()
@@ -88,7 +88,7 @@ void ExecCommand::cancelClicked()
progressDlg = 0;
proc->kill();
- emit finished( QString::null, QString::null );
+ emit finished( TQString::null, TQString::null );
deleteLater();
}