From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: 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 --- krdc/vnc/desktop.c | 26 +++++++++--------- krdc/vnc/kvncview.cpp | 68 ++++++++++++++++++++++++------------------------ krdc/vnc/kvncview.h | 17 ++++++------ krdc/vnc/rfbproto.c | 20 +++++++------- krdc/vnc/rfbproto.h | 24 ++++++++--------- krdc/vnc/threads.cpp | 42 +++++++++++++++--------------- krdc/vnc/threads.h | 6 ++--- krdc/vnc/vnchostpref.cpp | 2 +- krdc/vnc/vnchostpref.h | 4 +-- krdc/vnc/vncprefs.ui | 22 ++++++++-------- krdc/vnc/vncprefs.ui.h | 2 +- krdc/vnc/vnctypes.h | 2 +- krdc/vnc/vncviewer.h | 2 +- 13 files changed, 119 insertions(+), 118 deletions(-) (limited to 'krdc/vnc') diff --git a/krdc/vnc/desktop.c b/krdc/vnc/desktop.c index e60c67ee..2975e731 100644 --- a/krdc/vnc/desktop.c +++ b/krdc/vnc/desktop.c @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. * Copyright (C) 2002 Tim Jansen. All Rights Reserved. - * Copyright (C) 1999-2001 Anders Lindström + * Copyright (C) 1999-2001 Anders Lindstr�m * * * @@ -25,7 +25,7 @@ * - added FillRectangle and Sync methods to draw only on * the image * - added Zoom functionality, based on rotation funcs from - * SGE by Anders Lindström) + * SGE by Anders Lindstr�m) * - added support for softcursor encoding * */ @@ -626,7 +626,7 @@ void SyncScreenRegionX11Thread(int x, int y, int width, int height) { } /* - * ToplevelInitBeforeRealization sets the title, geometry and other resources + * ToplevelInitBeforeRealization sets the title, tqgeometry and other resources * on the toplevel window. */ @@ -1380,17 +1380,17 @@ static void _calcRect(Surface *src, Surface *dst, float xscale, float yscale, UintXX *dst_row; \ UintXX c1, c2, c3, c4;\ Uint32 R, G, B, A=0; \ - UintXX Rmask = image->red_mask;\ - UintXX Gmask = image->green_mask;\ - UintXX Bmask = image->blue_mask;\ - UintXX Amask = 0;\ + UintXX Rtqmask = image->red_mask;\ + UintXX Gtqmask = image->green_mask;\ + UintXX Btqmask = image->blue_mask;\ + UintXX Atqmask = 0;\ Uint32 wx, wy;\ Uint32 p1, p2, p3, p4;\ \ /* * Interpolation: * We calculate the distances from our point to the four nearest pixels, d1..d4. - * d(a,b) = sqrt(a²+b²) ~= 0.707(a+b) (Pythagoras (Taylor) expanded around (0.5;0.5)) + * d(a,b) = sqrt(a�+b�) ~= 0.707(a+b) (Pythagoras (Taylor) expanded around (0.5;0.5)) * * 1 wx 2 * *-|-* (+ = our point at (x,y)) @@ -1449,11 +1449,11 @@ static void _calcRect(Surface *src, Surface *dst, float xscale, float yscale, c4 = *(src_row + (ry+1)*src_pitch + rx+1);\ \ /* Calculate the average */\ - R = ((p1*(c1 & Rmask) + p2*(c2 & Rmask) + p3*(c3 & Rmask) + p4*(c4 & Rmask))>>7) & Rmask;\ - G = ((p1*(c1 & Gmask) + p2*(c2 & Gmask) + p3*(c3 & Gmask) + p4*(c4 & Gmask))>>7) & Gmask;\ - B = ((p1*(c1 & Bmask) + p2*(c2 & Bmask) + p3*(c3 & Bmask) + p4*(c4 & Bmask))>>7) & Bmask;\ - if(Amask)\ - A = ((p1*(c1 & Amask) + p2*(c2 & Amask) + p3*(c3 & Amask) + p4*(c4 & Amask))>>7) & Amask;\ + R = ((p1*(c1 & Rtqmask) + p2*(c2 & Rtqmask) + p3*(c3 & Rtqmask) + p4*(c4 & Rtqmask))>>7) & Rtqmask;\ + G = ((p1*(c1 & Gtqmask) + p2*(c2 & Gtqmask) + p3*(c3 & Gtqmask) + p4*(c4 & Gtqmask))>>7) & Gtqmask;\ + B = ((p1*(c1 & Btqmask) + p2*(c2 & Btqmask) + p3*(c3 & Btqmask) + p4*(c4 & Btqmask))>>7) & Btqmask;\ + if(Atqmask)\ + A = ((p1*(c1 & Atqmask) + p2*(c2 & Atqmask) + p3*(c3 & Atqmask) + p4*(c4 & Atqmask))>>7) & Atqmask;\ \ *(dst_row + x) = R | G | B | A;\ } \ diff --git a/krdc/vnc/kvncview.cpp b/krdc/vnc/kvncview.cpp index 8050a68b..e5add6c8 100644 --- a/krdc/vnc/kvncview.cpp +++ b/krdc/vnc/kvncview.cpp @@ -64,7 +64,7 @@ static TQWaitCondition passwordWaiter; const unsigned int MAX_SELECTION_LENGTH = 4096; -KVncView::KVncView(TQWidget *parent, +KVncView::KVncView(TQWidget *tqparent, const char *name, const TQString &_host, int _port, @@ -72,7 +72,7 @@ KVncView::KVncView(TQWidget *parent, Quality quality, DotCursorState dotCursorState, const TQString &encodings) : - KRemoteView(parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase | Qt::WStaticContents), + KRemoteView(tqparent, name, TQt::WResizeNoErase | TQt::WRepaintNoErase | TQt::WStaticContents), m_cthread(this, m_wthread, m_quitFlag), m_wthread(this, m_quitFlag), m_quitFlag(false), @@ -90,9 +90,9 @@ KVncView::KVncView(TQWidget *parent, password = _password.latin1(); dpy = qt_xdisplay(); setFixedSize(16,16); - setFocusPolicy(TQWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); - m_cb = TQApplication::clipboard(); + m_cb = TQApplication::tqclipboard(); connect(m_cb, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); connect(m_cb, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged())); @@ -100,10 +100,10 @@ KVncView::KVncView(TQWidget *parent, TQBitmap cursorBitmap(dirs->findResource("appdata", "pics/pointcursor.png")); TQBitmap cursorMask(dirs->findResource("appdata", - "pics/pointcursormask.png")); + "pics/pointcursortqmask.png")); m_cursor = TQCursor(cursorBitmap, cursorMask); - if ((quality != QUALITY_UNKNOWN) || + if ((quality != TQUALITY_UNKNOWN) || !encodings.isNull()) configureApp(quality, encodings); } @@ -126,11 +126,11 @@ void KVncView::showDotCursorInternal() { setCursor(m_cursor); break; case DOT_CURSOR_OFF: - setCursor(TQCursor(Qt::BlankCursor)); + setCursor(TQCursor(TQt::BlankCursor)); break; case DOT_CURSOR_AUTO: if (m_enableClientCursor) - setCursor(TQCursor(Qt::BlankCursor)); + setCursor(TQCursor(TQt::BlankCursor)); else setCursor(m_cursor); break; @@ -160,21 +160,21 @@ void KVncView::configureApp(Quality q, const TQString specialEncodings) { appData.shareDesktop = 1; appData.viewOnly = 0; - if (q == QUALITY_LOW) { + if (q == TQUALITY_LOW) { appData.useBGR233 = 1; appData.encodingsString = "background copyrect softcursor tight zlib hextile raw"; appData.compressLevel = -1; appData.qualityLevel = 1; appData.dotCursor = 1; } - else if (q == QUALITY_MEDIUM) { + else if (q == TQUALITY_MEDIUM) { appData.useBGR233 = 0; appData.encodingsString = "background copyrect softcursor tight zlib hextile raw"; appData.compressLevel = -1; appData.qualityLevel = 7; appData.dotCursor = 1; } - else if ((q == QUALITY_HIGH) || (q == QUALITY_UNKNOWN)) { + else if ((q == TQUALITY_HIGH) || (q == TQUALITY_UNKNOWN)) { appData.useBGR233 = 0; appData.encodingsString = "copyrect softcursor hextile raw"; appData.compressLevel = -1; @@ -219,7 +219,7 @@ bool KVncView::checkLocalKRfb() { if (m_port != portNum) return true; - setStatus(REMOTE_VIEW_DISCONNECTED); + settqStatus(REMOTE_VIEW_DISCONNECTED); KMessageBox::error(0, i18n("It is not possible to connect to a local desktop sharing service."), i18n("Connection Failure")); @@ -236,7 +236,7 @@ bool KVncView::editPreferences( HostPrefPtr host ) // show preferences dialog KDialogBase *dlg = new KDialogBase( 0L, "dlg", true, - i18n( "VNC Host Preferences for %1" ).arg( host->host() ), + i18n( "VNC Host Preferences for %1" ).tqarg( host->host() ), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); TQVBox *vbox = dlg->makeVBoxMainWidget(); @@ -281,11 +281,11 @@ bool KVncView::start() { Quality quality; if (ci == 0) - quality = QUALITY_HIGH; + quality = TQUALITY_HIGH; else if (ci == 1) - quality = QUALITY_MEDIUM; + quality = TQUALITY_MEDIUM; else if (ci == 2) - quality = QUALITY_LOW; + quality = TQUALITY_LOW; else { kdDebug() << "Unknown quality"; return false; @@ -295,10 +295,10 @@ bool KVncView::start() { useKWallet = hp->useKWallet(); } - setStatus(REMOTE_VIEW_CONNECTING); + settqStatus(REMOTE_VIEW_CONNECTING); m_cthread.start(); - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); return true; } @@ -339,7 +339,7 @@ void KVncView::setViewOnly(bool s) { m_viewOnly = s; if (s) - setCursor(Qt::ArrowCursor); + setCursor(TQt::ArrowCursor); else showDotCursorInternal(); } @@ -390,7 +390,7 @@ void KVncView::customEvent(TQCustomEvent *e) } else if (e->type() == StatusChangeEventType) { StatusChangeEvent *sce = (StatusChangeEvent*) e; - setStatus(sce->status()); + settqStatus(sce->status()); if (m_status == REMOTE_VIEW_CONNECTED) { emit connected(); setFocus(); @@ -458,7 +458,7 @@ void KVncView::customEvent(TQCustomEvent *e) } else if (e->type() == FatalErrorEventType) { FatalErrorEvent *fee = (FatalErrorEvent*) e; - setStatus(REMOTE_VIEW_DISCONNECTED); + settqStatus(REMOTE_VIEW_DISCONNECTED); switch (fee->errorCode()) { case ERROR_CONNECTION: KMessageBox::error(0, @@ -514,8 +514,8 @@ void KVncView::customEvent(TQCustomEvent *e) ServerCutEvent *sce = (ServerCutEvent*) e; TQString ctext = TQString::fromUtf8(sce->bytes(), sce->length()); m_dontSendCb = true; - m_cb->setText(ctext, QClipboard::Clipboard); - m_cb->setText(ctext, QClipboard::Selection); + m_cb->setText(ctext, TQClipboard::Clipboard); + m_cb->setText(ctext, TQClipboard::Selection); m_dontSendCb = false; } else if (e->type() == MouseStateEventType) { @@ -536,19 +536,19 @@ void KVncView::mouseEvent(TQMouseEvent *e) { if ( e->type() != TQEvent::MouseMove ) { if ( (e->type() == TQEvent::MouseButtonPress) || (e->type() == TQEvent::MouseButtonDblClick)) { - if ( e->button() & LeftButton ) + if ( e->button() & Qt::LeftButton ) m_buttonMask |= 0x01; - if ( e->button() & MidButton ) + if ( e->button() & Qt::MidButton ) m_buttonMask |= 0x02; - if ( e->button() & RightButton ) + if ( e->button() & Qt::RightButton ) m_buttonMask |= 0x04; } else if ( e->type() == TQEvent::MouseButtonRelease ) { - if ( e->button() & LeftButton ) + if ( e->button() & Qt::LeftButton ) m_buttonMask &= 0xfe; - if ( e->button() & MidButton ) + if ( e->button() & Qt::MidButton ) m_buttonMask &= 0xfd; - if ( e->button() & RightButton ) + if ( e->button() & Qt::RightButton ) m_buttonMask &= 0xfb; } } @@ -659,7 +659,7 @@ bool KVncView::x11Event(XEvent *e) { case XK_Shift_R: if (pressed) m_mods[s] = true; - else if (m_mods.contains(s)) + else if (m_mods.tqcontains(s)) m_mods.remove(s); else unpressModifiers(); @@ -683,8 +683,8 @@ void KVncView::focusOutEvent(TQFocusEvent *) { unpressModifiers(); } -TQSize KVncView::sizeHint() { - return maximumSize(); +TQSize KVncView::tqsizeHint() { + return tqmaximumSize(); } void KVncView::setRemoteMouseTracking(bool s) { @@ -702,7 +702,7 @@ void KVncView::clipboardChanged() { if (m_cb->ownsClipboard() || m_dontSendCb) return; - TQString text = m_cb->text(QClipboard::Clipboard); + TQString text = m_cb->text(TQClipboard::Clipboard); if (text.length() > MAX_SELECTION_LENGTH) return; @@ -716,7 +716,7 @@ void KVncView::selectionChanged() { if (m_cb->ownsSelection() || m_dontSendCb) return; - TQString text = m_cb->text(QClipboard::Selection); + TQString text = m_cb->text(TQClipboard::Selection); if (text.length() > MAX_SELECTION_LENGTH) return; diff --git a/krdc/vnc/kvncview.h b/krdc/vnc/kvncview.h index a9de2378..3cd72a5c 100644 --- a/krdc/vnc/kvncview.h +++ b/krdc/vnc/kvncview.h @@ -27,11 +27,12 @@ #include "vnctypes.h" #include "threads.h" -class QClipBoard; +class TQClipBoard; class KVncView : public KRemoteView { Q_OBJECT + TQ_OBJECT private: ControllerThread m_cthread; WriterThread m_wthread; @@ -51,7 +52,7 @@ private: TQString m_host; int m_port; - QClipboard *m_cb; + TQClipboard *m_cb; bool m_dontSendCb; TQCursor m_cursor; DotCursorState m_cursorState; @@ -76,14 +77,14 @@ protected: bool x11Event(XEvent*); public: - KVncView(TQWidget* parent=0, const char *name=0, + KVncView(TQWidget* tqparent=0, const char *name=0, const TQString &host = TQString(""), int port = 5900, - const TQString &password = TQString::null, - Quality quality = QUALITY_UNKNOWN, + const TQString &password = TQString(), + Quality quality = TQUALITY_UNKNOWN, DotCursorState dotCursorState = DOT_CURSOR_AUTO, - const TQString &encodings = TQString::null); + const TQString &encodings = TQString()); ~KVncView(); - TQSize sizeHint(); + TQSize tqsizeHint(); void drawRegion(int x, int y, int w, int h); void lockFramebuffer(); void unlockFramebuffer(); @@ -94,7 +95,7 @@ public: virtual TQSize framebufferSize(); void setRemoteMouseTracking(bool s); bool remoteMouseTracking(); - void configureApp(Quality q, const TQString specialEncodings = TQString::null); + void configureApp(Quality q, const TQString specialEncodings = TQString()); void showDotCursor(DotCursorState state); DotCursorState dotCursorState() const; virtual void startQuitting(); diff --git a/krdc/vnc/rfbproto.c b/krdc/vnc/rfbproto.c index 63901a0f..371912a4 100644 --- a/krdc/vnc/rfbproto.c +++ b/krdc/vnc/rfbproto.c @@ -159,7 +159,7 @@ ConnectToRFBServer(const char *hostname, int port) * InitialiseRFBConnection. */ -enum InitStatus +enum InittqStatus InitialiseRFBConnection() { rfbProtocolVersionMsg pv; @@ -558,7 +558,7 @@ HandleSoftCursorSetImage(rfbSoftCursorSetImage *msg, rfbRectangle *rect) /* framebuffer must be locked when calling this!!! */ static Bool -PointerMove(unsigned int x, unsigned int y, unsigned int mask, +PointerMove(unsigned int x, unsigned int y, unsigned int tqmask, int ox, int oy, int ow, int oh) { int nx, ny, nw, nh; @@ -585,7 +585,7 @@ PointerMove(unsigned int x, unsigned int y, unsigned int mask, SyncScreenRegion(nx, ny, nw, nh); } - postMouseEvent(cursorX, cursorY, mask); + postMouseEvent(cursorX, cursorY, tqmask); return True; } @@ -734,12 +734,12 @@ static void *MakeSoftCursor(int bpp, int cursorWidth, int cursorHeight, /********************************************************************* - * HandleCursorShape(). Support for XCursor and RichCursor shape + * HandletqCursorShape(). Support for XCursor and RichCursor tqshape * updates. We emulate cursor operating on the frame buffer (that is * why we call it "software cursor"). ********************************************************************/ -static Bool HandleCursorShape(int xhot, int yhot, int width, int height, CARD32 enc) +static Bool HandletqCursorShape(int xhot, int yhot, int width, int height, CARD32 enc) { int bytesPerPixel; size_t bytesPerRow, bytesMaskData; @@ -759,7 +759,7 @@ static Bool HandleCursorShape(int xhot, int yhot, int width, int height, CARD32 if (width * height == 0) return True; - /* Allocate memory for pixel data and temporary mask data. */ + /* Allocate memory for pixel data and temporary tqmask data. */ rcSource = malloc(width * height * bytesPerPixel); if (rcSource == NULL) @@ -830,7 +830,7 @@ static Bool HandleCursorShape(int xhot, int yhot, int width, int height, CARD32 } } - /* Read mask data. */ + /* Read tqmask data. */ if (!ReadFromRFBServer((char*)rcMask, bytesMaskData)) { free(rcSource); @@ -910,9 +910,9 @@ HandleRFBServerMessage() xc.blue = Swap16IfLE(rgb[2]); xc.flags = DoRed|DoGreen|DoBlue; /* Disable colormaps - lockQt(); + lockTQt(); XStoreColor(dpy, cmap, &xc); - unlockQt(); + unlockTQt(); */ } @@ -956,7 +956,7 @@ HandleRFBServerMessage() if (rect.encoding == rfbEncodingXCursor || rect.encoding == rfbEncodingRichCursor) { - if (!HandleCursorShape(rect.r.x, rect.r.y, rect.r.w, rect.r.h, + if (!HandletqCursorShape(rect.r.x, rect.r.y, rect.r.w, rect.r.h, rect.encoding)) { return False; } diff --git a/krdc/vnc/rfbproto.h b/krdc/vnc/rfbproto.h index f08fe66a..9622eb2e 100644 --- a/krdc/vnc/rfbproto.h +++ b/krdc/vnc/rfbproto.h @@ -27,7 +27,7 @@ * * All multiple byte integers are in big endian (network) order (most * significant byte first). Unless noted otherwise there is no special - * alignment of protocol structures. + * tqalignment of protocol structures. * * * Once the initial handshaking is done, all messages start with a type byte, @@ -54,7 +54,7 @@ /*----------------------------------------------------------------------------- * Structure used to specify a rectangle. This structure is a multiple of 4 * bytes so that it can be interspersed with 32-bit pixel data without - * affecting alignment. + * affecting tqalignment. */ typedef struct { @@ -299,7 +299,7 @@ typedef struct { /* * Special encoding numbers: * 0xFFFFFF00 .. 0xFFFFFF0F -- encoding-specific compression levels; - * 0xFFFFFF10 .. 0xFFFFFF1F -- mouse cursor shape data; + * 0xFFFFFF10 .. 0xFFFFFF1F -- mouse cursor tqshape data; * 0xFFFFFF20 .. 0xFFFFFF2F -- various protocol extensions; * 0xFFFFFF30 .. 0xFFFFFFDF -- not allocated yet; * 0xFFFFFFE0 .. 0xFFFFFFEF -- quality level for JPEG compressor; @@ -350,7 +350,7 @@ typedef struct { * This message consists of a header giving the number of rectangles of pixel * data followed by the rectangles themselves. The header is padded so that * together with the type byte it is an exact multiple of 4 bytes (to help - * with alignment of 32-bit pixels): + * with tqalignment of 32-bit pixels): */ typedef struct { @@ -436,11 +436,11 @@ typedef struct { * the last tile in each row will be correspondingly smaller. Similarly if the * height is not an exact multiple of 16 then the height of each tile in the * final row will also be smaller. Each tile begins with a "subencoding" type - * byte, which is a mask made up of a number of bits. If the Raw bit is set + * byte, which is a tqmask made up of a number of bits. If the Raw bit is set * then the other bits are irrelevant; w*h pixel values follow (where w and h * are the width and height of the tile). Otherwise the tile is encoded in a * similar way to RRE, except that the position and size of each subrectangle - * can be specified in just two bytes. The other bits in the mask are as + * can be specified in just two bytes. The other bits in the tqmask are as * follows: * * BackgroundSpecified - if set, a pixel value follows which specifies @@ -633,7 +633,7 @@ typedef struct { /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * XCursor encoding. This is a special encoding used to transmit X-style - * cursor shapes from server to clients. Note that for this encoding, + * cursor tqshapes from server to clients. Note that for this encoding, * coordinates in rfbFramebufferUpdateRectHeader structure hold hotspot * position (r.x, r.y) and cursor size (r.w, r.h). If (w * h != 0), two RGB * samples are sent after header in the rfbXCursorColors structure. They @@ -664,7 +664,7 @@ typedef struct { /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * RichCursor encoding. This is a special encoding used to transmit cursor - * shapes from server to clients. It is similar to the XCursor encoding but + * tqshapes from server to clients. It is similar to the XCursor encoding but * uses client pixel format instead of two RGB colors to represent cursor * image. For this encoding, coordinates in rfbFramebufferUpdateRectHeader * structure hold hotspot position (r.x, r.y) and cursor size (r.w, r.h). @@ -706,10 +706,10 @@ typedef struct { CARD16 imageLength; /* * Followed by an image of the cursor in the client's image format - * with the following RLE mask compression. It begins with CARD8 that - * specifies the number of mask'ed pixels that will be NOT transmitted. - * Then follows a CARD8 that specified by the number of unmask'd pixels - * that will be transmitted next. Then a CARD8 with the number of mask'd + * with the following RLE tqmask compression. It begins with CARD8 that + * specifies the number of tqmask'ed pixels that will be NOT transmitted. + * Then follows a CARD8 that specified by the number of untqmask'd pixels + * that will be transmitted next. Then a CARD8 with the number of tqmask'd * pixels and so on. */ } rfbSoftCursorSetImage; 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 ®ion) { - TQMemArray r = region.rects(); + TQMemArray 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 diff --git a/krdc/vnc/threads.h b/krdc/vnc/threads.h index 08ca4c20..4bb77ef3 100644 --- a/krdc/vnc/threads.h +++ b/krdc/vnc/threads.h @@ -102,18 +102,18 @@ protected: class ControllerThread : public TQThread { private: KVncView *m_view; - enum RemoteViewStatus m_status; + enum RemoteViewtqStatus m_status; WriterThread &m_wthread; volatile bool &m_quitFlag; volatile bool m_desktopInitialized; TQWaitCondition m_waiter; - void changeStatus(RemoteViewStatus s); + void changetqStatus(RemoteViewtqStatus s); void sendFatalError(ErrorCode s); public: ControllerThread(KVncView *v, WriterThread &wt, volatile bool &quitFlag); - enum RemoteViewStatus status(); + enum RemoteViewtqStatus status(); void desktopInit(); void kick(); diff --git a/krdc/vnc/vnchostpref.cpp b/krdc/vnc/vnchostpref.cpp index 7fea2889..3ae6ed92 100644 --- a/krdc/vnc/vnchostpref.cpp +++ b/krdc/vnc/vnchostpref.cpp @@ -96,7 +96,7 @@ TQString VncHostPref::prefDescription() const { Q_ASSERT(true); } return i18n("Show Preferences: %1, Quality: %2, KWallet: %3") - .arg(m_askOnConnect ? i18n("yes") : i18n("no")).arg(q).arg(m_useKWallet ? i18n("yes") : i18n("no")); + .tqarg(m_askOnConnect ? i18n("yes") : i18n("no")).tqarg(q).tqarg(m_useKWallet ? i18n("yes") : i18n("no")); } void VncHostPref::setQuality(int q) { diff --git a/krdc/vnc/vnchostpref.h b/krdc/vnc/vnchostpref.h index cfd91053..d6a2c97c 100644 --- a/krdc/vnc/vnchostpref.h +++ b/krdc/vnc/vnchostpref.h @@ -36,8 +36,8 @@ protected: public: static const TQString VncType; - VncHostPref(KConfig *conf, const TQString &host=TQString::null, - const TQString &type=TQString::null); + VncHostPref(KConfig *conf, const TQString &host=TQString(), + const TQString &type=TQString()); virtual ~VncHostPref(); virtual TQString prefDescription() const; diff --git a/krdc/vnc/vncprefs.ui b/krdc/vnc/vncprefs.ui index 034b2b1a..0522d324 100644 --- a/krdc/vnc/vncprefs.ui +++ b/krdc/vnc/vncprefs.ui @@ -1,6 +1,6 @@ VncPrefs - + VncPrefs @@ -19,7 +19,7 @@ 0 - + groupBox @@ -30,7 +30,7 @@ unnamed - + cbUseEncryption @@ -44,7 +44,7 @@ Enable this option to encrypt the connection. Only newer servers support this option. Encrypting prevents others from eavesdropping, but can slow down the connection considerably. - + cbUseKWallet @@ -58,7 +58,7 @@ Enable this option to store your passwords with KWallet. - + connectionTypeLabel @@ -77,7 +77,7 @@ cmbQuality - + High Quality (LAN, direct connection) @@ -104,7 +104,7 @@ 0 - + 280 0 @@ -124,7 +124,7 @@ Expanding - + 84 16 @@ -133,7 +133,7 @@ - + cbShowPrefs @@ -160,6 +160,6 @@ setUseKWallet( bool b ) useKWallet() - - + + diff --git a/krdc/vnc/vncprefs.ui.h b/krdc/vnc/vncprefs.ui.h index a3438f05..e6cc9432 100644 --- a/krdc/vnc/vncprefs.ui.h +++ b/krdc/vnc/vncprefs.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/krdc/vnc/vnctypes.h b/krdc/vnc/vnctypes.h index fae12549..4dba9a5c 100644 --- a/krdc/vnc/vnctypes.h +++ b/krdc/vnc/vnctypes.h @@ -54,7 +54,7 @@ typedef struct { } AppData; -enum InitStatus { +enum InittqStatus { INIT_OK = 0, INIT_NAME_RESOLUTION_FAILURE = 1, INIT_PROTOCOL_FAILURE = 2, diff --git a/krdc/vnc/vncviewer.h b/krdc/vnc/vncviewer.h index 285357b9..4b1f6cb9 100644 --- a/krdc/vnc/vncviewer.h +++ b/krdc/vnc/vncviewer.h @@ -155,7 +155,7 @@ typedef struct { extern PointerImage pointerImages[]; extern int ConnectToRFBServer(const char *hostname, int port); -extern enum InitStatus InitialiseRFBConnection(void); +extern enum InittqStatus InitialiseRFBConnection(void); extern Bool SetFormatAndEncodings(void); extern Bool SendIncrementalFramebufferUpdateRequest(void); extern Bool SendFramebufferUpdateRequest(int x, int y, int w, int h, -- cgit v1.2.1