author | mickeyl <mickeyl> | 2003-05-04 20:40:28 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-04 20:40:28 (UTC) |
commit | 7372d0271b19bc6ead8e796a949746ae45fe13fa (patch) (unidiff) | |
tree | 35f2e418dfc4184ae335f24a487bce5a6787f129 /noncore/net/wellenreiter/gui/scanlist.cpp | |
parent | 09dceae91b14a4b2d936ebfc6c7c276686c2b98c (diff) | |
download | opie-7372d0271b19bc6ead8e796a949746ae45fe13fa.zip opie-7372d0271b19bc6ead8e796a949746ae45fe13fa.tar.gz opie-7372d0271b19bc6ead8e796a949746ae45fe13fa.tar.bz2 |
- cleanup and code refactoring towards 1.0
- match IP addresses to MAC addresses by looking @ ARP packets
- show IP addresses
- reduce debug output
Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 98 |
1 files changed, 73 insertions, 25 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 3a6aa15..d5665b4 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp | |||
@@ -12,12 +12,13 @@ | |||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "scanlist.h" | 16 | #include "scanlist.h" |
17 | #include "configwindow.h" | 17 | #include "configwindow.h" |
18 | #include "logwindow.h" | ||
18 | 19 | ||
19 | #include <assert.h> | 20 | #include <assert.h> |
20 | #include "manufacturers.h" | 21 | #include "manufacturers.h" |
21 | #include <qdatetime.h> | 22 | #include <qdatetime.h> |
22 | #include <qtextstream.h> | 23 | #include <qtextstream.h> |
23 | 24 | ||
@@ -37,41 +38,44 @@ const int col_type = 0; | |||
37 | const int col_essid = 0; | 38 | const int col_essid = 0; |
38 | const int col_sig = 1; | 39 | const int col_sig = 1; |
39 | const int col_ap = 2; | 40 | const int col_ap = 2; |
40 | const int col_channel = 3; | 41 | const int col_channel = 3; |
41 | const int col_wep = 4; | 42 | const int col_wep = 4; |
42 | const int col_traffic = 5; | 43 | const int col_traffic = 5; |
43 | const int col_manuf = 6; | 44 | const int col_ip = 6; |
44 | const int col_firstseen = 7; | 45 | const int col_manuf = 7; |
45 | const int col_lastseen = 8; | 46 | const int col_firstseen = 8; |
47 | const int col_lastseen = 9; | ||
46 | 48 | ||
47 | MScanListView::MScanListView( QWidget* parent, const char* name ) | 49 | MScanListView::MScanListView( QWidget* parent, const char* name ) |
48 | :OListView( parent, name ), _manufacturerdb( 0 ) | 50 | :OListView( parent, name ), _manufacturerdb( 0 ) |
49 | { | 51 | { |
50 | 52 | ||
51 | setFrameShape( QListView::StyledPanel ); | 53 | setFrameShape( QListView::StyledPanel ); |
52 | setFrameShadow( QListView::Sunken ); | 54 | setFrameShadow( QListView::Sunken ); |
53 | 55 | ||
54 | addColumn( tr( "Net/Station" ) ); | 56 | addColumn( tr( "Net/Station" ) ); |
55 | setColumnAlignment( 0, AlignLeft || AlignVCenter ); | 57 | setColumnAlignment( col_essid, AlignLeft || AlignVCenter ); |
56 | addColumn( tr( "#" ) ); | 58 | addColumn( tr( "#" ) ); |
57 | setColumnAlignment( 1, AlignCenter ); | 59 | setColumnAlignment( col_sig, AlignCenter ); |
58 | addColumn( tr( "MAC" ) ); | 60 | addColumn( tr( "MAC" ) ); |
59 | setColumnAlignment( 2, AlignCenter ); | 61 | setColumnAlignment( col_ap, AlignCenter ); |
60 | addColumn( tr( "Chn" ) ); | 62 | addColumn( tr( "Chn" ) ); |
61 | setColumnAlignment( 3, AlignCenter ); | 63 | setColumnAlignment( col_channel, AlignCenter ); |
62 | addColumn( tr( "W" ) ); | 64 | addColumn( tr( "W" ) ); |
63 | setColumnAlignment( 4, AlignCenter ); | 65 | setColumnAlignment( col_wep, AlignCenter ); |
64 | addColumn( tr( "T" ) ); | 66 | addColumn( tr( "T" ) ); |
65 | setColumnAlignment( 5, AlignCenter ); | 67 | setColumnAlignment( col_traffic, AlignCenter ); |
68 | addColumn( tr( "IP" ) ); | ||
69 | setColumnAlignment( col_ip, AlignCenter ); | ||
66 | addColumn( tr( "Manufacturer" ) ); | 70 | addColumn( tr( "Manufacturer" ) ); |
67 | setColumnAlignment( 6, AlignCenter ); | 71 | setColumnAlignment( col_manuf, AlignCenter ); |
68 | addColumn( tr( "First Seen" ) ); | 72 | addColumn( tr( "First Seen" ) ); |
69 | setColumnAlignment( 7, AlignCenter ); | 73 | setColumnAlignment( col_firstseen, AlignCenter ); |
70 | addColumn( tr( "Last Seen" ) ); | 74 | addColumn( tr( "Last Seen" ) ); |
71 | setColumnAlignment( 8, AlignCenter ); | 75 | setColumnAlignment( col_lastseen, AlignCenter ); |
72 | setRootIsDecorated( true ); | 76 | setRootIsDecorated( true ); |
73 | setAllColumnsShowFocus( true ); | 77 | setAllColumnsShowFocus( true ); |
74 | }; | 78 | }; |
75 | 79 | ||
76 | MScanListView::~MScanListView() | 80 | MScanListView::~MScanListView() |
77 | { | 81 | { |
@@ -100,27 +104,28 @@ void MScanListView::setManufacturerDB( ManufacturerDB* manufacturerdb ) | |||
100 | } | 104 | } |
101 | 105 | ||
102 | void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) | 106 | void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) |
103 | { | 107 | { |
104 | // FIXME: scanlistitem needs a proper encapsulation and not such a damn dealing with text(...) | 108 | // FIXME: scanlistitem needs a proper encapsulation and not such a damn dealing with text(...) |
105 | 109 | ||
106 | qDebug( "MScanList::addNewItem( %s / %s / %s [%d]", | 110 | #ifdef DEBUG |
107 | (const char*) type, | 111 | qDebug( "MScanList::addNewItem( %s / %s / %s [%d]", (const char*) type, |
108 | (const char*) essid, | 112 | (const char*) essid, (const char*) macaddr, channel ); |
109 | (const char*) macaddr, | 113 | #endif |
110 | channel ); | ||
111 | 114 | ||
112 | // search, if we already have seen this net | 115 | // search, if we already have seen this net |
113 | 116 | ||
114 | QString s; | 117 | QString s; |
115 | MScanListItem* network; | 118 | MScanListItem* network; |
116 | MScanListItem* item = static_cast<MScanListItem*> ( firstChild() ); | 119 | MScanListItem* item = static_cast<MScanListItem*> ( firstChild() ); |
117 | 120 | ||
118 | while ( item && ( item->text( col_essid ) != essid ) ) | 121 | while ( item && ( item->text( col_essid ) != essid ) ) |
119 | { | 122 | { |
123 | #ifdef DEBUG | ||
120 | qDebug( "itemtext: %s", (const char*) item->text( col_essid ) ); | 124 | qDebug( "itemtext: %s", (const char*) item->text( col_essid ) ); |
125 | #endif | ||
121 | item = static_cast<MScanListItem*> ( item->nextSibling() ); | 126 | item = static_cast<MScanListItem*> ( item->nextSibling() ); |
122 | } | 127 | } |
123 | if ( item ) | 128 | if ( item ) |
124 | { | 129 | { |
125 | // we have already seen this net, check all childs if MAC exists | 130 | // we have already seen this net, check all childs if MAC exists |
126 | 131 | ||
@@ -128,13 +133,15 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo | |||
128 | 133 | ||
129 | item = static_cast<MScanListItem*> ( item->firstChild() ); | 134 | item = static_cast<MScanListItem*> ( item->firstChild() ); |
130 | assert( item ); // this shouldn't fail | 135 | assert( item ); // this shouldn't fail |
131 | 136 | ||
132 | while ( item && ( item->text( col_ap ) != macaddr ) ) | 137 | while ( item && ( item->text( col_ap ) != macaddr ) ) |
133 | { | 138 | { |
139 | #ifdef DEBUG | ||
134 | qDebug( "subitemtext: %s", (const char*) item->text( col_ap ) ); | 140 | qDebug( "subitemtext: %s", (const char*) item->text( col_ap ) ); |
141 | #endif | ||
135 | item = static_cast<MScanListItem*> ( item->nextSibling() ); | 142 | item = static_cast<MScanListItem*> ( item->nextSibling() ); |
136 | } | 143 | } |
137 | 144 | ||
138 | if ( item ) | 145 | if ( item ) |
139 | { | 146 | { |
140 | // we have already seen this item, it's a dupe | 147 | // we have already seen this item, it's a dupe |
@@ -144,47 +151,51 @@ void MScanListView::addNewItem( QString type, QString essid, QString macaddr, bo | |||
144 | item->receivedBeacon(); | 151 | item->receivedBeacon(); |
145 | return; | 152 | return; |
146 | } | 153 | } |
147 | } | 154 | } |
148 | else | 155 | else |
149 | { | 156 | { |
150 | s.sprintf( "(i) new network: '%s'", (const char*) essid ); | 157 | s.sprintf( "(i) New network: ESSID '%s'", (const char*) essid ); |
151 | //TODO send s to logwindow | 158 | MLogWindow::logwindow()->log( s ); |
152 | network = new MScanListItem( this, "network", essid, QString::null, 0, 0, 0 ); | 159 | network = new MScanListItem( this, "network", essid, QString::null, 0, 0, 0 ); |
153 | } | 160 | } |
154 | 161 | ||
155 | 162 | ||
156 | // insert new station as child from network | 163 | // insert new station as child from network |
157 | // no essid to reduce clutter, maybe later we have a nick or stationname to display!? | 164 | // no essid to reduce clutter, maybe later we have a nick or stationname to display!? |
158 | 165 | ||
166 | #ifdef DEBUG | ||
159 | qDebug( "inserting new station %s", (const char*) macaddr ); | 167 | qDebug( "inserting new station %s", (const char*) macaddr ); |
168 | #endif | ||
160 | 169 | ||
161 | MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); | 170 | MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); |
162 | if ( _manufacturerdb ) | 171 | if ( _manufacturerdb ) |
163 | station->setManufacturer( _manufacturerdb->lookup( macaddr ) ); | 172 | station->setManufacturer( _manufacturerdb->lookup( macaddr ) ); |
164 | 173 | ||
165 | if ( type == "managed" ) | 174 | if ( type == "managed" ) |
166 | { | 175 | { |
167 | s.sprintf( "(i) new AP in '%s' [%d]", (const char*) essid, channel ); | 176 | s.sprintf( "(i) New Access Point in '%s' [%d]", (const char*) essid, channel ); |
168 | } | 177 | } |
169 | else | 178 | else |
170 | { | 179 | { |
171 | s.sprintf( "(i) new adhoc station in '%s' [%d]", (const char*) essid, channel ); | 180 | s.sprintf( "(i) New AdHoc station in '%s' [%d]", (const char*) essid, channel ); |
172 | } | 181 | } |
173 | //TODO send s to logwindow | 182 | MLogWindow::logwindow()->log( s ); |
174 | 183 | ||
175 | } | 184 | } |
176 | 185 | ||
177 | 186 | ||
178 | void MScanListView::addIfNotExisting( MScanListItem* network, QString addr, const QString& type ) | 187 | void MScanListView::addIfNotExisting( MScanListItem* network, QString addr, const QString& type ) |
179 | { | 188 | { |
180 | MScanListItem* subitem = static_cast<MScanListItem*>( network->firstChild() ); | 189 | MScanListItem* subitem = static_cast<MScanListItem*>( network->firstChild() ); |
181 | 190 | ||
182 | while ( subitem && ( subitem->text( col_ap ) != addr ) ) | 191 | while ( subitem && ( subitem->text( col_ap ) != addr ) ) |
183 | { | 192 | { |
193 | #ifdef DEBUG | ||
184 | qDebug( "subitemtext: %s", (const char*) subitem->text( col_ap ) ); | 194 | qDebug( "subitemtext: %s", (const char*) subitem->text( col_ap ) ); |
195 | #endif | ||
185 | subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); | 196 | subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); |
186 | } | 197 | } |
187 | 198 | ||
188 | if ( subitem ) | 199 | if ( subitem ) |
189 | { | 200 | { |
190 | // we have already seen this item, it's a dupe | 201 | // we have already seen this item, it's a dupe |
@@ -200,19 +211,19 @@ void MScanListView::addIfNotExisting( MScanListItem* network, QString addr, cons | |||
200 | if ( _manufacturerdb ) | 211 | if ( _manufacturerdb ) |
201 | station->setManufacturer( _manufacturerdb->lookup( addr ) ); | 212 | station->setManufacturer( _manufacturerdb->lookup( addr ) ); |
202 | 213 | ||
203 | QString s; | 214 | QString s; |
204 | if ( type == "station" ) | 215 | if ( type == "station" ) |
205 | { | 216 | { |
206 | s.sprintf( "(i) new station in '%s' [??]", (const char*) network->text( col_essid ) ); | 217 | s.sprintf( "(i) New Station in '%s' [xx]", (const char*) network->text( col_essid ) ); |
207 | } | 218 | } |
208 | else | 219 | else |
209 | { | 220 | { |
210 | s.sprintf( "(i) new wireless station in '%s' [??]", (const char*) network->text( col_essid ) ); | 221 | s.sprintf( "(i) New Wireless Station in '%s' [xx]", (const char*) network->text( col_essid ) ); |
211 | } | 222 | } |
212 | //TODO send s to logwindow | 223 | MLogWindow::logwindow()->log( s ); |
213 | } | 224 | } |
214 | 225 | ||
215 | 226 | ||
216 | void MScanListView::WDStraffic( QString from, QString to, QString viaFrom, QString viaTo ) | 227 | void MScanListView::WDStraffic( QString from, QString to, QString viaFrom, QString viaTo ) |
217 | { | 228 | { |
218 | QString s; | 229 | QString s; |
@@ -230,12 +241,13 @@ void MScanListView::WDStraffic( QString from, QString to, QString viaFrom, QStri | |||
230 | addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from ); | 241 | addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from ); |
231 | addIfNotExisting( static_cast<MScanListItem*>(item->parent()), to ); | 242 | addIfNotExisting( static_cast<MScanListItem*>(item->parent()), to ); |
232 | } | 243 | } |
233 | else | 244 | else |
234 | { | 245 | { |
235 | qDebug( "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" ); | 246 | qDebug( "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" ); |
247 | MLogWindow::logwindow()->log( "WARNING: Unhandled WSD traffic!" ); | ||
236 | } | 248 | } |
237 | } | 249 | } |
238 | 250 | ||
239 | 251 | ||
240 | void MScanListView::toDStraffic( QString from, QString to, QString via ) | 252 | void MScanListView::toDStraffic( QString from, QString to, QString via ) |
241 | { | 253 | { |
@@ -251,15 +263,18 @@ void MScanListView::toDStraffic( QString from, QString to, QString via ) | |||
251 | { | 263 | { |
252 | addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "adhoc" ); | 264 | addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "adhoc" ); |
253 | } | 265 | } |
254 | else | 266 | else |
255 | { | 267 | { |
256 | qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" ); | 268 | qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" ); |
269 | MLogWindow::logwindow()->log( "WARNING: Unhandled toDS traffic!" ); | ||
270 | |||
257 | } | 271 | } |
258 | } | 272 | } |
259 | 273 | ||
274 | |||
260 | void MScanListView::fromDStraffic( QString from, QString to, QString via ) | 275 | void MScanListView::fromDStraffic( QString from, QString to, QString via ) |
261 | { | 276 | { |
262 | QString s; | 277 | QString s; |
263 | MScanListItem* network; | 278 | MScanListItem* network; |
264 | 279 | ||
265 | QListViewItemIterator it( this ); | 280 | QListViewItemIterator it( this ); |
@@ -271,61 +286,92 @@ void MScanListView::fromDStraffic( QString from, QString to, QString via ) | |||
271 | { | 286 | { |
272 | addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "station" ); | 287 | addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "station" ); |
273 | } | 288 | } |
274 | else | 289 | else |
275 | { | 290 | { |
276 | qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" ); | 291 | qDebug( "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" ); |
292 | MLogWindow::logwindow()->log( "WARNING: Unhandled fromDS traffic!" ); | ||
277 | } | 293 | } |
278 | } | 294 | } |
279 | 295 | ||
296 | |||
280 | void MScanListView::IBSStraffic( QString from, QString to, QString via ) | 297 | void MScanListView::IBSStraffic( QString from, QString to, QString via ) |
281 | { | 298 | { |
282 | qWarning( "D'oh! Not yet implemented..." ); | 299 | qWarning( "D'oh! Not yet implemented..." ); |
300 | MLogWindow::logwindow()->log( "WARNING: Unhandled IBSS traffic!" ); | ||
283 | } | 301 | } |
284 | 302 | ||
303 | |||
304 | void MScanListView::identify( const QString& macaddr, const QString& ip ) | ||
305 | { | ||
306 | qDebug( "identify %s = %s", (const char*) macaddr, (const char*) ip ); | ||
307 | |||
308 | QListViewItemIterator it( this ); | ||
309 | for ( ; it.current(); ++it ) | ||
310 | { | ||
311 | if ( it.current()->text( col_ap ) == macaddr ) | ||
312 | { | ||
313 | it.current()->setText( col_ip, ip ); | ||
314 | return; | ||
315 | } | ||
316 | } | ||
317 | qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" ); | ||
318 | MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled identification %s = %s!", | ||
319 | (const char*) macaddr, (const char*) ip ) ); | ||
320 | } | ||
321 | |||
322 | |||
285 | //============================================================ | 323 | //============================================================ |
286 | // MScanListItem | 324 | // MScanListItem |
287 | //============================================================ | 325 | //============================================================ |
288 | 326 | ||
289 | MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QString macaddr, | 327 | MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QString macaddr, |
290 | bool wep, int channel, int signal ) | 328 | bool wep, int channel, int signal ) |
291 | :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ), | 329 | :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ), |
292 | _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ), | 330 | _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ), |
293 | _channel( channel ), _signal( signal ), _beacons( 1 ) | 331 | _channel( channel ), _signal( signal ), _beacons( 1 ) |
294 | { | 332 | { |
333 | #ifdef DEBUG | ||
295 | qDebug( "creating scanlist item" ); | 334 | qDebug( "creating scanlist item" ); |
335 | #endif | ||
296 | if ( WellenreiterConfigWindow::instance() && type == "network" ) | 336 | if ( WellenreiterConfigWindow::instance() && type == "network" ) |
297 | playSound( WellenreiterConfigWindow::instance()->soundOnNetwork() ); | 337 | playSound( WellenreiterConfigWindow::instance()->soundOnNetwork() ); |
298 | decorateItem( type, essid, macaddr, wep, channel, signal ); | 338 | decorateItem( type, essid, macaddr, wep, channel, signal ); |
299 | } | 339 | } |
300 | 340 | ||
301 | MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid, QString macaddr, | 341 | MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid, QString macaddr, |
302 | bool wep, int channel, int signal ) | 342 | bool wep, int channel, int signal ) |
303 | :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ) | 343 | :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ) |
304 | { | 344 | { |
345 | #ifdef DEBUG | ||
305 | qDebug( "creating scanlist item" ); | 346 | qDebug( "creating scanlist item" ); |
347 | #endif | ||
306 | decorateItem( type, essid, macaddr, wep, channel, signal ); | 348 | decorateItem( type, essid, macaddr, wep, channel, signal ); |
307 | } | 349 | } |
308 | 350 | ||
309 | OListViewItem* MScanListItem::childFactory() | 351 | OListViewItem* MScanListItem::childFactory() |
310 | { | 352 | { |
311 | return new MScanListItem( this ); | 353 | return new MScanListItem( this ); |
312 | } | 354 | } |
313 | 355 | ||
314 | void MScanListItem::serializeTo( QDataStream& s ) const | 356 | void MScanListItem::serializeTo( QDataStream& s ) const |
315 | { | 357 | { |
358 | #ifdef DEBUG | ||
316 | qDebug( "serializing MScanListItem" ); | 359 | qDebug( "serializing MScanListItem" ); |
360 | #endif | ||
317 | OListViewItem::serializeTo( s ); | 361 | OListViewItem::serializeTo( s ); |
318 | 362 | ||
319 | s << _type; | 363 | s << _type; |
320 | s << (Q_UINT8) ( _wep ? 'y' : 'n' ); | 364 | s << (Q_UINT8) ( _wep ? 'y' : 'n' ); |
321 | } | 365 | } |
322 | 366 | ||
323 | void MScanListItem::serializeFrom( QDataStream& s ) | 367 | void MScanListItem::serializeFrom( QDataStream& s ) |
324 | { | 368 | { |
369 | #ifdef DEBUG | ||
325 | qDebug( "serializing MScanListItem" ); | 370 | qDebug( "serializing MScanListItem" ); |
371 | #endif | ||
326 | OListViewItem::serializeFrom( s ); | 372 | OListViewItem::serializeFrom( s ); |
327 | 373 | ||
328 | char wep; | 374 | char wep; |
329 | s >> _type; | 375 | s >> _type; |
330 | s >> (Q_UINT8) wep; | 376 | s >> (Q_UINT8) wep; |
331 | _wep = (wep == 'y'); | 377 | _wep = (wep == 'y'); |
@@ -337,17 +383,19 @@ void MScanListItem::serializeFrom( QDataStream& s ) | |||
337 | setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap! | 383 | setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap! |
338 | listView()->triggerUpdate(); | 384 | listView()->triggerUpdate(); |
339 | } | 385 | } |
340 | 386 | ||
341 | void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) | 387 | void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) |
342 | { | 388 | { |
389 | #ifdef DEBUG | ||
343 | qDebug( "decorating scanlist item %s / %s / %s [%d]", | 390 | qDebug( "decorating scanlist item %s / %s / %s [%d]", |
344 | (const char*) type, | 391 | (const char*) type, |
345 | (const char*) essid, | 392 | (const char*) essid, |
346 | (const char*) macaddr, | 393 | (const char*) macaddr, |
347 | channel ); | 394 | channel ); |
395 | #endif | ||
348 | 396 | ||
349 | // set icon for managed or adhoc mode | 397 | // set icon for managed or adhoc mode |
350 | QString name; | 398 | QString name; |
351 | name.sprintf( "wellenreiter/%s", (const char*) type ); | 399 | name.sprintf( "wellenreiter/%s", (const char*) type ); |
352 | setPixmap( col_type, Resource::loadPixmap( name ) ); | 400 | setPixmap( col_type, Resource::loadPixmap( name ) ); |
353 | 401 | ||