author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (side-by-side diff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/comm/keypebble | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-rw-r--r-- | noncore/comm/keypebble/config.in | 2 | ||||
-rw-r--r-- | noncore/comm/keypebble/keypebble.pro | 5 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbbuffer.cpp | 24 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbcanvas.cpp | 8 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbconnection.cpp | 31 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfbdecoder.cpp | 63 | ||||
-rw-r--r-- | noncore/comm/keypebble/krfblogin.cpp | 41 | ||||
-rw-r--r-- | noncore/comm/keypebble/kvncbookmarkdlg.cpp | 12 |
8 files changed, 110 insertions, 76 deletions
diff --git a/noncore/comm/keypebble/config.in b/noncore/comm/keypebble/config.in index 20384aa..8a800b9 100644 --- a/noncore/comm/keypebble/config.in +++ b/noncore/comm/keypebble/config.in @@ -3,2 +3,2 @@ default "y" - depends ( LIBQPE || LIBQPE-X11 ) + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE diff --git a/noncore/comm/keypebble/keypebble.pro b/noncore/comm/keypebble/keypebble.pro index 3515016..7631e4e 100644 --- a/noncore/comm/keypebble/keypebble.pro +++ b/noncore/comm/keypebble/keypebble.pro @@ -25,4 +25,3 @@ SOURCES = d3des.c \ main.cpp -INTERFACES = kvncconndlgbase.ui \ - kvncbookmarkdlgbase.ui +INTERFACES = kvncconndlgbase.ui kvncbookmarkdlgbase.ui @@ -30,3 +29,3 @@ INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 diff --git a/noncore/comm/keypebble/krfbbuffer.cpp b/noncore/comm/keypebble/krfbbuffer.cpp index 4cec0c2..4b29612 100644 --- a/noncore/comm/keypebble/krfbbuffer.cpp +++ b/noncore/comm/keypebble/krfbbuffer.cpp @@ -1,5 +1 @@ -#include <assert.h> -#include <qimage.h> -#include <qpainter.h> -#include <qapplication.h> #include "krfbdecoder.h" @@ -9,2 +5,14 @@ +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ +#include <qimage.h> +#include <qpainter.h> +#include <qapplication.h> + +/* STD */ +#include <assert.h> + // @@ -12,3 +20,3 @@ // -#ifndef KDE_USE_FINAL +#ifndef OPIE_NO_DEBUG const int endianTest = 1; @@ -41,3 +49,3 @@ void KRFBBuffer::resize( int w, int h ) { - qWarning( "Resizing buffer" ); + owarn << "Resizing buffer" << oendl; @@ -63,3 +71,3 @@ void KRFBBuffer::keyPressEvent( QKeyEvent *e ) { - qWarning( "Buffer got a key" ); + owarn << "Buffer got a key" << oendl; @@ -76,3 +84,3 @@ void KRFBBuffer::copyRect( int srcX, int srcY, { -// qWarning( "Got copy rect" ); +// owarn << "Got copy rect" << oendl; bitBlt( pix, destX, destY, pix, srcX, srcY, w, h, CopyROP ); diff --git a/noncore/comm/keypebble/krfbcanvas.cpp b/noncore/comm/keypebble/krfbcanvas.cpp index cd1fda0..b3525df 100644 --- a/noncore/comm/keypebble/krfbcanvas.cpp +++ b/noncore/comm/keypebble/krfbcanvas.cpp @@ -4,4 +4,8 @@ +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> +using namespace Opie::Core; +/* QT */ #include <qclipboard.h> @@ -44,3 +48,3 @@ void KRFBCanvas::openURL( const QUrl &url ) if ( loggedIn_ ) { - qWarning( "openURL invoked when logged in\n" ); + owarn << "openURL invoked when logged in\n" << oendl; return; @@ -76,3 +80,3 @@ void KRFBCanvas::loggedIn() { - qWarning( "Ok, we're logged in" ); + owarn << "Ok, we're logged in" << oendl; diff --git a/noncore/comm/keypebble/krfbconnection.cpp b/noncore/comm/keypebble/krfbconnection.cpp index b447046..33e0563 100644 --- a/noncore/comm/keypebble/krfbconnection.cpp +++ b/noncore/comm/keypebble/krfbconnection.cpp @@ -1,6 +1 @@ -#include <assert.h> -#include <qsocket.h> -#include <qtimer.h> -#include <string.h> - #include "krfbconnection.h" @@ -10,2 +5,14 @@ +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ +#include <qsocket.h> +#include <qtimer.h> + +/* STD */ +#include <assert.h> +#include <string.h> + KRFBConnection::KRFBConnection( QObject *parent ) @@ -45,3 +52,3 @@ void KRFBConnection::connectTo( KRFBServer server) - qWarning( "Connecting..." ); + owarn << "Connecting..." << oendl; @@ -53,3 +60,3 @@ void KRFBConnection::disconnect() { - qWarning( "Disconnecting from server" ); + owarn << "Disconnecting from server" << oendl; @@ -84,3 +91,3 @@ void KRFBConnection::gotSocketConnection() - qWarning( "Connected, logging in..." ); + owarn << "Connected, logging in..." << oendl; @@ -95,3 +102,3 @@ void KRFBConnection::gotRFBConnection() { - qWarning( "Logged into server" ); + owarn << "Logged into server" << oendl; @@ -124,3 +131,3 @@ void KRFBConnection::gotSocketError( int err ) // Do some error handling stuff - qWarning( "KRFBConnection: Socket error %d", err ); + owarn << "KRFBConnection: Socket error " << err << "" << oendl; @@ -174,3 +181,3 @@ void KRFBConnection::waitForData( unsigned int sz ) if ( sock->size() >= sz ) { - // qWarning( "No need to wait for data" ); + // owarn << "No need to wait for data" << oendl; emit gotEnoughData(); @@ -178,3 +185,3 @@ void KRFBConnection::waitForData( unsigned int sz ) else { - // qWarning( "Waiting for %u bytes", sz ); + // owarn << "Waiting for " << sz << " bytes" << oendl; minData_ = sz; diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp index db95154..69457e2 100644 --- a/noncore/comm/keypebble/krfbdecoder.cpp +++ b/noncore/comm/keypebble/krfbdecoder.cpp @@ -5,5 +5,10 @@ +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; +/* QT */ #include <qpixmap.h> +/* STD */ #include <assert.h> @@ -13,3 +18,3 @@ // -#ifndef KDE_USE_FINAL +#ifndef OPIE_NO_DEBUG const int endianTest = 1; @@ -137,3 +142,3 @@ void KRFBDecoder::sendClientInit() // Wait for server init - qWarning( "Waiting for server init" ); + owarn << "Waiting for server init" << oendl; @@ -149,3 +154,3 @@ void KRFBDecoder::gotServerInit() { - qWarning( "Got server init" ); + owarn << "Got server init" << oendl; disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotServerInit() ) ); @@ -183,3 +188,3 @@ void KRFBDecoder::gotServerInit() - qWarning( "Width = %d, Height = %d", info->width, info->height ); + owarn << "Width = " << info->width << ", Height = " << info->height << "" << oendl; qWarning( "Bpp = %d, Depth = %d, Big = %d, True = %d", @@ -194,3 +199,3 @@ void KRFBDecoder::gotServerInit() // Wait for desktop name - qWarning( "Waiting for desktop name" ); + owarn << "Waiting for desktop name" << oendl; @@ -209,3 +214,3 @@ void KRFBDecoder::gotDesktopName() - qWarning( "Got desktop name" ); + owarn << "Got desktop name" << oendl; @@ -221,3 +226,3 @@ void KRFBDecoder::gotDesktopName() - qWarning( "Desktop: %s", info->name.latin1() ); + owarn << "Desktop: " << info->name.latin1() << "" << oendl; @@ -373,3 +378,3 @@ void KRFBDecoder::gotUpdateHeader() - // qWarning( "Got update header" ); + // owarn << "Got update header" << oendl; @@ -408,3 +413,3 @@ void KRFBDecoder::gotUpdateHeader() - // qWarning( "Expecting %d rects", noRects ); + // owarn << "Expecting " << noRects << " rects" << oendl; @@ -420,3 +425,3 @@ void KRFBDecoder::gotRectHeader() - // qWarning( "Got rect header" ); + // owarn << "Got rect header" << oendl; @@ -448,3 +453,3 @@ void KRFBDecoder::gotRectHeader() if ( encoding == RawEncoding ) { - // qWarning( "Raw encoding" ); + // owarn << "Raw encoding" << oendl; handleRawRect(); @@ -452,3 +457,3 @@ void KRFBDecoder::gotRectHeader() else if ( encoding == CopyRectEncoding ) { -// qWarning( "CopyRect encoding" ); +// owarn << "CopyRect encoding" << oendl; handleCopyRect(); @@ -456,3 +461,3 @@ void KRFBDecoder::gotRectHeader() else if ( encoding == RreEncoding ) { - qWarning( "RRE encoding" ); + owarn << "RRE encoding" << oendl; handleRRERect(); @@ -460,3 +465,3 @@ void KRFBDecoder::gotRectHeader() else if ( encoding == CorreEncoding ) { - qWarning( "CoRRE encoding" ); + owarn << "CoRRE encoding" << oendl; handleCoRRERect(); @@ -464,3 +469,3 @@ void KRFBDecoder::gotRectHeader() else if ( encoding == HexTileEncoding ) { - qWarning( "HexTile encoding" ); + owarn << "HexTile encoding" << oendl; handleHexTileRect(); @@ -472,3 +477,3 @@ void KRFBDecoder::gotRectHeader() currentState = Error; - qWarning( "Unknown encoding, %d", msg ); + owarn << "Unknown encoding, " << msg << "" << oendl; emit error( protocolError ); @@ -488,3 +493,3 @@ void KRFBDecoder::handleRawRect() - // qWarning( "Handling a raw rect chunk" ); + // owarn << "Handling a raw rect chunk" << oendl; @@ -511,3 +516,3 @@ void KRFBDecoder::getRawRectChunk( int lines ) // Wait for server init - // qWarning( "Waiting for raw rect chunk, %ld", count ); + // owarn << "Waiting for raw rect chunk, " << count << "" << oendl; @@ -525,3 +530,3 @@ void KRFBDecoder::gotRawRectChunk() - // qWarning( "Got raw rect chunk" ); + // owarn << "Got raw rect chunk" << oendl; @@ -548,3 +553,3 @@ void KRFBDecoder::gotRawRectChunk() - // qWarning( "There are %d rects left", noRects ); + // owarn << "There are " << noRects << " rects left" << oendl; @@ -592,3 +597,3 @@ void KRFBDecoder::gotCopyRectPos() - // qWarning( "There are %d rects left", noRects ); + // owarn << "There are " << noRects << " rects left" << oendl; @@ -605,3 +610,3 @@ void KRFBDecoder::handleRRERect() { - qWarning( "RRE not implemented" ); + owarn << "RRE not implemented" << oendl; } @@ -610,3 +615,3 @@ void KRFBDecoder::handleCoRRERect() { - qWarning( "CoRRE not implemented" ); + owarn << "CoRRE not implemented" << oendl; } @@ -615,3 +620,3 @@ void KRFBDecoder::handleHexTileRect() { - qWarning( "HexTile not implemented" ); + owarn << "HexTile not implemented" << oendl; } @@ -675,3 +680,3 @@ void KRFBDecoder::gotServerCut() { - qWarning( "Got server cut" ); + owarn << "Got server cut" << oendl; @@ -723,3 +728,3 @@ void KRFBDecoder::gotServerCutText() * from within keypebble's mass of signals and slots - qWarning( "Server cut: %s", cutbuf ); + owarn << "Server cut: " << cutbuf << "" << oendl; @@ -740,3 +745,3 @@ void KRFBDecoder::gotServerCutText() else { - qWarning( "Async handled in weird state" ); + owarn << "Async handled in weird state" << oendl; currentState = oldState; @@ -747,3 +752,3 @@ void KRFBDecoder::gotBell() { - qWarning( "Got server bell" ); + owarn << "Got server bell" << oendl; buf->soundBell(); @@ -760,3 +765,3 @@ void KRFBDecoder::gotBell() else { - qWarning( "Async handled in weird state" ); + owarn << "Async handled in weird state" << oendl; currentState = oldState; diff --git a/noncore/comm/keypebble/krfblogin.cpp b/noncore/comm/keypebble/krfblogin.cpp index 2bbd110..92005d2 100644 --- a/noncore/comm/keypebble/krfblogin.cpp +++ b/noncore/comm/keypebble/krfblogin.cpp @@ -1,4 +1,13 @@ -#include <assert.h> +#include "krfblogin.h" +#include "krfbconnection.h" +/* OPIE */ +#include <opie2/odebug.h> +using namespace Opie::Core; + +/* QT */ +#include <qtimer.h> +/* STD */ +#include <assert.h> extern "C" { @@ -7,6 +16,2 @@ extern "C" { -#include "krfblogin.h" -#include "krfbconnection.h" -#include <qtimer.h> - // The length of the various messages (used to decide how many bytes to @@ -54,3 +59,3 @@ KRFBLogin::KRFBLogin( KRFBConnection *con ) - qWarning( "Waiting for server version..." ); + owarn << "Waiting for server version..." << oendl; @@ -76,3 +81,3 @@ void KRFBLogin::gotServerVersion() { - qWarning( "Got server version" ); + owarn << "Got server version" << oendl; @@ -94,3 +99,3 @@ void KRFBLogin::gotServerVersion() - qWarning( msg ); + owarn << msg << oendl; emit error( msg ); @@ -108,3 +113,3 @@ void KRFBLogin::gotServerVersion() - qWarning("Server Version: %03d.%03d", serverMajor, serverMinor ); + owarn << "Server Version: " << serverMajor << "." << serverMinor << "" << oendl; @@ -114,3 +119,3 @@ void KRFBLogin::gotServerVersion() - qWarning( msg ); + owarn << msg << oendl; emit error( msg ); @@ -121,3 +126,3 @@ void KRFBLogin::gotServerVersion() if ( serverMinor != 3 ) { - qWarning( "Minor version mismatch: %d", serverMinor ); + owarn << "Minor version mismatch: " << serverMinor << "" << oendl; } @@ -145,3 +150,3 @@ void KRFBLogin::gotAuthScheme() case 0: - qWarning( "Failed" ); + owarn << "Failed" << oendl; // Handle failure @@ -161,3 +166,3 @@ void KRFBLogin::gotAuthScheme() default: - qWarning( "Unknown authentication scheme, 0x%08lx", scheme ); + owarn << "Unknown authentication scheme, 0x" << scheme << "" << oendl; currentState = Error; @@ -183,3 +188,3 @@ void KRFBLogin::getPassword() if ( con->options_->password.isNull() ) { - qWarning( "krfblogin needs a password" ); + owarn << "krfblogin needs a password" << oendl; emit passwordRequired( con ); @@ -218,3 +223,3 @@ void KRFBLogin::gotAuthResult() - qWarning( "Authentication Result is 0x%08lx", result ); + owarn << "Authentication Result is 0x" << result << "" << oendl; @@ -234,3 +239,3 @@ void KRFBLogin::gotAuthResult() case AuthFailed: - qWarning( "Dammit" ); + owarn << "Dammit" << oendl; emit status( statusMsgFailed ); @@ -243,3 +248,3 @@ void KRFBLogin::gotAuthResult() default: - qWarning( "Invalid authentication result, %lx", result ); + owarn << "Invalid authentication result, " << result << "" << oendl; break; @@ -250,3 +255,3 @@ void KRFBLogin::sendClientVersion() { - qWarning( "Sending client version" ); + owarn << "Sending client version" << oendl; con->write( (void*)"RFB 003.003\n", ClientVersionLength ); diff --git a/noncore/comm/keypebble/kvncbookmarkdlg.cpp b/noncore/comm/keypebble/kvncbookmarkdlg.cpp index ef2fa12..149c398 100644 --- a/noncore/comm/keypebble/kvncbookmarkdlg.cpp +++ b/noncore/comm/keypebble/kvncbookmarkdlg.cpp @@ -1 +1,9 @@ +#include "kvncbookmarkdlg.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/global.h> +using namespace Opie::Core; + +/* QT */ #include <qdir.h> @@ -3,4 +11,2 @@ #include <qlistbox.h> -#include <qpe/global.h> -#include "kvncbookmarkdlg.h" @@ -177,3 +183,3 @@ void KVNCBookmarkDlg::writeBookmarks(void) for ( server=servers.first(); server != 0; server=servers.next() ) { - qDebug(server->name); + odebug << server->name << oendl; t << "server=" << server->name << '\n'; |