diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
commit | 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch) | |
tree | b95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/common/nokde/nokde_kprocess.cpp | |
parent | b79a2c28534cf09987eeeba3077fff9236df182a (diff) | |
download | piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip |
TQt4 port piklab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/common/nokde/nokde_kprocess.cpp')
-rw-r--r-- | src/common/nokde/nokde_kprocess.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/common/nokde/nokde_kprocess.cpp b/src/common/nokde/nokde_kprocess.cpp index 92c8968..2886f20 100644 --- a/src/common/nokde/nokde_kprocess.cpp +++ b/src/common/nokde/nokde_kprocess.cpp @@ -1,29 +1,29 @@ #include "nokde_kprocess.h" -#if QT_VERSION<0x040000 -# include <qprocess.h> -# define Q3Process QProcess +#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 +# include <tqprocess.h> +# define Q3Process TQProcess #else -# include <Qt3Support/Q3Process> +# include <TQt3Support/Q3Process> #endif #if defined(Q_OS_UNIX) # include <signal.h> #endif -KProcess::KProcess(QObject *parent, const char *name) - : QObject(parent, name) +KProcess::KProcess(TQObject *tqparent, const char *name) + : TQObject(tqparent, name) { _process = new Q3Process(this); - connect(_process, SIGNAL(processExited()), SLOT(processExitedSlot())); - connect(_process, SIGNAL(readyReadStdout()), SLOT(readyReadStdoutSlot())); - connect(_process, SIGNAL(readyReadStderr()), SLOT(readyReadStderrSlot())); + connect(_process, TQT_SIGNAL(processExited()), TQT_SLOT(processExitedSlot())); + connect(_process, TQT_SIGNAL(readyReadStdout()), TQT_SLOT(readyReadStdoutSlot())); + connect(_process, TQT_SIGNAL(readyReadStderr()), TQT_SLOT(readyReadStderrSlot())); } bool KProcess::start() { _process->setArguments(_arguments); - QStringList env; + TQStringList env; if ( !_environment.isEmpty() ) { for (uint i=0; environ[i]; i++) env += environ[i]; env += _environment; @@ -40,23 +40,23 @@ void KProcess::processExitedSlot() void KProcess::readyReadStdoutSlot() { - QByteArray a = _process->readStdout(); + TQByteArray a = _process->readStdout(); emit receivedStdout(this, a.data(), a.count()); } void KProcess::readyReadStderrSlot() { - QByteArray a = _process->readStderr(); + TQByteArray a = _process->readStderr(); emit receivedStderr(this, a.data(), a.count()); } bool KProcess::writeStdin(const char *buffer, int len) { -#if QT_VERSION<0x040000 - QByteArray a; +#if [[[TQT_VERSION IS DEPRECATED]]]<0x040000 + TQByteArray a; a.assign(buffer, len); #else - QByteArray a(buffer, len); + TQByteArray a(buffer, len); #endif _process->writeToStdin(a); return true; @@ -88,7 +88,7 @@ bool KProcess::isRunning() const return _process->isRunning(); } -void KProcess::setWorkingDirectory(const QDir &dir) +void KProcess::setWorkingDirectory(const TQDir &dir) { return _process->setWorkingDirectory(dir); } |