From 383adc283801b6238d8acfc750890613a63f8060 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 4 Jul 2011 20:48:23 +0000 Subject: 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 --- src/sources/threadedtrigger.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/sources/threadedtrigger.cpp') 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 +#include //#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 } -- cgit v1.2.3