diff options
Diffstat (limited to 'src/common/global/process.cpp')
-rw-r--r-- | src/common/global/process.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/common/global/process.cpp b/src/common/global/process.cpp index 7659eea..1efe715 100644 --- a/src/common/global/process.cpp +++ b/src/common/global/process.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "process.h" -#include <qdatetime.h> +#include <tqdatetime.h> #if defined(NO_KDE) # include "common/nokde/nokde_kprocess.h" @@ -22,8 +22,8 @@ Process::State Process::runSynchronously(Base &process, RunActions actions, uint timeout) { Synchronous sync(timeout); - QObject::connect(&process, SIGNAL(done(int)), &sync, SLOT(done())); - QObject::connect(&process, SIGNAL(requestSynchronousStop()), &sync, SLOT(done())); + TQObject::connect(&process, TQT_SIGNAL(done(int)), &sync, TQT_SLOT(done())); + TQObject::connect(&process, TQT_SIGNAL(requestSynchronousStop()), &sync, TQT_SLOT(done())); if ( (actions & Start) && !process.start(0) ) return process.state(); Q_ASSERT( process.isRunning() ); if ( !sync.enterLoop() ) process.timeoutSlot(); @@ -31,15 +31,15 @@ Process::State Process::runSynchronously(Base &process, RunActions actions, uint } //---------------------------------------------------------------------------- -Process::Base::Base(QObject *parent, const char *name) - : QObject(parent, name), _state(Stopped) +Process::Base::Base(TQObject *tqparent, const char *name) + : TQObject(tqparent, name), _state(Stopped) { _process = new KProcess(this); - connect(_process, SIGNAL(processExited(KProcess *)), SLOT(exited())); - connect(_process, SIGNAL(receivedStdout(KProcess *, char *, int)), SLOT(receivedStdout(KProcess*, char *, int))); - connect(_process, SIGNAL(receivedStderr(KProcess *, char *, int)), SLOT(receivedStderr(KProcess*, char *, int))); - _timer = new QTimer(this); - connect(_timer, SIGNAL(timeout()), SLOT(timeoutSlot())); + connect(_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(exited())); + connect(_process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), TQT_SLOT(receivedStdout(KProcess*, char *, int))); + connect(_process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), TQT_SLOT(receivedStderr(KProcess*, char *, int))); + _timer = new TQTimer(this); + connect(_timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeoutSlot())); } Process::Base::~Base() @@ -47,27 +47,27 @@ Process::Base::~Base() _process->kill(); } -QStringList Process::Base::arguments() const +TQStringList Process::Base::arguments() const { - if ( _process==0 ) return QStringList(); + if ( _process==0 ) return TQStringList(); #if defined(NO_KDE) return _process->args(); #else - QStringList list; - const QValueList<QCString> &args = _process->args(); + TQStringList list; + const TQValueList<TQCString> &args = _process->args(); for (uint i=0; i<args.count(); i++) list.append(args[i]); return list; #endif } -void Process::Base::setup(const QString &executable, const QStringList &options, bool withWine) +void Process::Base::setup(const TQString &executable, const TQStringList &options, bool withWine) { _state = Stopped; _timer->stop(); _process->clearArguments(); if (withWine) { _process->setEnvironment("WINEDEBUG", "-all"); - *_process << QString("wine"); + *_process << TQString("wine"); } *_process << executable; *_process << options; @@ -77,8 +77,8 @@ bool Process::Base::start(uint timeout) { _state = Stopped; _timer->stop(); - _stdout = QString::null; - _stderr = QString::null; + _stdout = TQString(); + _stderr = TQString(); #if defined(NO_KDE) if ( !_process->start() ) { #else @@ -116,9 +116,9 @@ bool Process::Base::isRunning() const return _process->isRunning(); } -void Process::Base::writeToStdin(const QString &s) +void Process::Base::writeToStdin(const TQString &s) { - QCString cs = s.latin1(); + TQCString cs = s.latin1(); _process->writeStdin(cs.data(), cs.length()); } @@ -137,7 +137,7 @@ void Process::Base::setUseShell(bool useShell) _process->setUseShell(useShell); } -bool Process::Base::isFilteredLine(const QString &line) +bool Process::Base::isFilteredLine(const TQString &line) { // "wine" returns all those "libGL warning" that mess up the output... return line.startsWith("libGL warning"); @@ -146,13 +146,13 @@ bool Process::Base::isFilteredLine(const QString &line) //---------------------------------------------------------------------------- void Process::StringOutput::receivedStdout(KProcess*, char *data, int len) { - _stdout += QString::fromLatin1(data, len); + _stdout += TQString::tqfromLatin1(data, len); emit stdoutDataReceived(); } void Process::StringOutput::receivedStderr(KProcess*, char *data, int len) { - _stderr += QString::fromLatin1(data, len); + _stderr += TQString::tqfromLatin1(data, len); emit stderrDataReceived(); } @@ -163,8 +163,8 @@ void Process::LineBase::receivedStdout(KProcess*, char *data, int len) if ( data[i]=='\r' ) continue; if ( data[i]=='\n' ) { if ( !isFilteredLine(_stdout) ) addStdoutLine(_stdout); - _stdout = QString::null; - } else _stdout += QString::fromLatin1(data + i, 1); + _stdout = TQString(); + } else _stdout += TQString::tqfromLatin1(data + i, 1); } if ( !_process->isRunning() && !isFilteredLine(_stdout) ) addStdoutLine(_stdout); emit stdoutDataReceived(); @@ -176,8 +176,8 @@ void Process::LineBase::receivedStderr(KProcess*, char *data, int len) if ( data[i]=='\r' ) continue; if ( data[i]=='\n' ) { if ( !isFilteredLine(_stderr) ) addStderrLine(_stderr); - _stderr = QString::null; - } else _stderr += QString::fromLatin1(data + i, 1); + _stderr = TQString(); + } else _stderr += TQString::tqfromLatin1(data + i, 1); } if ( !_process->isRunning() && !isFilteredLine(_stderr) ) addStderrLine(_stderr); emit stderrDataReceived(); |