Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index c605111..9e8aa72 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp @@ -116,34 +116,35 @@ void MScanListView::serializeFrom( QDataStream& s) OListView::serializeFrom( s ); } void MScanListView::addNewItem( const QString& type, const QString& essid, const OMacAddress& mac, bool wep, int channel, int signal, const GpsLocation& loc, bool probe ) { QString macaddr = mac.toString(true); #ifdef DEBUG - qDebug( "MScanList::addNewItem( %s / %s / %s [%d]", (const char*) type, - (const char*) essid, (const char*) macaddr, channel ); + odebug << "MScanList::addNewItem( " << (const char*) type << " / " + << (const char*) essid << " / " << (const char*) macaddr + << " [" << channel << "]" << oendl; #endif // search, if we already have seen this net QString s; MScanListItem* network; MScanListItem* item = static_cast<MScanListItem*> ( firstChild() ); while ( item && ( item->text( col_essid ) != essid ) ) { #ifdef DEBUG odebug << "itemtext: " << item->text( col_essid ) << "" << oendl; #endif item = static_cast<MScanListItem*> ( item->nextSibling() ); } if ( item ) @@ -381,34 +382,34 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr, return; } } 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 ) ); } void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, int col ) { if ( !item ) return; MScanListItem* itm = static_cast<MScanListItem*>( item ); - qDebug( "contextMenuRequested on item '%s' (%s) in column: '%d'", - (const char*) itm->text(0), (const char*) itm->type, col ); + odebug << "contextMenuRequested on item '" << (const char*) itm->text(0) << "' (" + << (const char*) itm->type << ") in column: '" << col << "'" << oendl; if ( itm->type == "adhoc" || itm->type == "managed" ) { QString entry = QString().sprintf( "&Join %s Net '%s'...", (const char*) itm->type, (const char*) itm->essid() ); QPopupMenu m( this ); m.insertItem( entry, 37773, 0 ); int result = m.exec( QCursor::pos() ); if ( result == 37773 ) emit joinNetwork( itm->type, itm->essid(), itm->channel(), itm->macaddr() ); } } //============================================================ // MScanListItem //============================================================ @@ -476,37 +477,35 @@ void MScanListItem::serializeFrom( QDataStream& s ) Q_UINT8 wep; s >> _type; s >> wep; _wep = (wep == 'y'); QString name; name.sprintf( "wellenreiter/%s", (const char*) _type ); setPixmap( col_type, Resource::loadPixmap( name ) ); if ( _wep ) setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap! listView()->triggerUpdate(); } void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed ) { #ifdef DEBUG - qDebug( "decorating scanlist item %s / %s / %s [%d]", - (const char*) type, - (const char*) essid, - (const char*) macaddr, - channel ); + odebug << "decorating scanlist item " << (const char*) type << " / " + << (const char*) essid << " / " << (const char*) macaddr + << "[" << channel << "]" << oendl; #endif // set icon for managed or adhoc mode QString name; name.sprintf( "wellenreiter/%s", (const char*) type ); setPixmap( col_type, Resource::loadPixmap( name ) ); // special case for probed networks FIXME: This is ugly at present if ( type == "network" && probed ) { setPixmap( col_type, Resource::loadPixmap( "wellenreiter/network-probed.png" ) ); } // set icon for wep (wireless encryption protocol) if ( wep ) setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap! |