summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui
Side-by-side diff
Diffstat (limited to 'noncore/net/wellenreiter/gui') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp17
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp9
2 files changed, 11 insertions, 15 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
@@ -120,26 +120,27 @@ void MScanListView::serializeFrom( QDataStream& 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;
@@ -385,26 +386,26 @@ 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 ) );
}
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() );
}
}
@@ -480,29 +481,27 @@ void MScanListItem::serializeFrom( QDataStream& s )
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" ) );
}
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 2f85790..e801ce7 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -733,30 +733,27 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch
if ( !iface )
{
QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) );
return;
}
if ( sniffing )
{
QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Stop sniffing before\njoining a net." ) );
return;
}
- qDebug( "joinNetwork() with Interface %s: %s, %s, %d, %s",
- (const char*) iface->name(),
- (const char*) type,
- (const char*) essid,
- channel,
- (const char*) macaddr );
+ odebug << "joinNetwork() with Interface " << (const char*) iface->name()
+ << ": " << (const char*) type << ", " << (const char*) essid
+ << ", " << channel << ", " << (const char*) macaddr << oendl;
QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" );
int count = 3;
odebug << "sending " << count << " messages" << oendl;
msg << QString("count") << QString::number(count);
odebug << "msg >" << iface->name() << "< Mode >" << type.latin1() << "<" << oendl;
msg << QString(iface->name()) << QString("Mode") << type;
odebug << "msg >" << iface->name() << "< essid >" << essid.latin1() << "<" << oendl;
msg << QString(iface->name()) << QString("ESSID") << essid;
odebug << "msg >" << iface->name() << "< channel >" << channel << "<" << oendl;
msg << QString(iface->name()) << QString("Channel") << channel;
// odebug << "msg >" << iface->name() << "< mac >" << macaddr << "<" << oendl;