summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/scanlist.cpp
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp61
1 files changed, 32 insertions, 29 deletions
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 @@
27#endif 27#endif
28using namespace Opie::Core; 28
29using namespace Opie::Ui;
30using namespace Opie::Net;
31 29
@@ -40,2 +38,6 @@ using namespace Opie::Net;
40 38
39using namespace Opie::Core;
40using namespace Opie::Ui;
41using namespace Opie::Net;
42
41const int col_type = 0; 43const int col_type = 0;
@@ -53,2 +55,4 @@ const int col_location = 10;
53 55
56#define DEBUG
57
54MScanListView::MScanListView( QWidget* parent, const char* name ) 58MScanListView::MScanListView( QWidget* parent, const char* name )
@@ -178,3 +182,3 @@ void MScanListView::addNewItem( const QString& type,
178 { 182 {
179 s.sprintf( "(i) New network: ESSID '%s'", (const char*) essid ); 183 s = QString( "(i) New network: ESSID '%1'" ).arg( essid );
180 MLogWindow::logwindow()->log( s ); 184 MLogWindow::logwindow()->log( s );
@@ -197,3 +201,3 @@ void MScanListView::addNewItem( const QString& type,
197 { 201 {
198 s.sprintf( "(i) New Access Point in '%s' [%d]", (const char*) essid, channel ); 202 s = QString( "(i) New Access Point in '%1' [%2]" ).arg( essid ).arg( channel );
199 } 203 }
@@ -201,3 +205,3 @@ void MScanListView::addNewItem( const QString& type,
201 { 205 {
202 s.sprintf( "(i) New AdHoc station in '%s' [%d]", (const char*) essid, channel ); 206 s = QString( "(i) New AdHoc station in '%1' [%2]" ).arg( essid ).arg( channel );
203 } 207 }
@@ -236,3 +240,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress&
236 { 240 {
237 s.sprintf( "(i) New Station in '%s' [xx]", (const char*) network->text( col_essid ) ); 241 s = QString( "(i) New Station in '%1' [xx]" ).arg( network->text( col_essid ) );
238 } 242 }
@@ -240,3 +244,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress&
240 { 244 {
241 s.sprintf( "(i) New Wireless Station in '%s' [xx]", (const char*) network->text( col_essid ) ); 245 s = QString( "(i) New Wireless Station in '%1' [xx]" ).arg( network->text( col_essid ) );
242 } 246 }
@@ -248,5 +252,5 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to,
248{ 252{
249 odebug << "WDSTraffic: " << (const char*) viaFrom.toString() << " and " << viaTo.toString() << " seem to form a WDS" << oendl; 253 odebug << "WDSTraffic: " << viaFrom.toString() << " and " << viaTo.toString() << " seem to form a WDS" << oendl;
250 QString s; 254 QString s;
251 MScanListItem* network; 255// MScanListItem* network;
252 256
@@ -272,6 +276,6 @@ void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to,
272 276
273void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) 277void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& /*to*/, const OMacAddress& via )
274{ 278{
275 QString s; 279 QString s;
276 MScanListItem* network; 280// MScanListItem* network;
277 281
@@ -295,6 +299,6 @@ void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& to,
295 299
296void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) 300void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& /*to*/, const OMacAddress& via )
297{ 301{
298 QString s; 302 QString s;
299 MScanListItem* network; 303// MScanListItem* network;
300 304
@@ -317,3 +321,3 @@ void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& t
317 321
318void MScanListView::IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ) 322void MScanListView::IBSStraffic( const OMacAddress& /*from*/, const OMacAddress& /*to*/, const OMacAddress& /*via*/ )
319{ 323{
@@ -326,3 +330,3 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip )
326{ 330{
327 odebug << "identify " << (const char*) macaddr.toString() << " = " << ip << "" << oendl; 331 odebug << "identify " << macaddr.toString() << " = " << ip << "" << oendl;
328 332
@@ -338,4 +342,4 @@ void MScanListView::identify( const OMacAddress& macaddr, const QString& ip )
338 odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; 342 odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl;
339 MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled identification %s = %s!", 343 MLogWindow::logwindow()->log( QString( "WARNING: Unhandled identification %1 = %2!" )
340 (const char*) macaddr.toString(), (const char*) ip ) ); 344 .arg( macaddr.toString() ).arg( ip ) );
341} 345}
@@ -345,3 +349,3 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
345{ 349{
346 odebug << "addService '" << (const char*) name << "', Server = " << (const char*) macaddr.toString() << " = " << ip << "" << oendl; 350 odebug << "addService '" << name << "', Server = " << macaddr.toString() << " = " << ip << "" << oendl;
347 351
@@ -386,4 +390,4 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
386 odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; 390 odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl;
387 MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled service addition %s = %s!", 391 MLogWindow::logwindow()->log( QString("WARNING: Unhandled service addition %s = %s!")
388 (const char*) macaddr.toString(), (const char*) ip ) ); 392 .arg( macaddr.toString() ).arg( ip ) );
389} 393}
@@ -397,4 +401,4 @@ void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, in
397 401
398 odebug << "contextMenuRequested on item '" << (const char*) itm->text(0) << "' (" 402 odebug << "contextMenuRequested on item '" << itm->text(0) << "' ("
399 << (const char*) itm->type << ") in column: '" << col << "'" << oendl; 403 << itm->type << ") in column: '" << col << "'" << oendl;
400 404
@@ -402,3 +406,3 @@ void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, in
402 { 406 {
403 QString entry = QString().sprintf( "&Join %s Net '%s'...", (const char*) itm->type, (const char*) itm->essid() ); 407 QString entry = QString( "&Join %1 Net '%2'..." ).arg( itm->type ).arg( itm->essid() );
404 408
@@ -481,4 +485,3 @@ void MScanListItem::serializeFrom( QDataStream& s )
481 485
482 QString name; 486 QString name = QString( "wellenreiter/"+ _type );
483 name.sprintf( "wellenreiter/%s", (const char*) _type );
484 setPixmap( col_type, Resource::loadPixmap( name ) ); 487 setPixmap( col_type, Resource::loadPixmap( name ) );
@@ -492,4 +495,4 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr,
492 #ifdef DEBUG 495 #ifdef DEBUG
493 odebug << "decorating scanlist item " << (const char*) type << " / " 496 odebug << "decorating scanlist item " << type << " / "
494 << (const char*) essid << " / " << (const char*) macaddr 497 << essid << " / " << macaddr
495 << "[" << channel << "]" << oendl; 498 << "[" << channel << "]" << oendl;
@@ -499,3 +502,3 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr,
499 QString name; 502 QString name;
500 name.sprintf( "wellenreiter/%s", (const char*) type ); 503 name.sprintf( "wellenreiter/"+ type );
501 setPixmap( col_type, Resource::loadPixmap( name ) ); 504 setPixmap( col_type, Resource::loadPixmap( name ) );