summaryrefslogtreecommitdiffstats
path: root/krdc/vnc/threads.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /krdc/vnc/threads.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krdc/vnc/threads.cpp')
-rw-r--r--krdc/vnc/threads.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/krdc/vnc/threads.cpp b/krdc/vnc/threads.cpp
index fe5a1d62..ec033388 100644
--- a/krdc/vnc/threads.cpp
+++ b/krdc/vnc/threads.cpp
@@ -23,7 +23,7 @@
#include "vncviewer.h"
#include "threads.h"
-#include <qcstring.h>
+#include <tqcstring.h>
// Maximum idle time for writer thread in ms. When it timeouts, it will request
// another incremental update. Must be smaller than the timeout of the server
@@ -49,12 +49,12 @@ ControllerThread::ControllerThread(KVncView *v, WriterThread &wt, volatile bool
void ControllerThread::changeStatus(RemoteViewStatus s) {
m_status = s;
- QApplication::postEvent(m_view, new StatusChangeEvent(s));
+ TQApplication::postEvent(m_view, new StatusChangeEvent(s));
}
void ControllerThread::sendFatalError(ErrorCode s) {
m_quitFlag = true;
- QApplication::postEvent(m_view, new FatalErrorEvent(s));
+ TQApplication::postEvent(m_view, new FatalErrorEvent(s));
m_wthread.kick();
}
@@ -109,13 +109,13 @@ void ControllerThread::run() {
return;
}
- QApplication::postEvent(m_view,
+ TQApplication::postEvent(m_view,
new ScreenResizeEvent(si.framebufferWidth,
si.framebufferHeight));
- m_wthread.queueUpdateRequest(QRegion(QRect(0,0,si.framebufferWidth,
+ m_wthread.queueUpdateRequest(TQRegion(TQRect(0,0,si.framebufferWidth,
si.framebufferHeight)));
- QApplication::postEvent(m_view, new DesktopInitEvent());
+ TQApplication::postEvent(m_view, new DesktopInitEvent());
while ((!m_quitFlag) && (!m_desktopInitialized))
m_waiter.wait(1000);
@@ -173,7 +173,7 @@ WriterThread::WriterThread(KVncView *v, volatile bool &quitFlag) :
m_incrementalUpdateAnnounced(false),
m_mouseEventNum(0),
m_keyEventNum(0),
- m_clientCut(QString::null)
+ m_clientCut(TQString::null)
{
writerThread = this;
m_lastIncrUpdate.start();
@@ -184,8 +184,8 @@ bool WriterThread::sendIncrementalUpdateRequest() {
return SendIncrementalFramebufferUpdateRequest();
}
-bool WriterThread::sendUpdateRequest(const QRegion &region) {
- QMemArray<QRect> r = region.rects();
+bool WriterThread::sendUpdateRequest(const TQRegion &region) {
+ TQMemArray<TQRect> r = region.rects();
for (unsigned int i = 0; i < r.size(); i++)
if (!SendFramebufferUpdateRequest(r[i].x(),
r[i].y(),
@@ -195,8 +195,8 @@ bool WriterThread::sendUpdateRequest(const QRegion &region) {
return true;
}
-bool WriterThread::sendInputEvents(const QValueList<InputEvent> &events) {
- QValueList<InputEvent>::const_iterator it = events.begin();
+bool WriterThread::sendInputEvents(const TQValueList<InputEvent> &events) {
+ TQValueList<InputEvent>::const_iterator it = events.begin();
while (it != events.end()) {
if ((*it).type == KeyEventType) {
if (!SendKeyEvent((*it).e.k.k, (*it).e.k.down ? True : False))
@@ -224,7 +224,7 @@ void WriterThread::announceIncrementalUpdateRequest() {
}
-void WriterThread::queueUpdateRequest(const QRegion &r) {
+void WriterThread::queueUpdateRequest(const TQRegion &r) {
m_lock.lock();
m_updateRegionRQ += r;
m_waiter.wakeAll();
@@ -283,7 +283,7 @@ void WriterThread::queueKeyEvent(unsigned int k, bool down) {
m_lock.unlock();
}
-void WriterThread::queueClientCut(const QString &text) {
+void WriterThread::queueClientCut(const TQString &text) {
m_lock.lock();
m_clientCut = text;
@@ -299,9 +299,9 @@ void WriterThread::kick() {
void WriterThread::run() {
bool incrementalUpdateRQ = false;
bool incrementalUpdateAnnounced = false;
- QRegion updateRegionRQ;
- QValueList<InputEvent> inputEvents;
- QString clientCut;
+ TQRegion updateRegionRQ;
+ TQValueList<InputEvent> inputEvents;
+ TQString clientCut;
while (!m_quitFlag) {
m_lock.lock();
@@ -324,11 +324,11 @@ void WriterThread::run() {
else {
m_incrementalUpdateRQ = false;
m_incrementalUpdateAnnounced = false;
- m_updateRegionRQ = QRegion();
+ m_updateRegionRQ = TQRegion();
m_inputEvents.clear();
m_keyEventNum = 0;
m_mouseEventNum = 0;
- m_clientCut = QString::null;
+ m_clientCut = TQString::null;
m_lock.unlock();
// always send incremental update, unless
@@ -373,7 +373,7 @@ void WriterThread::run() {
break;
}
if (!clientCut.isNull()) {
- QCString cutTextUtf8(clientCut.utf8());
+ TQCString cutTextUtf8(clientCut.utf8());
if (!SendClientCutText(cutTextUtf8.data(),
(int)cutTextUtf8.length())) {
sendFatalError(ERROR_IO);
@@ -387,6 +387,6 @@ void WriterThread::run() {
void WriterThread::sendFatalError(ErrorCode s) {
m_quitFlag = true;
- QApplication::postEvent(m_view, new FatalErrorEvent(s));
+ TQApplication::postEvent(m_view, new FatalErrorEvent(s));
}