summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui
authormickeyl <mickeyl>2004-04-04 13:54:40 (UTC)
committer mickeyl <mickeyl>2004-04-04 13:54:40 (UTC)
commit16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (side-by-side diff)
tree0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/net/wellenreiter/gui
parent8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff)
downloadopie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip
opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz
opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/net/wellenreiter/gui') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp30
-rw-r--r--noncore/net/wellenreiter/gui/gps.cpp12
-rw-r--r--noncore/net/wellenreiter/gui/logwindow.cpp8
-rw-r--r--noncore/net/wellenreiter/gui/main.cpp15
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp57
-rw-r--r--noncore/net/wellenreiter/gui/packetview.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/resource.cpp4
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp77
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp74
9 files changed, 140 insertions, 139 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index da39113..bfdb20a 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -25,3 +25,5 @@
#include <opie2/odevice.h>
-using namespace Opie;
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+using namespace Opie::Net;
#endif
@@ -42,11 +44,5 @@ using namespace Opie;
-/* POSIX */
+/* STD */
#include <assert.h>
-using namespace Opie::Core;
-using namespace Opie::Net;
-using namespace Opie::Core;
-using namespace Opie::Net;
-using namespace Opie::Core;
-using namespace Opie::Net;
WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0;
@@ -118,3 +114,3 @@ void WellenreiterConfigWindow::performAutodetection()
- qDebug( "WellenreiterConfigWindow::performAutodetection()" );
+ odebug << "WellenreiterConfigWindow::performAutodetection()" << oendl;
@@ -139,3 +135,3 @@ void WellenreiterConfigWindow::performAutodetection()
_guess = devicetype;
- qDebug( "Wellenreiter: guessed device type to be #%d", devicetype );
+ odebug << "Wellenreiter: guessed device type to be #" << devicetype << "" << oendl;
}
@@ -243,3 +239,3 @@ void WellenreiterConfigWindow::getCaptureFileNameClicked()
QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true);
- qDebug( "name = %s", (const char*) name );
+ odebug << "name = " << (const char*) name << "" << oendl;
if ( !name.isEmpty() )
@@ -318,3 +314,3 @@ void WellenreiterConfigWindow::performAction( const QString& type,
{
- qWarning( "WellenreiterConfigWindow::performAction(): unknown type '%s'", (const char*) type );
+ owarn << "WellenreiterConfigWindow::performAction(): unknown type '" << (const char*) type << "'" << oendl;
return;
@@ -322,3 +318,3 @@ void WellenreiterConfigWindow::performAction( const QString& type,
- qDebug( "for event '%s' I'm going to perform action %d (script='%s')", (const char*) type, action, (const char*) script );
+ odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << (const char*) script << "')" << oendl;
@@ -347,5 +343,5 @@ void WellenreiterConfigWindow::performAction( const QString& type,
- qDebug( "going to call script '%s'", (const char*) script );
+ odebug << "going to call script '" << (const char*) script << "'" << oendl;
::system( script );
- qDebug( "script returned." );
+ odebug << "script returned." << oendl;
return;
@@ -363,3 +359,3 @@ void WellenreiterConfigWindow::load()
#else
- qDebug( "loading configuration settings..." );
+ odebug << "loading configuration settings..." << oendl;
@@ -441,3 +437,3 @@ void WellenreiterConfigWindow::save()
#else
- qDebug( "saving configuration settings..." );
+ odebug << "saving configuration settings..." << oendl;
diff --git a/noncore/net/wellenreiter/gui/gps.cpp b/noncore/net/wellenreiter/gui/gps.cpp
index a47b4ec..bd91e35 100644
--- a/noncore/net/wellenreiter/gui/gps.cpp
+++ b/noncore/net/wellenreiter/gui/gps.cpp
@@ -17,2 +17,6 @@
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
/* QT */
@@ -27,3 +31,3 @@ GPS::GPS( QObject* parent, const char * name )
{
- qDebug( "GPS::GPS()" );
+ odebug << "GPS::GPS()" << oendl;
_socket = new QSocket( this, "gpsd commsock" );
@@ -34,3 +38,3 @@ GPS::~GPS()
{
- qDebug( "GPS::~GPS()" );
+ odebug << "GPS::~GPS()" << oendl;
}
@@ -55,3 +59,3 @@ GpsLocation GPS::position() const
int numAvail = _socket->bytesAvailable();
- qDebug( "GPS write succeeded, %d bytes available for reading...", numAvail );
+ odebug << "GPS write succeeded, " << numAvail << " bytes available for reading..." << oendl;
if ( numAvail )
@@ -63,3 +67,3 @@ GpsLocation GPS::position() const
{
- qDebug( "GPS read %d bytes succeeded, invalid response: '%s'", numRead, &buf[0] );
+ odebug << "GPS read " << numRead << " bytes succeeded, invalid response: '" << &buf[0] << "'" << oendl;
return GpsLocation( -111, -111 );
diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp
index 1c72cf4..714a9a9 100644
--- a/noncore/net/wellenreiter/gui/logwindow.cpp
+++ b/noncore/net/wellenreiter/gui/logwindow.cpp
@@ -16,2 +16,8 @@
#include "logwindow.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qmultilineedit.h>
@@ -40,3 +46,3 @@ void MLogWindow::log( QString text )
ledit->insertAt( line, col, row );
- qDebug( line );
+ odebug << line << oendl;
}
diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp
index 6bbc39b..62db967 100644
--- a/noncore/net/wellenreiter/gui/main.cpp
+++ b/noncore/net/wellenreiter/gui/main.cpp
@@ -16,3 +16,5 @@
#include "mainwindow.h"
+
#ifdef QWS
+#include <opie2/odebug.h>
#include <opie2/oapplication.h>
@@ -23,2 +25,3 @@
+/* QT */
#include <qmessagebox.h>
@@ -26,2 +29,3 @@
+/* STD */
#include <errno.h>
@@ -32,4 +36,3 @@
using namespace Opie::Core;
-using namespace Opie::Core;
-using namespace Opie::Core;
+
int main( int argc, char **argv )
@@ -57,6 +60,6 @@ int main( int argc, char **argv )
{
- qDebug( "Wellenreiter::main() parsing argument %d = '%s'", i, argv[i] );
+ odebug << "Wellenreiter::main() parsing argument " << i << " = '" << argv[i] << "'" << oendl;
if ( !strcmp( "-nocheck", argv[i] ) )
{
- qDebug( "-nocheck found" );
+ odebug << "-nocheck found" << oendl;
check = false;
@@ -71,3 +74,3 @@ int main( int argc, char **argv )
{
- qWarning( QObject::tr( "Wellenreiter: trying to run as non-root!" ) );
+ owarn << QObject::tr( "Wellenreiter: trying to run as non-root!" ) << oendl;
result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", QObject::tr( "You have started Wellenreiter II\n"
@@ -88,3 +91,3 @@ int main( int argc, char **argv )
if ( -1 == ::kill( dhcpid, SIGTERM ) )
- qWarning( "Wellenreiter: can't kill process #%d (%s)", result, strerror( errno ) );
+ owarn << "Wellenreiter: can't kill process #" << result << " (" << strerror( errno ) << ")" << oendl;
else
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
index 7add6cd..a4b8839 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.cpp
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -23,2 +23,17 @@
+/* OPIE */
+#ifdef QWS
+#include <qpe/resource.h>
+#include <opie2/odebug.h>
+#include <opie2/ofiledialog.h>
+#else
+#include "resource.h"
+#include <qapplication.h>
+#include <qfiledialog.h>
+#endif
+using namespace Opie::Core;
+using namespace Opie::Net;
+using namespace Opie::Ui;
+
+/* QT */
#include <qcombobox.h>
@@ -41,19 +56,5 @@
-#ifdef QWS
-#include <qpe/resource.h>
-#include <opie2/ofiledialog.h>
-using namespace Opie;
-#else
-#include "resource.h"
-#include <qapplication.h>
-#include <qfiledialog.h>
-#endif
-
+/* STD */
#include <unistd.h>
-using namespace Opie::Ui;
-using namespace Opie::Net;
-using namespace Opie::Ui;
-using namespace Opie::Net;
-using namespace Opie::Net;
WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f )
@@ -190,3 +191,3 @@ void WellenreiterMainWindow::showConfigure()
{
- qDebug( "show configure..." );
+ odebug << "show configure..." << oendl;
cw->setCaption( tr( "Configure" ) );
@@ -233,3 +234,3 @@ WellenreiterMainWindow::~WellenreiterMainWindow()
{
- qDebug( "Wellenreiter: bye." );
+ odebug << "Wellenreiter: bye." << oendl;
};
@@ -253,3 +254,3 @@ void WellenreiterMainWindow::demoReadFromGps()
GPS* gps = new GPS( this );
- qDebug( "Wellenreiter::demoReadFromGps(): url=gps://%s:%d/", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() );
+ odebug << "Wellenreiter::demoReadFromGps(): url=gps://" << (const char*) configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "/" << oendl;
gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() );
@@ -307,3 +308,3 @@ void WellenreiterMainWindow::fileSaveLog()
f.close();
- qDebug( "Saved log to file '%s'", (const char*) fname );
+ odebug << "Saved log to file '" << (const char*) fname << "'" << oendl;
}
@@ -311,3 +312,3 @@ void WellenreiterMainWindow::fileSaveLog()
{
- qDebug( "Problem saving log to file '%s'", (const char*) fname );
+ odebug << "Problem saving log to file '" << (const char*) fname << "'" << oendl;
}
@@ -328,3 +329,3 @@ void WellenreiterMainWindow::fileSaveSession()
f.close();
- qDebug( "Saved session to file '%s'", (const char*) fname );
+ odebug << "Saved session to file '" << (const char*) fname << "'" << oendl;
}
@@ -332,3 +333,3 @@ void WellenreiterMainWindow::fileSaveSession()
{
- qDebug( "Problem saving session to file '%s'", (const char*) fname );
+ odebug << "Problem saving session to file '" << (const char*) fname << "'" << oendl;
}
@@ -350,3 +351,3 @@ void WellenreiterMainWindow::fileSaveHex()
f.close();
- qDebug( "Saved hex log to file '%s'", (const char*) fname );
+ odebug << "Saved hex log to file '" << (const char*) fname << "'" << oendl;
}
@@ -354,3 +355,3 @@ void WellenreiterMainWindow::fileSaveHex()
{
- qDebug( "Problem saving hex log to file '%s'", (const char*) fname );
+ odebug << "Problem saving hex log to file '" << (const char*) fname << "'" << oendl;
}
@@ -371,3 +372,3 @@ void WellenreiterMainWindow::fileLoadSession()
f.close();
- qDebug( "Loaded session from file '%s'", (const char*) fname );
+ odebug << "Loaded session from file '" << (const char*) fname << "'" << oendl;
}
@@ -375,3 +376,3 @@ void WellenreiterMainWindow::fileLoadSession()
{
- qDebug( "Problem loading session from file '%s'", (const char*) fname );
+ odebug << "Problem loading session from file '" << (const char*) fname << "'" << oendl;
}
@@ -440,3 +441,3 @@ void WellenreiterMainWindow::uploadSession()
{
- qDebug( "Session upload cancelled :(" );
+ odebug << "Session upload cancelled :(" << oendl;
return;
@@ -444,3 +445,3 @@ void WellenreiterMainWindow::uploadSession()
- qDebug( "Starting upload..." );
+ odebug << "Starting upload..." << oendl;
diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp
index 3d3aa18..4df01da 100644
--- a/noncore/net/wellenreiter/gui/packetview.cpp
+++ b/noncore/net/wellenreiter/gui/packetview.cpp
@@ -86,3 +86,3 @@ void PacketView::showPacket( int number )
{
- qDebug( "D'oh! No packet!" );
+ odebug << "D'oh! No packet!" << oendl;
}
diff --git a/noncore/net/wellenreiter/gui/resource.cpp b/noncore/net/wellenreiter/gui/resource.cpp
index d98ef0b..cb17f51 100644
--- a/noncore/net/wellenreiter/gui/resource.cpp
+++ b/noncore/net/wellenreiter/gui/resource.cpp
@@ -31,3 +31,3 @@ QPixmap loadPixmap( const QString& pix )
{
- qDebug( "Wellenreiter::Resource: can't find pixmap " + filename );
+ odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl;
}
@@ -43,3 +43,3 @@ QIconSet loadIconSet( const QString& pix )
{
- qDebug( "Wellenreiter::Resource: can't find pixmap " + filename );
+ odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl;
}
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index 3b7120a..a2be782 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -19,13 +19,6 @@
-#include <assert.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qpopupmenu.h>
-#include <qcheckbox.h>
-
+/* OPIE */
#ifdef QWS
+#include <opie2/odebug.h>
#include <qpe/qpeapplication.h>
-#endif
-
-#ifdef QWS
#include <qpe/resource.h>
@@ -34,2 +27,14 @@
#endif
+using namespace Opie::Core;
+using namespace Opie::Ui;
+using namespace Opie::Net;
+
+/* QT */
+#include <qcursor.h>
+#include <qdatetime.h>
+#include <qpopupmenu.h>
+#include <qcheckbox.h>
+
+/* STD */
+#include <assert.h>
@@ -48,8 +53,2 @@ const int col_location = 10;
-using namespace Opie::Net;
-using namespace Opie::Ui;
-using namespace Opie::Net;
-using namespace Opie::Ui;
-using namespace Opie::Ui;
-using namespace Opie::Net;
MScanListView::MScanListView( QWidget* parent, const char* name )
@@ -108,3 +107,3 @@ void MScanListView::serializeTo( QDataStream& s) const
{
- qDebug( "serializing MScanListView" );
+ odebug << "serializing MScanListView" << oendl;
OListView::serializeTo( s );
@@ -115,3 +114,3 @@ void MScanListView::serializeFrom( QDataStream& s)
{
- qDebug( "serializing MScanListView" );
+ odebug << "serializing MScanListView" << oendl;
OListView::serializeFrom( s );
@@ -145,3 +144,3 @@ void MScanListView::addNewItem( const QString& type,
#ifdef DEBUG
- qDebug( "itemtext: %s", (const char*) item->text( col_essid ) );
+ odebug << "itemtext: " << (const char*) item->text( col_essid ) << "" << oendl;
#endif
@@ -161,3 +160,3 @@ void MScanListView::addNewItem( const QString& type,
#ifdef DEBUG
- qDebug( "subitemtext: %s", (const char*) item->text( col_ap ) );
+ odebug << "subitemtext: " << (const char*) item->text( col_ap ) << "" << oendl;
#endif
@@ -170,3 +169,3 @@ void MScanListView::addNewItem( const QString& type,
#ifdef DEBUG
- qDebug( "%s is a dupe - ignoring...", (const char*) macaddr );
+ odebug << "" << (const char*) macaddr << " is a dupe - ignoring..." << oendl;
#endif
@@ -188,3 +187,3 @@ void MScanListView::addNewItem( const QString& type,
#ifdef DEBUG
- qDebug( "inserting new station %s", (const char*) macaddr );
+ odebug << "inserting new station " << (const char*) macaddr << "" << oendl;
#endif
@@ -214,3 +213,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress&
#ifdef DEBUG
- qDebug( "subitemtext: %s", (const char*) subitem->text( col_ap ) );
+ odebug << "subitemtext: " << (const char*) subitem->text( col_ap ) << "" << oendl;
#endif
@@ -223,3 +222,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress&
#ifdef DEBUG
- qDebug( "%s is a dupe - ignoring...", (const char*) addr.toString(true) );
+ odebug << "" << (const char*) addr.toString(true) << " is a dupe - ignoring..." << oendl;
#endif
@@ -248,3 +247,3 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to,
{
- qDebug( "WDSTraffic: %s and %s seem to form a WDS", (const char*) viaFrom.toString(), (const char*) viaTo.toString() );
+ odebug << "WDSTraffic: " << (const char*) viaFrom.toString() << " and " << (const char*) viaTo.toString() << " seem to form a WDS" << oendl;
QString s;
@@ -266,3 +265,3 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to,
{
- qDebug( "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" );
+ odebug << "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" << oendl;
MLogWindow::logwindow()->log( "WARNING: Unhandled WSD traffic!" );
@@ -288,3 +287,3 @@ void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to,
{
- qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" );
+ odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl;
MLogWindow::logwindow()->log( "WARNING: Unhandled toDS traffic!" );
@@ -311,3 +310,3 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t
{
- qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" );
+ odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl;
MLogWindow::logwindow()->log( "WARNING: Unhandled fromDS traffic!" );
@@ -319,3 +318,3 @@ void MScanListView::IBSStraffic( const OMacAddress& from, const OMacAddress& to,
{
- qWarning( "D'oh! Not yet implemented..." );
+ owarn << "D'oh! Not yet implemented..." << oendl;
MLogWindow::logwindow()->log( "WARNING: Unhandled IBSS traffic!" );
@@ -326,3 +325,3 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip )
{
- qDebug( "identify %s = %s", (const char*) macaddr.toString(), (const char*) ip );
+ odebug << "identify " << (const char*) macaddr.toString() << " = " << (const char*) ip << "" << oendl;
@@ -337,3 +336,3 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip )
}
- qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" );
+ odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl;
MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled identification %s = %s!",
@@ -345,3 +344,3 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
{
- qDebug( "addService '%s', Server = %s = %s", (const char*) name, (const char*) macaddr.toString(), (const char*) ip );
+ odebug << "addService '" << (const char*) name << "', Server = " << (const char*) macaddr.toString() << " = " << (const char*) ip << "" << oendl;
@@ -362,3 +361,3 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
#ifdef DEBUG
- qDebug( "subitemtext: %s", (const char*) subitem->text( col_essid ) );
+ odebug << "subitemtext: " << (const char*) subitem->text( col_essid ) << "" << oendl;
#endif
@@ -371,3 +370,3 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
#ifdef DEBUG
- qDebug( "%s is a dupe - ignoring...", (const char*) name );
+ odebug << "" << (const char*) name << " is a dupe - ignoring..." << oendl;
#endif
@@ -385,3 +384,3 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
}
- qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" );
+ odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl;
MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled service addition %s = %s!",
@@ -423,3 +422,3 @@ MScanListItem::MScanListItem( QListView* parent, const QString& type, const QStr
#ifdef DEBUG
- qDebug( "creating scanlist item" );
+ odebug << "creating scanlist item" << oendl;
#endif
@@ -437,3 +436,3 @@ MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const
#ifdef DEBUG
- qDebug( "creating scanlist item" );
+ odebug << "creating scanlist item" << oendl;
#endif
@@ -461,3 +460,3 @@ void MScanListItem::serializeTo( QDataStream& s ) const
#ifdef DEBUG
- qDebug( "serializing MScanListItem" );
+ odebug << "serializing MScanListItem" << oendl;
#endif
@@ -472,3 +471,3 @@ void MScanListItem::serializeFrom( QDataStream& s )
#ifdef DEBUG
- qDebug( "serializing MScanListItem" );
+ odebug << "serializing MScanListItem" << oendl;
#endif
@@ -558,3 +557,3 @@ void MScanListItem::receivedBeacon()
#ifdef DEBUG
- qDebug( "MScanListItem %s: received beacon #%d", (const char*) _macaddr, _beacons );
+ odebug << "MScanListItem " << (const char*) _macaddr << ": received beacon #" << _beacons << "" << oendl;
#endif
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index fff7c35..fad6efd 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -13,4 +13,2 @@
-// Local
-
#include "gps.h"
@@ -25,6 +23,6 @@
-// Opie
-
+/* OPIE */
#ifdef QWS
#include <opie2/oapplication.h>
+#include <opie2/odebug.h>
#include <opie2/odevice.h>
@@ -37,6 +35,7 @@
#include <qpe/qcopenvelope_qws.h>
-using namespace Opie;
-
-// Qt
+using namespace Opie::Core;
+using namespace Opie::Net;
+using namespace Opie::Ui;
+/* QT */
#include <qcheckbox.h>
@@ -54,4 +53,3 @@ using namespace Opie;
-// Standard
-
+/* STD */
#include <assert.h>
@@ -63,8 +61,2 @@ using namespace Opie;
-using namespace Opie::Core;
-using namespace Opie::Net;
-using namespace Opie::Net;
-using namespace Opie::Core;
-using namespace Opie::Net;
-using namespace Opie::Core;
Wellenreiter::Wellenreiter( QWidget* parent )
@@ -108,3 +100,3 @@ void Wellenreiter::initialTimer()
{
- qDebug( "Wellenreiter::preloading manufacturer database..." );
+ odebug << "Wellenreiter::preloading manufacturer database..." << oendl;
OManufacturerDB::instance();
@@ -151,3 +143,3 @@ void Wellenreiter::handleNotification( OPacket* p )
QString action = configwindow->parsePackets->protocolAction( name );
- qDebug( "parsePacket-action for '%s' seems to be '%s'", (const char*) name, (const char*) action );
+ odebug << "parsePacket-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl;
doAction( action, name, p );
@@ -156,3 +148,3 @@ void Wellenreiter::handleNotification( OPacket* p )
{
- qDebug( "protocol '%s' not checked in parsePackets.", (const char*) name );
+ odebug << "protocol '" << (const char*) name << "' not checked in parsePackets." << oendl;
}
@@ -168,3 +160,3 @@ void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket*
else if ( manage->managementType() == "ProbeResponse" ) handleManagementFrameProbeResponse( p, manage );
- else qWarning( "Wellenreiter::handleManagementFrame(): '%s' - please handle me!", (const char*) manage->managementType() );
+ else owarn << "Wellenreiter::handleManagementFrame(): '" << (const char*) manage->managementType() << "' - please handle me!" << oendl;
}
@@ -184,5 +176,5 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage
// TODO: add check if GPS is working!?
- qDebug( "Wellenreiter::gathering GPS data..." );
+ odebug << "Wellenreiter::gathering GPS data..." << oendl;
loc = gps->position();
- qDebug( "Wellenreiter::GPS data received is ( %f , %f ) - dms string = '%s'", loc.latitude(), loc.longitude(), loc.dmsPosition().latin1() );
+ odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl;
}
@@ -191,3 +183,3 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage
netView()->addNewItem( "adhoc", essid, header->macAddress2(), false /* should check FrameControl field */, -1, 0, loc, true /* only probed */ );
- qDebug( "Wellenreiter::invalid frame [possibly noise] detected!" );
+ odebug << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl;
}
@@ -213,3 +205,3 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa
{
- qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" );
+ owarn << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl;
return;
@@ -228,5 +220,5 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa
// TODO: add check if GPS is working!?
- qDebug( "Wellenreiter::gathering GPS data..." );
+ odebug << "Wellenreiter::gathering GPS data..." << oendl;
loc = gps->position();
- qDebug( "Wellenreiter::GPS data received is ( %f , %f ) - dms string = '%s'", loc.latitude(), loc.longitude(), loc.dmsPosition().latin1() );
+ odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl;
}
@@ -257,3 +249,3 @@ void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* contro
{
- qDebug( "Wellenreiter::handleControlFrame - please handle %s in a future version! :D", (const char*) control->controlType() );
+ odebug << "Wellenreiter::handleControlFrame - please handle " << (const char*) control->controlType() << " in a future version! :D" << oendl;
}
@@ -306,3 +298,3 @@ void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source,
{
- qDebug( "Received ARP traffic (type '%s'): ", (const char*) arp->type() );
+ odebug << "Received ARP traffic (type '" << (const char*) arp->type() << "'): " << oendl;
if ( arp->type() == "REQUEST" )
@@ -327,6 +319,6 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
{
- qDebug( "Received DHCP '%s' packet", (const char*) dhcp->type() );
+ odebug << "Received DHCP '" << (const char*) dhcp->type() << "' packet" << oendl;
if ( dhcp->type() == "OFFER" )
{
- qDebug( "DHCP: '%s' ('%s') seems to be a DHCP server.", (const char*) source.toString(), (const char*) dhcp->serverAddress().toString() );
+ odebug << "DHCP: '" << (const char*) source.toString() << "' ('" << (const char*) dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl;
netView()->identify( source, dhcp->serverAddress().toString() );
@@ -336,3 +328,3 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
{
- qDebug( "DHCP: '%s' ('%s') accepted the offered DHCP address.", (const char*) dhcp->clientMacAddress().toString(), (const char*) dhcp->yourAddress().toString() );
+ odebug << "DHCP: '" << (const char*) dhcp->clientMacAddress().toString() << "' ('" << (const char*) dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl;
netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() );
@@ -370,3 +362,3 @@ bool Wellenreiter::checkDumpPacket( OPacket* p )
QString action = configwindow->capturePackets->protocolAction( name );
- qDebug( "capturePackets-action for '%s' seems to be '%s'", (const char*) name, (const char*) action );
+ odebug << "capturePackets-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl;
if ( action == "Discard" )
@@ -379,3 +371,3 @@ bool Wellenreiter::checkDumpPacket( OPacket* p )
{
- qDebug( "protocol '%s' not checked in capturePackets.", (const char*) name );
+ odebug << "protocol '" << (const char*) name << "' not checked in capturePackets." << oendl;
}
@@ -553,3 +545,3 @@ void Wellenreiter::startClicked()
case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break;
- case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break;
+ case DEVTYPE_FILE: odebug << "Wellenreiter: Capturing from file '" << (const char*) interface << "'" << oendl; break;
default: assert( 0 ); // shouldn't reach this
@@ -574,3 +566,3 @@ void Wellenreiter::startClicked()
{
- qDebug( "Wellenreiter:GPS enabled @ %s:%d", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() );
+ odebug << "Wellenreiter:GPS enabled @ " << (const char*) configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "" << oendl;
gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() );
@@ -598,3 +590,3 @@ void Wellenreiter::startClicked()
- qDebug( "Wellenreiter:: dumping to %s", (const char*) dumpname );
+ odebug << "Wellenreiter:: dumping to " << (const char*) dumpname << "" << oendl;
pcap->openDumpFile( dumpname );
@@ -654,3 +646,3 @@ void Wellenreiter::timerEvent( QTimerEvent* )
{
- qDebug( "Wellenreiter::timerEvent()" );
+ odebug << "Wellenreiter::timerEvent()" << oendl;
OPacket* p = pcap->next();
@@ -717,11 +709,11 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch
int count = 3;
- qDebug("sending %d messages",count);
+ odebug << "sending " << count << " messages" << oendl;
msg << QString("count") << QString::number(count);
- qDebug("msg >%s< Mode >%s<", iface->name(),type.latin1() );
+ odebug << "msg >" << iface->name() << "< Mode >" << type.latin1() << "<" << oendl;
msg << QString(iface->name()) << QString("Mode") << type;
- qDebug("msg >%s< essid >%s<", iface->name(),essid.latin1());
+ odebug << "msg >" << iface->name() << "< essid >" << essid.latin1() << "<" << oendl;
msg << QString(iface->name()) << QString("ESSID") << essid;
- qDebug("msg >%s< channel >%d<", iface->name(),channel);
+ odebug << "msg >" << iface->name() << "< channel >" << channel << "<" << oendl;
msg << QString(iface->name()) << QString("Channel") << channel;
-// qDebug("msg >%s< mac >%s<", iface->name(),macaddr);
+// odebug << "msg >" << iface->name() << "< mac >" << macaddr << "<" << oendl;
// msg << QString(iface->name()) << QString("MacAddr") << macaddr;