diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-04 20:48:23 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-04 20:48:23 +0000 |
commit | 383adc283801b6238d8acfc750890613a63f8060 (patch) | |
tree | af3a65389067c05263db2ef4551a541501422998 /src/sources/threadedtrigger.cpp | |
parent | da7847adb43726079c7a4be1f06acbebe0bdde57 (diff) | |
download | kima-383adc283801b6238d8acfc750890613a63f8060.tar.gz kima-383adc283801b6238d8acfc750890613a63f8060.zip |
TQt4 port kima
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kima@1239290 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/sources/threadedtrigger.cpp')
-rw-r--r-- | src/sources/threadedtrigger.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sources/threadedtrigger.cpp b/src/sources/threadedtrigger.cpp index 11f07b5..5ea2998 100644 --- a/src/sources/threadedtrigger.cpp +++ b/src/sources/threadedtrigger.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "threadedtrigger.h" -#include <qapplication.h> +#include <tqapplication.h> //#include "kdebug.h" @@ -28,7 +28,7 @@ ThreadedTrigger::ThreadedTrigger(TriggeredSource* inSource, unsigned long inRefr mRefreshSleep(inRefreshSleep), mRunning(false) { - connect(mSource, SIGNAL(enabledChanged(bool, Source*)), this, SLOT(enable(bool))); + connect(mSource, TQT_SIGNAL(enabledChanged(bool, Source*)), this, TQT_SLOT(enable(bool))); } ThreadedTrigger::~ThreadedTrigger(){ @@ -40,7 +40,7 @@ void ThreadedTrigger::enable(bool inEnable){ //kdDebug() << "start thread " << mSource->getName() << endl; // start the thread mRunning = true; - this->start(QThread::LowPriority); + this->start(TQThread::LowPriority); }else if(!inEnable && mRunning){ // stops the thread //kdDebug() << "stop thread " << mSource->getName() << endl; mRunning = false; @@ -54,14 +54,14 @@ void ThreadedTrigger::enable(bool inEnable){ void ThreadedTrigger::run(){ mWaitMutex.lock(); while( mRunning ) { - QString text = mSource->fetchValue(); - UpdateEvent* ue = new UpdateEvent(text); // Qt will delete the ue when done - QApplication::postEvent(mSource, ue); // send the event to the TriggeredSource + TQString text = mSource->fetchValue(); + UpdateEvent* ue = new UpdateEvent(text); // TQt will delete the ue when done + TQApplication::postEvent(mSource, ue); // send the event to the TriggeredSource if(mWaitCond.wait(&mWaitMutex, mRefreshSleep)) break; // we were woken up } // if we are here, the mutex must be locked: - // 1. QWaitCondition::wait locks it when it returns + // 1. TQWaitCondition::wait locks it when it returns // 2. mWaitMutex is locked when we enter the loop mWaitMutex.unlock(); // unlock it again } |