summaryrefslogtreecommitdiffstats
path: root/karm/test/script.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /karm/test/script.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'karm/test/script.cpp')
-rw-r--r--karm/test/script.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/karm/test/script.cpp b/karm/test/script.cpp
index 37fe058d3..f9fa9d9e0 100644
--- a/karm/test/script.cpp
+++ b/karm/test/script.cpp
@@ -17,11 +17,11 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qprocess.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqprocess.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -38,23 +38,23 @@
// kill() doesn't let script interpreter try to clean up.
const int NICE_KILL_TIMEOUT_IN_SECS = 5;
-Script::Script( const QDir& workingDirectory )
+Script::Script( const TQDir& workingDirectory )
{
m_status = 0;
m_stderr = false;
m_timeoutInSeconds = 5;
- m_proc = new QProcess( this );
+ m_proc = new TQProcess( this );
m_proc->setWorkingDirectory( workingDirectory );
- connect ( m_proc, SIGNAL( readyReadStdout() ),
- this , SLOT ( stdout() )
+ connect ( m_proc, TQT_SIGNAL( readyReadStdout() ),
+ this , TQT_SLOT ( stdout() )
);
- connect ( m_proc, SIGNAL( readyReadStderr() ),
- this , SLOT ( stderr() )
+ connect ( m_proc, TQT_SIGNAL( readyReadStderr() ),
+ this , TQT_SLOT ( stderr() )
);
- connect ( m_proc, SIGNAL( processExited() ),
- this , SLOT ( exit() )
+ connect ( m_proc, TQT_SIGNAL( processExited() ),
+ this , TQT_SLOT ( exit() )
);
}
@@ -64,7 +64,7 @@ Script::~Script()
m_proc = 0;
}
-void Script::addArgument( const QString &arg )
+void Script::addArgument( const TQString &arg )
{
m_proc->addArgument( arg );
}
@@ -79,7 +79,7 @@ int Script::run()
{
m_proc->start();
// This didn't work. But Ctrl-C does. :P
- //QTimer::singleShot( m_timeoutInSeconds * 1000, m_proc, SLOT( kill() ) );
+ //TQTimer::singleShot( m_timeoutInSeconds * 1000, m_proc, TQT_SLOT( kill() ) );
//while ( ! m_proc->normalExit() );
while ( m_proc->isRunning() );
return m_status;
@@ -89,7 +89,7 @@ void Script::terminate()
{
// These both trigger processExited, so exit() will run.
m_proc->tryTerminate();
- QTimer::singleShot( NICE_KILL_TIMEOUT_IN_SECS*1000, m_proc, SLOT( kill() ) );
+ TQTimer::singleShot( NICE_KILL_TIMEOUT_IN_SECS*1000, m_proc, TQT_SLOT( kill() ) );
}
void Script::exit()
@@ -103,13 +103,13 @@ void Script::stderr()
{
// Treat any output to std err as a script failure
m_status = 1;
- QString data = QString( m_proc->readStderr() );
+ TQString data = TQString( m_proc->readStderr() );
m_stderr= true;
}
void Script::stdout()
{
- QString data = QString( m_proc->readStdout() );
+ TQString data = TQString( m_proc->readStdout() );
}
#include "script.moc"