summaryrefslogtreecommitdiffstats
path: root/src/kvilib/system/kvi_thread.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/kvilib/system/kvi_thread.h
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kvilib/system/kvi_thread.h')
-rw-r--r--src/kvilib/system/kvi_thread.h35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/kvilib/system/kvi_thread.h b/src/kvilib/system/kvi_thread.h
index bd6dab3b..f024505f 100644
--- a/src/kvilib/system/kvi_thread.h
+++ b/src/kvilib/system/kvi_thread.h
@@ -26,11 +26,11 @@
#include "kvi_heapobject.h"
#include "kvi_string.h"
-#include <qnamespace.h>
-#include <qobject.h>
-#include <qsocketnotifier.h>
+#include <tqnamespace.h>
+#include <tqobject.h>
+#include <tqsocketnotifier.h>
#include "kvi_pointerlist.h"
-#include <qevent.h>
+#include <tqevent.h>
//
@@ -181,7 +181,7 @@ private:
bool m_bRunning;
bool m_bStartingUp;
KviMutex * m_pRunningMutex;
- KviPointerList<QEvent> * m_pLocalEventQueue;
+ KviPointerList<TQEvent> * m_pLocalEventQueue;
public:
// public KviThread interface
// HANDLE WITH CARE
@@ -215,14 +215,14 @@ protected:
void exit();
// The tricky part: threadsafe event dispatching
// Slave thread -> main thread objects
- void postEvent(QObject *o,QEvent *e);
+ void postEvent(TQObject *o,TQEvent *e);
private:
void setRunning(bool bRunning);
void setStartingUp(bool bStartingUp);
};
-// QEvent::Type for Thread events
-#define KVI_THREAD_EVENT (((int)QEvent::User) + 2000)
+// TQEvent::Type for Thread events
+#define KVI_THREAD_EVENT (((int)TQEvent::User) + 2000)
// CONSTANTS FOR KviThreadEvent::eventId();
@@ -261,14 +261,14 @@ private:
// #warning "Get rid of the m_szMessage member of KviThreadEvent : eventual data should be passed with a KviThreadDataEvent"
// Base class for all thread events
-class KVILIB_API KviThreadEvent : public QEvent, public KviHeapObject
+class KVILIB_API KviThreadEvent : public TQEvent, public KviHeapObject
{
protected:
int m_eventId;
KviThread * m_pSender;
public:
KviThreadEvent(int evId,KviThread * sender = 0)
- : QEvent((QEvent::Type)KVI_THREAD_EVENT) , m_eventId(evId) , m_pSender(sender) {};
+ : TQEvent((TQEvent::Type)KVI_THREAD_EVENT) , m_eventId(evId) , m_pSender(sender) {};
virtual ~KviThreadEvent(){};
public:
// This is the sender of the event
@@ -329,25 +329,26 @@ protected:
typedef struct _KviThreadPendingEvent
{
- QObject *o;
- QEvent *e;
+ TQObject *o;
+ TQEvent *e;
} KviThreadPendingEvent;
-class KVILIB_API KviThreadManager : public QObject
+class KVILIB_API KviThreadManager : public TQObject
{
friend class KviApp;
friend class KviThread;
Q_OBJECT
+ TQ_OBJECT
protected:
// These should be private...but we don't want anyone to complain
// Treat as private plz.
KviThreadManager();
~KviThreadManager();
public:
- static void killPendingEvents(QObject * receiver);
+ static void killPendingEvents(TQObject * receiver);
private:
#ifndef COMPILE_ON_WINDOWS
- QSocketNotifier * m_pSn;
+ TQSocketNotifier * m_pSn;
#endif
KviMutex * m_pMutex; // This class performs only atomic operations
KviPointerList<KviThread> * m_pThreadList;
@@ -365,8 +366,8 @@ protected:
void threadEnteredWaitState();
void threadLeftWaitState();
- void postSlaveEvent(QObject *o,QEvent *e);
- void killPendingEventsByReceiver(QObject * receiver);
+ void postSlaveEvent(TQObject *o,TQEvent *e);
+ void killPendingEventsByReceiver(TQObject * receiver);
// Public to KviApp only
static void globalInit();
static void globalDestroy();