diff options
Diffstat (limited to 'src/kvirc/kvs/kvi_kvs_processmanager.cpp')
-rw-r--r-- | src/kvirc/kvs/kvi_kvs_processmanager.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/src/kvirc/kvs/kvi_kvs_processmanager.cpp b/src/kvirc/kvs/kvi_kvs_processmanager.cpp index 2c397c55..a7aeacbb 100644 --- a/src/kvirc/kvs/kvi_kvs_processmanager.cpp +++ b/src/kvirc/kvs/kvi_kvs_processmanager.cpp @@ -32,7 +32,7 @@ #include "kvi_app.h" #include "kvi_console.h" #include "kvi_kvs_script.h" -//#include <QSysInfo> +//#include <TQSysInfo> KviKvsProcessAsyncOperation::KviKvsProcessAsyncOperation(KviKvsProcessDescriptorData * d) : KviKvsAsyncOperation(d->pWnd) @@ -51,7 +51,7 @@ KviKvsProcessAsyncOperation::~KviKvsProcessAsyncOperation() if(m_pRunTimeTimer)delete m_pRunTimeTimer; if(m_pProcess) { - QObject::disconnect(m_pProcess,0,this,0); + TQObject::disconnect(m_pProcess,0,this,0); m_pProcess->kill(); delete m_pProcess; } @@ -63,25 +63,25 @@ KviKvsProcessAsyncOperation::~KviKvsProcessAsyncOperation() bool KviKvsProcessAsyncOperation::start() { - QStringList args; + TQStringList args; if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_NOSHELL) { - args = QStringList::split(" ",m_pData->szCommandline); + args = TQStringList::split(" ",m_pData->szCommandline); } else { - QString szShell = m_pData->szShell; + TQString szShell = m_pData->szShell; if(szShell.isEmpty()) { #ifdef COMPILE_ON_WINDOWS - // [01:26:00] <PragmaOff> btw, what is qt_winunicode ? - // [01:26:12] <kode54> Qt export specific to win32 + // [01:26:00] <PragmaOff> btw, what is qt_wintqunicode ? + // [01:26:12] <kode54> TQt export specific to win32 // [01:26:27] <kode54> bool which indicates whether system is Unicode (NT) or not // [01:26:58] <kode54> not sure if that's documented, but it is a public export // - // [02:50:21] <kode54> if ( QApplication::winVersion() & Qt::WV_NT_based ) + // [02:50:21] <kode54> if ( TQApplication::winVersion() & TQt::WV_NT_based ) // [02:50:41] <kode54> I see another implementation using that, maybe it is the official way of detecting that :[ #ifdef COMPILE_USE_QT4 - szShell = !(QSysInfo::WindowsVersion & QSysInfo::WV_DOS_based) ? "cmd.exe /c" : "command.com /c"; + szShell = !(TQSysInfo::WindowsVersion & TQSysInfo::WV_DOS_based) ? "cmd.exe /c" : "command.com /c"; #else szShell = "command.com /c"; #endif @@ -91,7 +91,7 @@ bool KviKvsProcessAsyncOperation::start() szShell = "sh -c"; #endif } - args = QStringList::split(" ",szShell); + args = TQStringList::split(" ",szShell); args.append(m_pData->szCommandline); } @@ -100,19 +100,19 @@ bool KviKvsProcessAsyncOperation::start() if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDOUT) { - connect(m_pProcess,SIGNAL(readyReadStdout()),this,SLOT(readStdout())); + connect(m_pProcess,TQT_SIGNAL(readyReadStdout()),this,TQT_SLOT(readStdout())); c |= KviProcess::Stdout; } if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTDERR) { - connect(m_pProcess,SIGNAL(readyReadStderr()),this,SLOT(readStderr())); + connect(m_pProcess,TQT_SIGNAL(readyReadStderr()),this,TQT_SLOT(readStderr())); c |= KviProcess::Stderr; } m_pProcess->setCommunication(c); - connect(m_pProcess,SIGNAL(processExited()),this,SLOT(processExited())); + connect(m_pProcess,TQT_SIGNAL(processExited()),this,TQT_SLOT(processExited())); if(!m_pProcess->start()) { @@ -121,7 +121,7 @@ bool KviKvsProcessAsyncOperation::start() if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_TRIGGERSTARTED) { - QString szPid; + TQString szPid; szPid.setNum((int)(m_pProcess->processIdentifier())); if(trigger(EventStarted,szPid)) { @@ -132,15 +132,15 @@ bool KviKvsProcessAsyncOperation::start() if(m_pData->iMaxRunTime > 0) { - m_pRunTimeTimer = new QTimer(this); - connect(m_pRunTimeTimer,SIGNAL(timeout()),this,SLOT(maxRunTimeExpired())); + m_pRunTimeTimer = new TQTimer(this); + connect(m_pRunTimeTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(maxRunTimeExpired())); m_pRunTimeTimer->start(m_pData->iMaxRunTime); } if(m_pData->iPingTimeout > 0) { - m_pPingTimer = new QTimer(this); - connect(m_pPingTimer,SIGNAL(timeout()),this,SLOT(ping())); + m_pPingTimer = new TQTimer(this); + connect(m_pPingTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(ping())); m_pPingTimer->start(m_pData->iPingTimeout); } @@ -149,7 +149,7 @@ bool KviKvsProcessAsyncOperation::start() void KviKvsProcessAsyncOperation::ping() { - if(trigger(EventPing,QString::null)) + if(trigger(EventPing,TQString())) { triggerSelfDelete(); } @@ -159,7 +159,7 @@ void KviKvsProcessAsyncOperation::triggerSelfDelete() { if(m_bDeletePending)return; m_bDeletePending = true; - QTimer::singleShot(m_pData->iMaxRunTime,this,SLOT(selfDelete())); + TQTimer::singleShot(m_pData->iMaxRunTime,this,TQT_SLOT(selfDelete())); } void KviKvsProcessAsyncOperation::selfDelete() @@ -173,7 +173,7 @@ void KviKvsProcessAsyncOperation::maxRunTimeExpired() triggerSelfDelete(); } -bool KviKvsProcessAsyncOperation::trigger(CallbackEvent e,const QString &szData) +bool KviKvsProcessAsyncOperation::trigger(CallbackEvent e,const TQString &szData) { if(m_bDeletePending)return false; @@ -194,19 +194,19 @@ bool KviKvsProcessAsyncOperation::trigger(CallbackEvent e,const QString &szData) switch(e) { case EventStdout: - params.append(new KviKvsVariant(QString("stdout"))); + params.append(new KviKvsVariant(TQString("stdout"))); break; case EventStderr: - params.append(new KviKvsVariant(QString("stderr"))); + params.append(new KviKvsVariant(TQString("stderr"))); break; case EventTerminated: - params.append(new KviKvsVariant(QString("terminated"))); + params.append(new KviKvsVariant(TQString("terminated"))); break; case EventStarted: - params.append(new KviKvsVariant(QString("started"))); + params.append(new KviKvsVariant(TQString("started"))); break; case EventPing: - params.append(new KviKvsVariant(QString("ping"))); + params.append(new KviKvsVariant(TQString("ping"))); break; default: debug("Ops... unknown trigger() CallbackEvent parameter in KviProcessDescriptor::trigger()"); @@ -228,7 +228,7 @@ bool KviKvsProcessAsyncOperation::trigger(CallbackEvent e,const QString &szData) if(!retVal.isNothing()) { - QString sz; + TQString sz; retVal.asString(sz); m_pProcess->writeToStdin(sz); } @@ -248,11 +248,11 @@ void KviKvsProcessAsyncOperation::readStdout() if(m_bDeletePending)return; if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_OUTPUTBYBLOCKS) { - QByteArray a = m_pProcess->readStdout(); + TQByteArray a = m_pProcess->readStdout(); if(a.size() > 0) - m_szStdoutBuffer += QString(a); + m_szStdoutBuffer += TQString(a); } else { - QString l = m_pProcess->readLineStdout(); + TQString l = m_pProcess->readLineStdout(); bool bBreak = false; while((!l.isNull()) && (!bBreak)) { @@ -275,11 +275,11 @@ void KviKvsProcessAsyncOperation::readStderr() if(m_bDeletePending)return; if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_OUTPUTBYBLOCKS) { - QByteArray a = m_pProcess->readStderr(); + TQByteArray a = m_pProcess->readStderr(); if(a.size() > 0) - m_szStderrBuffer += QString(a); + m_szStderrBuffer += TQString(a); } else { - QString l = m_pProcess->readLineStderr(); + TQString l = m_pProcess->readLineStderr(); bool bBreak = false; while((!l.isNull()) && (!bBreak)) { @@ -329,8 +329,8 @@ void KviKvsProcessAsyncOperation::processExited() if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_TRIGGERTERMINATED) { - QString szRetVal; - szRetVal.setNum(m_pProcess->exitStatus()); + TQString szRetVal; + szRetVal.setNum(m_pProcess->exitqStatus()); trigger(EventTerminated,szRetVal); } @@ -341,7 +341,7 @@ void KviKvsProcessAsyncOperation::processExited() /* KviKvsProcessManager::KviKvsProcessManager() -: QObject() +: TQObject() { } |