author | ar <ar> | 2004-05-02 17:11:49 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-02 17:11:49 (UTC) |
commit | 18759e9156c96795831120408a9da0d3b4ec71a4 (patch) (side-by-side diff) | |
tree | bfc1a5560340b77a1918855e9915d133898ec189 | |
parent | 4d3379027557e251201b531896974a69ae4c665a (diff) | |
download | opie-18759e9156c96795831120408a9da0d3b4ec71a4.zip opie-18759e9156c96795831120408a9da0d3b4ec71a4.tar.gz opie-18759e9156c96795831120408a9da0d3b4ec71a4.tar.bz2 |
- convert qDebug to odebug
-rw-r--r-- | core/qws/qcopbridge.cpp | 18 | ||||
-rw-r--r-- | core/qws/transferserver.cpp | 82 |
2 files changed, 54 insertions, 46 deletions
diff --git a/core/qws/qcopbridge.cpp b/core/qws/qcopbridge.cpp index 4fd0807..822efb7 100644 --- a/core/qws/qcopbridge.cpp +++ b/core/qws/qcopbridge.cpp @@ -23,2 +23,3 @@ +/* OPIE */ #include <qpe/qcopenvelope_qws.h> @@ -26,3 +27,5 @@ #include <qpe/version.h> +#include <opie2/odebug.h> +/* QT */ #include <qtextstream.h> @@ -32,2 +35,3 @@ +/* STD */ #define _XOPEN_SOURCE @@ -52,3 +56,3 @@ QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent , if ( !ok() ) - qWarning( "Failed to bind to port %d", port ); + owarn << "Failed to bind to port " << port << "" << oendl; else { @@ -112,3 +116,3 @@ void QCopBridge::desktopMessage( const QCString &command, const QByteArray &args if ( paren <= 0 ) { - qDebug("DesktopMessage: bad qcop syntax"); + odebug << "DesktopMessage: bad qcop syntax" << oendl; return; @@ -118,3 +122,3 @@ void QCopBridge::desktopMessage( const QCString &command, const QByteArray &args if ( params[params.length()-1] != ')' ) { - qDebug("DesktopMessage: bad qcop syntax"); + odebug << "DesktopMessage: bad qcop syntax" << oendl; return; @@ -145,3 +149,3 @@ void QCopBridge::desktopMessage( const QCString &command, const QByteArray &args } else { - qDebug(" cannot route the argument type %s throught the qcop bridge", (*it).latin1() ); + odebug << " cannot route the argument type " << (*it) << " throught the qcop bridge" << oendl; return; @@ -237,3 +241,3 @@ void QCopBridgePI::connectionClosed() emit connectionClosed( this ); - // qDebug( "Debug: Connection closed" ); + // odebug << "Debug: Connection closed" << oendl; delete this; @@ -252,3 +256,3 @@ void QCopBridgePI::send( const QString& msg ) os << msg << endl; - //qDebug( "sending qcop message: %s", msg.latin1() ); + //odebug << "sending qcop message: " << msg << "" << oendl; } @@ -263,3 +267,3 @@ void QCopBridgePI::process( const QString& message ) { - //qDebug( "Command: %s", message.latin1() ); + //odebug << "Command: " << message << "" << oendl; diff --git a/core/qws/transferserver.cpp b/core/qws/transferserver.cpp index d0fec89..777c384 100644 --- a/core/qws/transferserver.cpp +++ b/core/qws/transferserver.cpp @@ -19,2 +19,6 @@ **********************************************************************/ + +/* OPIE */ +#include <opie2/odebug.h> + #define _XOPEN_SOURCE @@ -76,3 +80,3 @@ TransferServer::TransferServer( Q_UINT16 port, QObject *parent , if ( !ok() ) - qWarning( "Failed to bind to port %d", port ); + owarn << "Failed to bind to port " << port << "" << oendl; } @@ -319,3 +323,3 @@ void ServerPI::connectionClosed() { - // qDebug( "Debug: Connection closed" ); + // odebug << "Debug: Connection closed" << oendl; delete this; @@ -327,3 +331,3 @@ void ServerPI::send( const QString& msg ) os << msg << endl; - //qDebug( "Reply: %s", msg.latin1() ); + //odebug << "Reply: " << msg << "" << oendl; } @@ -368,3 +372,3 @@ void ServerPI::process( const QString& message ) { - //qDebug( "Command: %s", message.latin1() ); + //odebug << "Command: " << message << "" << oendl; @@ -393,3 +397,3 @@ void ServerPI::process( const QString& message ) - //qDebug( "args: %s", args.latin1() ); + //odebug << "args: " << args << "" << oendl; @@ -529,3 +533,3 @@ void ServerPI::process( const QString& message ) else { - qDebug("550 Requested action not taken"); + odebug << "550 Requested action not taken" << oendl; send( "550 Requested action not taken" ); @@ -635,3 +639,3 @@ void ServerPI::process( const QString& message ) if ( args.isEmpty() ) { - qDebug(" Error: no arg"); + odebug << " Error: no arg" << oendl; send( "500 Syntax error, command unrecognized" ); @@ -675,3 +679,3 @@ void ServerPI::process( const QString& message ) if ( !duproc.exec(in, out) ) { - qDebug("du process failed; just sending back 1K"); + odebug << "du process failed; just sending back 1K" << oendl; send( "213 1024"); @@ -683,3 +687,3 @@ void ServerPI::process( const QString& message ) guess *= 1000; - qDebug("sending back gzip guess of %d", guess); + odebug << "sending back gzip guess of " << guess << "" << oendl; send( "213 " + QString::number(guess) ); @@ -738,4 +742,4 @@ bool ServerPI::backupRestoreGzip( const QString &file, QStringList &targets ) targets = info.dirPath( TRUE ); - qDebug("ServerPI::backupRestoreGzip for %s = %s", file.latin1(), - targets.join(" ").latin1() ); + odebug << "ServerPI::backupRestoreGzip for " << file.latin1() << " = " + << targets.join(" ").latin1() << oendl; return true; @@ -986,3 +990,3 @@ void ServerPI::newConnection( int socket ) { - //qDebug( "New incomming connection" ); + //odebug << "New incomming connection" << oendl; @@ -1000,3 +1004,3 @@ void ServerPI::newConnection( int socket ) else if ( wait[RetrieveFile] ) { - qDebug("check retrieve file"); + odebug << "check retrieve file" << oendl; if ( backupRestoreGzip( waitfile ) ) @@ -1012,3 +1016,3 @@ void ServerPI::newConnection( int socket ) else if ( wait[RetrieveByteArray] ) { - qDebug("retrieve byte array"); + odebug << "retrieve byte array" << oendl; dtp->retrieveByteArray(); @@ -1077,3 +1081,3 @@ void ServerDTP::extractTarDone() { - qDebug("extract done"); + odebug << "extract done" << oendl; #ifndef QT_NO_COP @@ -1096,3 +1100,3 @@ void ServerDTP::connected() - //qDebug( "Debug: Sending file '%s'", file.name().latin1() ); + //odebug << "Debug: Sending file '" << file.name() << "'" << oendl; @@ -1118,3 +1122,3 @@ void ServerDTP::connected() // SHOULDN'T GET HERE, BUT DOING A SAFETY CHECK ANYWAY - qWarning("Previous tar --gzip process is still running; killing it..."); + owarn << "Previous tar --gzip process is still running; killing it..." << oendl; createTargzProc->kill(); @@ -1123,3 +1127,3 @@ void ServerDTP::connected() bytes_written = 0; - qDebug("==>start send tar process"); + odebug << "==>start send tar process" << oendl; if ( !createTargzProc->start(Opie::Core::OProcess::NotifyOnExit, Opie::Core::OProcess::Stdout) ) @@ -1136,3 +1140,3 @@ void ServerDTP::connected() - // qDebug( "Debug: Sending byte array" ); + // odebug << "Debug: Sending byte array" << oendl; bytes_written = 0; @@ -1155,6 +1159,6 @@ void ServerDTP::connected() } - // qDebug( "Debug: Retrieving file %s", file.name().latin1() ); + // odebug << "Debug: Retrieving file " << file.name() << "" << oendl; break; case RetrieveGzipFile: - qDebug("=-> starting tar process to receive .tgz file"); + odebug << "=-> starting tar process to receive .tgz file" << oendl; break; @@ -1167,6 +1171,6 @@ void ServerDTP::connected() } - // qDebug( "Debug: Retrieving byte array" ); + // odebug << "Debug: Retrieving byte array" << oendl; break; case Idle: - qDebug("connection established but mode set to Idle; BUG!"); + odebug << "connection established but mode set to Idle; BUG!" << oendl; break; @@ -1177,3 +1181,3 @@ void ServerDTP::connectionClosed() { - //qDebug( "Debug: Data connection closed %ld bytes written", bytes_written ); + //odebug << "Debug: Data connection closed " << bytes_written << " bytes written" << oendl; @@ -1202,3 +1206,3 @@ void ServerDTP::connectionClosed() else if ( RetrieveGzipFile == mode ) { - qDebug("Done writing ungzip file; closing input"); + odebug << "Done writing ungzip file; closing input" << oendl; gzipProc->flushStdin(); @@ -1224,3 +1228,3 @@ void ServerDTP::bytesWritten( int bytes ) if ( bytes_written == file.size() ) { - // qDebug( "Debug: Sending complete: %d bytes", file.size() ); + // odebug << "Debug: Sending complete: " << file.size() << " bytes" << oendl; file.close(); @@ -1241,3 +1245,3 @@ void ServerDTP::bytesWritten( int bytes ) if ( bytes_written == buf.size() ) { - // qDebug( "Debug: Sending complete: %d bytes", buf.size() ); + // odebug << "Debug: Sending complete: " << buf.size() << " bytes" << oendl; emit completed(); @@ -1265,3 +1269,3 @@ void ServerDTP::readyRead() gzipProc->writeStdin( s.data(), s.size() ); - qDebug("wrote %d bytes to ungzip ", s.size() ); + odebug << "wrote " << s.size() << " bytes to ungzip " << oendl; } @@ -1279,5 +1283,5 @@ void ServerDTP::writeTargzBlock(Opie::Core::OProcess *, char *buffer, int buflen writeBlock( buffer, buflen ); - qDebug("writeTargzBlock %d", buflen); + odebug << "writeTargzBlock " << buflen << "" << oendl; if ( !createTargzProc->isRunning() ) { - qDebug("tar and gzip done"); + odebug << "tar and gzip done" << oendl; emit completed(); @@ -1291,3 +1295,3 @@ void ServerDTP::targzDone() { - //qDebug("targz done"); + //odebug << "targz done" << oendl; disconnect( createTargzProc, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), @@ -1299,5 +1303,5 @@ void ServerDTP::gzipTarBlock(Opie::Core::OProcess *, char *buffer, int buflen) { - //qDebug("gzipTarBlock"); + //odebug << "gzipTarBlock" << oendl; if ( !gzipProc->isRunning() ) { - //qDebug("auto start gzip proc"); + //odebug << "auto start gzip proc" << oendl; gzipProc->start(Opie::Core::OProcess::NotifyOnExit, (Opie::Core::OProcess::Communication) ( Opie::Core::OProcess::Stdin | Opie::Core::OProcess::Stdout )); @@ -1337,3 +1341,3 @@ void ServerDTP::sendGzipFile( const QString &fn, args += archiveTargets; - qDebug("sendGzipFile %s", args.join(" ").latin1() ); + odebug << "sendGzipFile " << args.join(" ") << "" << oendl; createTargzProc->clearArguments( ); @@ -1351,3 +1355,3 @@ void ServerDTP::gunzipDone() { - qDebug("gunzipDone"); + odebug << "gunzipDone" << oendl; disconnect( gzipProc, SIGNAL( processExited() ), @@ -1361,7 +1365,7 @@ void ServerDTP::tarExtractBlock(Opie::Core::OProcess *, char *buffer, int buflen { - qDebug("tarExtractBlock"); + odebug << "tarExtractBlock" << oendl; if ( !retrieveTargzProc->isRunning() ) { - qDebug("auto start ungzip proc"); + odebug << "auto start ungzip proc" << oendl; if ( !retrieveTargzProc->start(Opie::Core::OProcess::NotifyOnExit, Opie::Core::OProcess::Stdin) ) - qWarning(" failed to start tar -x process"); + owarn << " failed to start tar -x process" << oendl; } @@ -1386,3 +1390,3 @@ void ServerDTP::retrieveGzipFile( const QString &fn ) { - qDebug("retrieveGzipFile %s", fn.latin1()); + odebug << "retrieveGzipFile " << fn << "" << oendl; file.setName( fn ); |