summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-08-24 11:53:43 (UTC)
committer mickeyl <mickeyl>2004-08-24 11:53:43 (UTC)
commitb06390cb17114692a9fd5233d77620b385252480 (patch) (side-by-side diff)
tree91de2ed5b0eb6ed739eb6bd0126e2ad004d6a9bd
parent94611edc1942717faa15861adef25418e40ea626 (diff)
downloadopie-b06390cb17114692a9fd5233d77620b385252480.zip
opie-b06390cb17114692a9fd5233d77620b385252480.tar.gz
opie-b06390cb17114692a9fd5233d77620b385252480.tar.bz2
apply megapatch courtesy Holger 'Zecke' Freyther:
- bump version to 1.0.3-cvs - fix compile warnings - fix PacketViewer not to scroll, when watching in "real time" - fix appending text to log view - update statistics when tab is getting activated
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp16
-rw-r--r--noncore/net/wellenreiter/gui/graphwindow.cpp34
-rw-r--r--noncore/net/wellenreiter/gui/graphwindow.h26
-rw-r--r--noncore/net/wellenreiter/gui/logwindow.cpp12
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp9
-rw-r--r--noncore/net/wellenreiter/gui/packetview.cpp16
-rw-r--r--noncore/net/wellenreiter/gui/protolistview.cpp10
-rw-r--r--noncore/net/wellenreiter/gui/resource.cpp8
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp61
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp70
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h5
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.cpp2
-rw-r--r--noncore/net/wellenreiter/opie-wellenreiter.control2
-rw-r--r--noncore/net/wellenreiter/wellenreiter.pro1
14 files changed, 154 insertions, 118 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index ae149e2..1670f93 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -18,2 +18,3 @@
#include "mainwindow.h"
+#include "protolistview.h"
@@ -186,3 +187,6 @@ bool WellenreiterConfigWindow::isChannelChecked( int channel ) const
case 14: return channel14->isOn();
+ default: return false;
}
+
+
}
@@ -219,3 +223,3 @@ void WellenreiterConfigWindow::synchronizeActionsAndScripts()
-void WellenreiterConfigWindow::changedNetworkAction(int t)
+void WellenreiterConfigWindow::changedNetworkAction(int )
{
@@ -225,3 +229,3 @@ void WellenreiterConfigWindow::changedNetworkAction(int t)
-void WellenreiterConfigWindow::changedClientAction(int t)
+void WellenreiterConfigWindow::changedClientAction(int )
{
@@ -231,3 +235,3 @@ void WellenreiterConfigWindow::changedClientAction(int t)
-void WellenreiterConfigWindow::changedStationAction(int t)
+void WellenreiterConfigWindow::changedStationAction(int )
{
@@ -282,3 +286,2 @@ int WellenreiterConfigWindow::gpsPort() const
{
- bool ok;
return useGPS() ? gpsdPort->value() : -1;
@@ -292,3 +295,3 @@ void WellenreiterConfigWindow::performAction( const QString& type,
int channel,
- int signal
+ int /* signal */
/* , const GpsLocation& loc */ )
@@ -319,3 +322,3 @@ void WellenreiterConfigWindow::performAction( const QString& type,
- odebug << "for event '" << (const char*) type << "' I'm going to perform action " << action << " (script='" << script << "')" << oendl;
+ odebug << "for event '" << type << "' I'm going to perform action " << action << " (script='" << script << "')" << oendl;
@@ -406,2 +409,3 @@ void WellenreiterConfigWindow::load()
getCaptureFileName->setEnabled( writeCaptureFile->isChecked() );
+ parsePackets->setEnabled( writeCaptureFile->isChecked() );
captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) );
diff --git a/noncore/net/wellenreiter/gui/graphwindow.cpp b/noncore/net/wellenreiter/gui/graphwindow.cpp
index b4174d3..d53421c 100644
--- a/noncore/net/wellenreiter/gui/graphwindow.cpp
+++ b/noncore/net/wellenreiter/gui/graphwindow.cpp
@@ -21,2 +21,29 @@
+/* XPM */
+static char * background[] = {
+"16 16 6 1",
+" c None",
+". c #52676E",
+"+ c #3F545B",
+"@ c #394E56",
+"# c #2F454C",
+"$ c #364B52",
+".+++++++++++++++",
+"@###############",
+"+$$$$$$$$$$$$$$$",
+"@###############",
+"+$$$$$$$$$$$$$$$",
+"@###############",
+"+$$$$$$$$$$$$$$$",
+"@###############",
+"+$$$$$$$$$$$$$$$",
+"@###############",
+"+$$$$$$$$$$$$$$$",
+"@###############",
+"+$$$$$$$$$$$$$$$",
+"@###############",
+"+$$$$$$$$$$$$$$$",
+"@###############"};
+
+
MFrequencySpectrum::MFrequencySpectrum( int channels, QWidget* parent, const char* name, WFlags f)
@@ -87,3 +114,3 @@ void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int heig
-void MFrequencySpectrum::paintEvent( QPaintEvent* e )
+void MFrequencySpectrum::paintEvent( QPaintEvent* )
{
@@ -120,3 +147,2 @@ void MFrequencySpectrum::mousePressEvent( QMouseEvent* e )
int y = size().height() - 2 * ymargin;
- int x = 0;
int width = ( size().width() - 2 * xmargin ) / _channels;
@@ -144,4 +170,2 @@ void Legende::drawContents( QPainter* p )
int xmargin = 5;
- int ymargin = 2;
- int x = 0;
int width = ( contentsRect().width() - 2 * xmargin ) / _channels;
@@ -172,3 +196,3 @@ void MGraphWindow::testGraph()
-void MGraphWindow::timerEvent( QTimerEvent* e )
+void MGraphWindow::timerEvent( QTimerEvent* )
{
diff --git a/noncore/net/wellenreiter/gui/graphwindow.h b/noncore/net/wellenreiter/gui/graphwindow.h
index fafcab1..392d85b 100644
--- a/noncore/net/wellenreiter/gui/graphwindow.h
+++ b/noncore/net/wellenreiter/gui/graphwindow.h
@@ -92,28 +92,2 @@ class MGraphWindow : public QVBox
-/* XPM */
-static char * background[] = {
-"16 16 6 1",
-" c None",
-". c #52676E",
-"+ c #3F545B",
-"@ c #394E56",
-"# c #2F454C",
-"$ c #364B52",
-".+++++++++++++++",
-"@###############",
-"+$$$$$$$$$$$$$$$",
-"@###############",
-"+$$$$$$$$$$$$$$$",
-"@###############",
-"+$$$$$$$$$$$$$$$",
-"@###############",
-"+$$$$$$$$$$$$$$$",
-"@###############",
-"+$$$$$$$$$$$$$$$",
-"@###############",
-"+$$$$$$$$$$$$$$$",
-"@###############",
-"+$$$$$$$$$$$$$$$",
-"@###############"};
-
diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp
index 714a9a9..a83f700 100644
--- a/noncore/net/wellenreiter/gui/logwindow.cpp
+++ b/noncore/net/wellenreiter/gui/logwindow.cpp
@@ -32,2 +32,4 @@ MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f )
ledit->setReadOnly( true );
+ ledit->setUndoEnabled( false );
+
@@ -40,9 +42,5 @@ void MLogWindow::log( QString text )
QTime time = QTime::currentTime();
- QString line;
- line.sprintf( "[%s] %s\n", (const char*) time.toString(), (const char*) text );
- int col;
- int row;
- ledit->getCursorPosition( &col, &row );
- ledit->insertAt( line, col, row );
- odebug << line << oendl;
+ QString line = QString( "[%1] %2\n" ).arg(time.toString() ).arg( text );
+ ledit->insertLine( line );
+ odebug << line << oendl;
}
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
index ef7ffcf..3e18531 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.cpp
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -33,5 +33,2 @@
#endif
-using namespace Opie::Core;
-using namespace Opie::Net;
-using namespace Opie::Ui;
@@ -59,2 +56,6 @@ using namespace Opie::Ui;
+using namespace Opie::Core;
+using namespace Opie::Net;
+using namespace Opie::Ui;
+
WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f )
@@ -470,3 +471,3 @@ void WellenreiterMainWindow::uploadSession()
- int content_length = f.size();
+// int content_length = f.size();
diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp
index 69438fa..d71111f 100644
--- a/noncore/net/wellenreiter/gui/packetview.cpp
+++ b/noncore/net/wellenreiter/gui/packetview.cpp
@@ -73,2 +73,9 @@ void PacketView::add( const OPacket* p, int size )
{
+ /*
+ * don't scroll away when somebody views packages
+ * while scanning
+ */
+ int value = _number->value();
+ bool last = (value == static_cast<int>( _packets.count() ) );
+
odebug << "PacketView::add() size = " << size << oendl;
@@ -80,6 +87,10 @@ void PacketView::add( const OPacket* p, int size )
{ // limited buffer, limit = size
- while ( _packets.count() >= size )
+ while ( _packets.count() >= static_cast<uint>( size ) )
{
_packets.removeFirst();
+ --value;
}
+
+ /* check if we lost our packet */
+ last = ( value < 1 );
_packets.append( p );
@@ -89,3 +100,3 @@ void PacketView::add( const OPacket* p, int size )
_number->setMaxValue( _packets.count() );
- _number->setValue( _packets.count() );
+ _number->setValue( last ? _packets.count() : value );
}
@@ -141,2 +152,3 @@ const QString PacketView::getLog() const
{
+ return QString::null;
}
diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp
index 635e174..1e3d195 100644
--- a/noncore/net/wellenreiter/gui/protolistview.cpp
+++ b/noncore/net/wellenreiter/gui/protolistview.cpp
@@ -74,3 +74,3 @@ void ProtocolListView::addProtocol( const QString& name )
QHBox* hbox = new QHBox( vbox );
- new QCheckBox( name, hbox, (const char*) name );
+ new QCheckBox( name, hbox, name.local8Bit() );
@@ -78,3 +78,3 @@ void ProtocolListView::addProtocol( const QString& name )
{
- QComboBox* combo = new QComboBox( hbox, (const char*) name );
+ QComboBox* combo = new QComboBox( hbox, name.local8Bit() );
#ifdef QWS
@@ -94,3 +94,3 @@ void ProtocolListView::addProtocol( const QString& name )
{
- QComboBox* combo = new QComboBox( hbox, (const char*) name );
+ QComboBox* combo = new QComboBox( hbox, name.local8Bit() );
#ifdef QWS
@@ -106,3 +106,3 @@ bool ProtocolListView::isProtocolChecked( const QString& name )
{
- QCheckBox* box = (QCheckBox*) child( (const char*) name );
+ QCheckBox* box = (QCheckBox*) child( name.local8Bit() );
return ( box && box->isOn() );
@@ -113,3 +113,3 @@ QString ProtocolListView::protocolAction( const QString& name )
{
- QComboBox* combo = (QComboBox*) child( (const char*) name, "QComboBox" );
+ QComboBox* combo = (QComboBox*) child( name.local8Bit(), "QComboBox" );
if ( combo )
diff --git a/noncore/net/wellenreiter/gui/resource.cpp b/noncore/net/wellenreiter/gui/resource.cpp
index cb17f51..13096f2 100644
--- a/noncore/net/wellenreiter/gui/resource.cpp
+++ b/noncore/net/wellenreiter/gui/resource.cpp
@@ -27,3 +27,3 @@ QPixmap loadPixmap( const QString& pix )
QString filename;
- filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix );
+ filename.sprintf( "%s/%s.png", PIXMAPPATH, pix.local8Bit() );
QPixmap pixmap( filename );
@@ -31,3 +31,3 @@ QPixmap loadPixmap( const QString& pix )
{
- odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl;
+ odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl;
}
@@ -39,3 +39,3 @@ QIconSet loadIconSet( const QString& pix )
QString filename;
- filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix );
+ filename.sprintf( "%s/%s.png", PIXMAPPATH, pix.local8Bit() );
QPixmap pixmap( filename );
@@ -43,3 +43,3 @@ QIconSet loadIconSet( const QString& pix )
{
- odebug << "Wellenreiter::Resource: can't find pixmap " + filename << oendl;
+ 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 9e907d8..fa1d724 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -27,5 +27,3 @@
#endif
-using namespace Opie::Core;
-using namespace Opie::Ui;
-using namespace Opie::Net;
+
@@ -40,2 +38,6 @@ using namespace Opie::Net;
+using namespace Opie::Core;
+using namespace Opie::Ui;
+using namespace Opie::Net;
+
const int col_type = 0;
@@ -53,2 +55,4 @@ const int col_location = 10;
+#define DEBUG
+
MScanListView::MScanListView( QWidget* parent, const char* name )
@@ -178,3 +182,3 @@ void MScanListView::addNewItem( const QString& type,
{
- s.sprintf( "(i) New network: ESSID '%s'", (const char*) essid );
+ s = QString( "(i) New network: ESSID '%1'" ).arg( essid );
MLogWindow::logwindow()->log( s );
@@ -197,3 +201,3 @@ void MScanListView::addNewItem( const QString& type,
{
- s.sprintf( "(i) New Access Point in '%s' [%d]", (const char*) essid, channel );
+ s = QString( "(i) New Access Point in '%1' [%2]" ).arg( essid ).arg( channel );
}
@@ -201,3 +205,3 @@ void MScanListView::addNewItem( const QString& type,
{
- s.sprintf( "(i) New AdHoc station in '%s' [%d]", (const char*) essid, channel );
+ s = QString( "(i) New AdHoc station in '%1' [%2]" ).arg( essid ).arg( channel );
}
@@ -236,3 +240,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress&
{
- s.sprintf( "(i) New Station in '%s' [xx]", (const char*) network->text( col_essid ) );
+ s = QString( "(i) New Station in '%1' [xx]" ).arg( network->text( col_essid ) );
}
@@ -240,3 +244,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress&
{
- s.sprintf( "(i) New Wireless Station in '%s' [xx]", (const char*) network->text( col_essid ) );
+ s = QString( "(i) New Wireless Station in '%1' [xx]" ).arg( network->text( col_essid ) );
}
@@ -248,5 +252,5 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to,
{
- odebug << "WDSTraffic: " << (const char*) viaFrom.toString() << " and " << viaTo.toString() << " seem to form a WDS" << oendl;
+ odebug << "WDSTraffic: " << viaFrom.toString() << " and " << viaTo.toString() << " seem to form a WDS" << oendl;
QString s;
- MScanListItem* network;
+// MScanListItem* network;
@@ -272,6 +276,6 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to,
-void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via )
+void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& /*to*/, const OMacAddress& via )
{
QString s;
- MScanListItem* network;
+// MScanListItem* network;
@@ -295,6 +299,6 @@ void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to,
-void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via )
+void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& /*to*/, const OMacAddress& via )
{
QString s;
- MScanListItem* network;
+// MScanListItem* network;
@@ -317,3 +321,3 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t
-void MScanListView::IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via )
+void MScanListView::IBSStraffic( const OMacAddress& /*from*/, const OMacAddress& /*to*/, const OMacAddress& /*via*/ )
{
@@ -326,3 +330,3 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip )
{
- odebug << "identify " << (const char*) macaddr.toString() << " = " << ip << "" << oendl;
+ odebug << "identify " << macaddr.toString() << " = " << ip << "" << oendl;
@@ -338,4 +342,4 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip )
odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl;
- MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled identification %s = %s!",
- (const char*) macaddr.toString(), (const char*) ip ) );
+ MLogWindow::logwindow()->log( QString( "WARNING: Unhandled identification %1 = %2!" )
+ .arg( macaddr.toString() ).arg( ip ) );
}
@@ -345,3 +349,3 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
{
- odebug << "addService '" << (const char*) name << "', Server = " << (const char*) macaddr.toString() << " = " << ip << "" << oendl;
+ odebug << "addService '" << name << "', Server = " << macaddr.toString() << " = " << ip << "" << oendl;
@@ -386,4 +390,4 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
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!",
- (const char*) macaddr.toString(), (const char*) ip ) );
+ MLogWindow::logwindow()->log( QString("WARNING: Unhandled service addition %s = %s!")
+ .arg( macaddr.toString() ).arg( ip ) );
}
@@ -397,4 +401,4 @@ void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, in
- odebug << "contextMenuRequested on item '" << (const char*) itm->text(0) << "' ("
- << (const char*) itm->type << ") in column: '" << col << "'" << oendl;
+ odebug << "contextMenuRequested on item '" << itm->text(0) << "' ("
+ << itm->type << ") in column: '" << col << "'" << oendl;
@@ -402,3 +406,3 @@ void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, in
{
- QString entry = QString().sprintf( "&Join %s Net '%s'...", (const char*) itm->type, (const char*) itm->essid() );
+ QString entry = QString( "&Join %1 Net '%2'..." ).arg( itm->type ).arg( itm->essid() );
@@ -481,4 +485,3 @@ void MScanListItem::serializeFrom( QDataStream& s )
- QString name;
- name.sprintf( "wellenreiter/%s", (const char*) _type );
+ QString name = QString( "wellenreiter/"+ _type );
setPixmap( col_type, Resource::loadPixmap( name ) );
@@ -492,4 +495,4 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr,
#ifdef DEBUG
- odebug << "decorating scanlist item " << (const char*) type << " / "
- << (const char*) essid << " / " << (const char*) macaddr
+ odebug << "decorating scanlist item " << type << " / "
+ << essid << " / " << macaddr
<< "[" << channel << "]" << oendl;
@@ -499,3 +502,3 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr,
QString name;
- name.sprintf( "wellenreiter/%s", (const char*) type );
+ name.sprintf( "wellenreiter/"+ type );
setPixmap( col_type, Resource::loadPixmap( name ) );
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index e801ce7..df8e9c3 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -35,5 +35,2 @@
#include <qpe/qcopenvelope_qws.h>
-using namespace Opie::Core;
-using namespace Opie::Net;
-using namespace Opie::Ui;
@@ -62,2 +59,7 @@ using namespace Opie::Ui;
+
+using namespace Opie::Core;
+using namespace Opie::Net;
+using namespace Opie::Ui;
+
Wellenreiter* Wellenreiter::instance = 0;
@@ -76,4 +78,3 @@ Wellenreiter::Wellenreiter( QWidget* parent )
#ifdef QWS
- QString sys;
- sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() );
+ QString sys = QString( "(i) Running on '%1'.").arg( ODevice::inst()->systemString() );
_system = ODevice::inst()->system();
@@ -112,2 +113,3 @@ void Wellenreiter::signalHandler( int sig )
{
+ Q_UNUSED( sig )
oerr << "Aye! Received SIGSEGV or SIGBUS! Trying to exit gracefully..." << oendl;
@@ -178,3 +180,3 @@ void Wellenreiter::handleNotification( OPacket* p )
QString action = configwindow->parsePackets->protocolAction( name );
- odebug << "parsePacket-action for '" << (const char*) name << "' seems to be '" << action << "'" << oendl;
+ odebug << "parsePacket-action for '" << name << "' seems to be '" << action << "'" << oendl;
doAction( action, name, p );
@@ -199,3 +201,3 @@ void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket*
-void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManagementPacket* request )
+void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManagementPacket* /* request */ )
{
@@ -203,4 +205,4 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage
QString essid = ssid ? ssid->ID( true /* decloak */ ) : QString("<unknown>");
- OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) );
- int channel = ds ? ds->channel() : -1;
+// OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) );
+// int channel = ds ? ds->channel() : -1;
OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) );
@@ -222,3 +224,3 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage
-void Wellenreiter::handleManagementFrameProbeResponse( OPacket* p, OWaveLanManagementPacket* response )
+void Wellenreiter::handleManagementFrameProbeResponse( OPacket* /* p */, OWaveLanManagementPacket* /* response */ )
{
@@ -227,3 +229,3 @@ void Wellenreiter::handleManagementFrameProbeResponse( OPacket* p, OWaveLanManag
-void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPacket* beacon )
+void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPacket* beacon )
{
@@ -289,3 +291,3 @@ void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* contro
-void Wellenreiter::handleWlanData( OPacket* p, OWaveLanDataPacket* data, OMacAddress& from, OMacAddress& to )
+void Wellenreiter::handleWlanData( OPacket* p, OWaveLanDataPacket* /* data */ , OMacAddress& from, OMacAddress& to )
{
@@ -319,3 +321,3 @@ void Wellenreiter::handleWlanData( OPacket* p, OWaveLanDataPacket* data, OMacAdd
-void Wellenreiter::handleEthernetData( OPacket* p, OEthernetPacket* data, OMacAddress& from, OMacAddress& to )
+void Wellenreiter::handleEthernetData( OPacket* /* p */, OEthernetPacket* data, OMacAddress& from, OMacAddress& to )
{
@@ -328,3 +330,3 @@ void Wellenreiter::handleEthernetData( OPacket* p, OEthernetPacket* data, OMacAd
-void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source, OMacAddress& dest )
+void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& /* source */, OMacAddress& /* dest */ )
{
@@ -347,3 +349,3 @@ void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source,
-void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, OMacAddress& dest )
+void Wellenreiter::handleIPData( OPacket* p, OIPPacket* /* ip */, OMacAddress& source, OMacAddress& /* dest */ )
{
@@ -357,3 +359,3 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
{
- odebug << "DHCP: '" << (const char*) source.toString() << "' ('" << dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl;
+ odebug << "DHCP: '" << source.toString() << "' ('" << dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl;
netView()->identify( source, dhcp->serverAddress().toString() );
@@ -363,3 +365,3 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
{
- odebug << "DHCP: '" << (const char*) dhcp->clientMacAddress().toString() << "' ('" << dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl;
+ odebug << "DHCP: '" << dhcp->clientMacAddress().toString() << "' ('" << dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl;
netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() );
@@ -397,6 +399,6 @@ bool Wellenreiter::checkDumpPacket( OPacket* p )
QString action = configwindow->capturePackets->protocolAction( name );
- odebug << "capturePackets-action for '" << (const char*) name << "' seems to be '" << action << "'" << oendl;
+ odebug << "capturePackets-action for '" << name << "' seems to be '" << action << "'" << oendl;
if ( action == "Discard" )
{
- logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) );
+ logwindow->log( QString("(i) dump-discarding of '%1' packet requested." ).arg( name ) );
return false;
@@ -522,5 +524,3 @@ void Wellenreiter::stopClicked()
- // print out statistics
- for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it )
- statwindow->updateCounter( it.key(), it.data() );
+ updateStatistics();
}
@@ -534,3 +534,3 @@ void Wellenreiter::startClicked()
const int cardtype = configwindow->driverType();
- const int interval = configwindow->hoppingInterval();
+// const int interval = configwindow->hoppingInterval();
@@ -706,3 +706,3 @@ void Wellenreiter::timerEvent( QTimerEvent* )
-void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* p )
+void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* /* p */ )
{
@@ -720,6 +720,6 @@ void Wellenreiter::doAction( const QString& action, const QString& protocol, OPa
else if ( action == "LogMessage" )
- logwindow->log( QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) );
+ logwindow->log( QString(tr("Got packet with protocol '%1'","Protocol Name" ) ).arg( protocol ) );
else if ( action == "MessageBox" )
QMessageBox::information( this, "Notification!",
- QString().sprintf( "Got packet with protocol '%s'", (const char*) protocol ) );
+ QString(tr( "Got packet with protocol '%1'", "Protocol Name" ) ).arg( protocol ) );
#else
@@ -744,5 +744,5 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch
- odebug << "joinNetwork() with Interface " << (const char*) iface->name()
- << ": " << (const char*) type << ", " << (const char*) essid
- << ", " << channel << ", " << (const char*) macaddr << oendl;
+ odebug << "joinNetwork() with Interface " << iface->name()
+ << ": " << type << ", " << essid
+ << ", " << channel << ", " << macaddr << oendl;
@@ -766 +766,13 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch
+void Wellenreiter::updateStatistics()
+{
+ // print out statistics
+ for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it )
+ statwindow->updateCounter( it.key(), it.data() );
+}
+
+void Wellenreiter::slotTabChanged( QWidget* wid )
+{
+ if ( wid == statwindow )
+ updateStatistics();
+}
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index f582a5f..5ac389e 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -95,3 +95,8 @@ class Wellenreiter : public WellenreiterBase {
+ private slots:
+ void slotTabChanged( QWidget* );
+
private:
+ void updateStatistics();
+
#ifdef QWS
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
index a29d520..0ca0bd7 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
@@ -160,2 +160,4 @@ WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags f
+ connect(TabWidget, SIGNAL(currentChanged(QWidget*)),
+ this, SLOT(slotTabChanged(QWidget*)));
}
diff --git a/noncore/net/wellenreiter/opie-wellenreiter.control b/noncore/net/wellenreiter/opie-wellenreiter.control
index cbc287a..e7bc25d 100644
--- a/noncore/net/wellenreiter/opie-wellenreiter.control
+++ b/noncore/net/wellenreiter/opie-wellenreiter.control
@@ -6,3 +6,3 @@ Maintainer: Michael 'Mickey' Lauer <mickeyl@handhelds.org>
Architecture: arm
-Version: 1.0.3
+Version: 1.0.3-cvs
Depends: libqpe1, libpcap0 (>=0.7.2), libopiecore2, libopienet2, libopieui2
diff --git a/noncore/net/wellenreiter/wellenreiter.pro b/noncore/net/wellenreiter/wellenreiter.pro
index eb60c4a..53b762a 100644
--- a/noncore/net/wellenreiter/wellenreiter.pro
+++ b/noncore/net/wellenreiter/wellenreiter.pro
@@ -1,2 +1,3 @@
TEMPLATE = subdirs
+VERSION = 1.0.3-cvs