summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/scanlist.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (ignore 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 @@
#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 ) );