summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/scanlist.cpp
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index b8aa81c..1cf49e0 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -176,3 +176,3 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo
176 176
177void MScanListView::addIfNotExisting( MScanListItem* network, QString addr ) 177void MScanListView::addIfNotExisting( MScanListItem* network, QString addr, const QString& type )
178{ 178{
@@ -197,3 +197,3 @@ void MScanListView::addIfNotExisting( MScanListItem* network, QString addr )
197 // Hey, it seems to be a new item :-D 197 // Hey, it seems to be a new item :-D
198 MScanListItem* station = new MScanListItem( network, "station", /* network->text( col_essid ) */ "", addr, false, -1, -1 ); 198 MScanListItem* station = new MScanListItem( network, type, /* network->text( col_essid ) */ "", addr, false, -1, -1 );
199 if ( _manufacturerdb ) 199 if ( _manufacturerdb )
@@ -239,3 +239,3 @@ void MScanListView::toDStraffic( QString from, QString to, QString via )
239 { 239 {
240 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from ); 240 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "adhoc" );
241 } 241 }
@@ -249,3 +249,18 @@ void MScanListView::fromDStraffic( QString from, QString to, QString via )
249{ 249{
250 qWarning( "D'oh! Not yet implemented..." ); 250 QString s;
251 MScanListItem* network;
252
253 QListViewItemIterator it( this );
254 while ( it.current() && it.current()->text( col_ap ) != via ) ++it;
255
256 MScanListItem* item = static_cast<MScanListItem*>( it.current() );
257
258 if ( item ) // AP has shown up yet, so just add our new "from" - station
259 {
260 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "station" );
261 }
262 else
263 {
264 qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" );
265 }
251} 266}