summaryrefslogtreecommitdiffstats
path: root/krdc/vnc/threads.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /krdc/vnc/threads.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krdc/vnc/threads.cpp')
-rw-r--r--krdc/vnc/threads.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/krdc/vnc/threads.cpp b/krdc/vnc/threads.cpp
index ec033388..f4e0eefe 100644
--- a/krdc/vnc/threads.cpp
+++ b/krdc/vnc/threads.cpp
@@ -31,11 +31,11 @@
static const int MAXIMUM_WAIT_PERIOD = 8000;
// time to postpone incremental updates that have not been requested explicitly
-static const int POSTPONED_INCRRQ_WAIT_PERIOD = 110;
+static const int POSTPONED_INCRRTQ_WAIT_PERIOD = 110;
-static const int MOUSEPRESS_QUEUE_SIZE = 5;
-static const int MOUSEMOVE_QUEUE_SIZE = 3;
-static const int KEY_QUEUE_SIZE = 8192;
+static const int MOUSEPRESS_TQUEUE_SIZE = 5;
+static const int MOUSEMOVE_TQUEUE_SIZE = 3;
+static const int KEY_TQUEUE_SIZE = 8192;
ControllerThread::ControllerThread(KVncView *v, WriterThread &wt, volatile bool &quitFlag) :
@@ -47,7 +47,7 @@ ControllerThread::ControllerThread(KVncView *v, WriterThread &wt, volatile bool
{
}
-void ControllerThread::changeStatus(RemoteViewStatus s) {
+void ControllerThread::changetqStatus(RemoteViewtqStatus s) {
m_status = s;
TQApplication::postEvent(m_view, new StatusChangeEvent(s));
}
@@ -86,13 +86,13 @@ void ControllerThread::run() {
return;
}
if (m_quitFlag) {
- changeStatus(REMOTE_VIEW_DISCONNECTED);
+ changetqStatus(REMOTE_VIEW_DISCONNECTED);
return;
}
- changeStatus(REMOTE_VIEW_AUTHENTICATING);
+ changetqStatus(REMOTE_VIEW_AUTHENTICATING);
- enum InitStatus s = InitialiseRFBConnection();
+ enum InittqStatus s = InitialiseRFBConnection();
if (s != INIT_OK) {
if (s == INIT_CONNECTION_FAILED)
sendFatalError(ERROR_IO);
@@ -103,7 +103,7 @@ void ControllerThread::run() {
else if (s == INIT_AUTHENTICATION_FAILED)
sendFatalError(ERROR_AUTHENTICATION);
else if (s == INIT_ABORTED)
- changeStatus(REMOTE_VIEW_DISCONNECTED);
+ changetqStatus(REMOTE_VIEW_DISCONNECTED);
else
sendFatalError(ERROR_INTERNAL);
return;
@@ -120,18 +120,18 @@ void ControllerThread::run() {
m_waiter.wait(1000);
if (m_quitFlag) {
- changeStatus(REMOTE_VIEW_DISCONNECTED);
+ changetqStatus(REMOTE_VIEW_DISCONNECTED);
return;
}
- changeStatus(REMOTE_VIEW_PREPARING);
+ changetqStatus(REMOTE_VIEW_PREPARING);
if (!SetFormatAndEncodings()) {
sendFatalError(ERROR_INTERNAL);
return;
}
- changeStatus(REMOTE_VIEW_CONNECTED);
+ changetqStatus(REMOTE_VIEW_CONNECTED);
m_wthread.start();
@@ -143,11 +143,11 @@ void ControllerThread::run() {
}
m_quitFlag = true;
- changeStatus(REMOTE_VIEW_DISCONNECTED);
+ changetqStatus(REMOTE_VIEW_DISCONNECTED);
m_wthread.kick();
}
-enum RemoteViewStatus ControllerThread::status() {
+enum RemoteViewtqStatus ControllerThread::status() {
return m_status;
}
@@ -173,7 +173,7 @@ WriterThread::WriterThread(KVncView *v, volatile bool &quitFlag) :
m_incrementalUpdateAnnounced(false),
m_mouseEventNum(0),
m_keyEventNum(0),
- m_clientCut(TQString::null)
+ m_clientCut(TQString())
{
writerThread = this;
m_lastIncrUpdate.start();
@@ -185,7 +185,7 @@ bool WriterThread::sendIncrementalUpdateRequest() {
}
bool WriterThread::sendUpdateRequest(const TQRegion &region) {
- TQMemArray<TQRect> r = region.rects();
+ TQMemArray<TQRect> r = region.tqrects();
for (unsigned int i = 0; i < r.size(); i++)
if (!SendFramebufferUpdateRequest(r[i].x(),
r[i].y(),
@@ -246,12 +246,12 @@ void WriterThread::queueMouseEvent(int x, int y, int buttonMask) {
m_lock.unlock();
return;
}
- if (m_mouseEventNum >= MOUSEPRESS_QUEUE_SIZE) {
+ if (m_mouseEventNum >= MOUSEPRESS_TQUEUE_SIZE) {
m_lock.unlock();
return;
}
if ((m_lastMouseEvent.buttons == buttonMask) &&
- (m_mouseEventNum >= MOUSEMOVE_QUEUE_SIZE)) {
+ (m_mouseEventNum >= MOUSEMOVE_TQUEUE_SIZE)) {
m_lock.unlock();
return;
}
@@ -272,7 +272,7 @@ void WriterThread::queueKeyEvent(unsigned int k, bool down) {
e.e.k.down = down;
m_lock.lock();
- if (m_keyEventNum >= KEY_QUEUE_SIZE) {
+ if (m_keyEventNum >= KEY_TQUEUE_SIZE) {
m_lock.unlock();
return;
}
@@ -317,7 +317,7 @@ void WriterThread::run() {
(clientCut.isNull())) {
if (!m_waiter.wait(&m_lock,
m_lastIncrUpdatePostponed ?
- POSTPONED_INCRRQ_WAIT_PERIOD : MAXIMUM_WAIT_PERIOD))
+ POSTPONED_INCRRTQ_WAIT_PERIOD : MAXIMUM_WAIT_PERIOD))
m_incrementalUpdateRQ = true;
m_lock.unlock();
}
@@ -328,7 +328,7 @@ void WriterThread::run() {
m_inputEvents.clear();
m_keyEventNum = 0;
m_mouseEventNum = 0;
- m_clientCut = TQString::null;
+ m_clientCut = TQString();
m_lock.unlock();
// always send incremental update, unless