summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index f400ce6..433bd3a 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -75,384 +75,385 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
75 75
76 // let hold be rightButtonClicked() 76 // let hold be rightButtonClicked()
77 QPEApplication::setStylusOperation( ListView2->viewport(), QPEApplication::RightOnHold); 77 QPEApplication::setStylusOperation( ListView2->viewport(), QPEApplication::RightOnHold);
78 QPEApplication::setStylusOperation( ListView4->viewport(), QPEApplication::RightOnHold); 78 QPEApplication::setStylusOperation( ListView4->viewport(), QPEApplication::RightOnHold);
79 79
80 //Load all icons needed 80 //Load all icons needed
81 m_offPix = Resource::loadPixmap( "opietooth/notconnected" ); 81 m_offPix = Resource::loadPixmap( "opietooth/notconnected" );
82 m_onPix = Resource::loadPixmap( "opietooth/connected" ); 82 m_onPix = Resource::loadPixmap( "opietooth/connected" );
83 m_findPix = Resource::loadPixmap( "opietooth/find" ); 83 m_findPix = Resource::loadPixmap( "opietooth/find" );
84 84
85 QPalette pal = this->palette(); 85 QPalette pal = this->palette();
86 QColor col = pal.color( QPalette::Active, QColorGroup::Background ); 86 QColor col = pal.color( QPalette::Active, QColorGroup::Background );
87 pal.setColor( QPalette::Active, QColorGroup::Button, col ); 87 pal.setColor( QPalette::Active, QColorGroup::Button, col );
88 pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); 88 pal.setColor( QPalette::Inactive, QColorGroup::Button, col );
89 pal.setColor( QPalette::Normal, QColorGroup::Button, col ); 89 pal.setColor( QPalette::Normal, QColorGroup::Button, col );
90 pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); 90 pal.setColor( QPalette::Disabled, QColorGroup::Button, col );
91 this->setPalette( pal ); 91 this->setPalette( pal );
92 92
93 setCaption( tr( "Bluetooth Manager" ) ); 93 setCaption( tr( "Bluetooth Manager" ) );
94 94
95 readConfig(); 95 readConfig();
96 initGui(); 96 initGui();
97 97
98 //TESTING 98 //TESTING
99 ListView2->setRootIsDecorated(true); 99 ListView2->setRootIsDecorated(true);
100 100
101 BTDeviceItem *topLV2 = new BTDeviceItem( ListView2, RemoteDevice("xx:", "Siemens S45" ) ); 101 BTDeviceItem *topLV2 = new BTDeviceItem( ListView2, RemoteDevice("xx:", "Siemens S45" ) );
102 topLV2->setPixmap( 1, m_onPix ); 102 topLV2->setPixmap( 1, m_onPix );
103 Services s1; 103 Services s1;
104 s1.setServiceName( "Serial" ); 104 s1.setServiceName( "Serial" );
105 s1.insertClassId(1, "BlueNic"); 105 s1.insertClassId(1, "BlueNic");
106 (void) new BTServiceItem( topLV2, s1 ); 106 (void) new BTServiceItem( topLV2, s1 );
107 s1.setServiceName( "BlueNic" ); 107 s1.setServiceName( "BlueNic" );
108 s1.insertClassId(2, "Obex"); 108 s1.insertClassId(2, "Obex");
109 (void) new BTServiceItem( topLV2, s1 ); 109 (void) new BTServiceItem( topLV2, s1 );
110 110
111 writeToHciConfig(); 111 writeToHciConfig();
112 // search conncetions 112 // search conncetions
113 addConnectedDevices(); 113 addConnectedDevices();
114 m_iconLoader = new BTIconLoader(); 114 m_iconLoader = new BTIconLoader();
115 readSavedDevices(); 115 readSavedDevices();
116} 116}
117 117
118/** 118/**
119 * Reads all options from the config file 119 * Reads all options from the config file
120 */ 120 */
121void BlueBase::readConfig() { 121void BlueBase::readConfig() {
122 122
123 Config cfg( "bluetoothmanager" ); 123 Config cfg( "bluetoothmanager" );
124 cfg.setGroup( "bluezsettings" ); 124 cfg.setGroup( "bluezsettings" );
125 125
126 m_deviceName = cfg.readEntry( "name" , "No name" ); // name the device should identify with 126 m_deviceName = cfg.readEntry( "name" , "No name" ); // name the device should identify with
127 m_defaultPasskey = cfg.readEntryCrypt( "passkey" , "" ); // <- hmm, look up how good the trolls did that, maybe too weak 127 m_defaultPasskey = cfg.readEntryCrypt( "passkey" , "" ); // <- hmm, look up how good the trolls did that, maybe too weak
128 m_useEncryption = cfg.readBoolEntry( "useEncryption" , TRUE ); 128 m_useEncryption = cfg.readBoolEntry( "useEncryption" , TRUE );
129 m_enableAuthentification = cfg.readBoolEntry( "enableAuthentification" , TRUE ); 129 m_enableAuthentification = cfg.readBoolEntry( "enableAuthentification" , TRUE );
130 m_enablePagescan = cfg.readBoolEntry( "enablePagescan" , TRUE ); 130 m_enablePagescan = cfg.readBoolEntry( "enablePagescan" , TRUE );
131 m_enableInquiryscan = cfg.readBoolEntry( "enableInquiryscan" , TRUE ); 131 m_enableInquiryscan = cfg.readBoolEntry( "enableInquiryscan" , TRUE );
132} 132}
133 133
134/** 134/**
135 * Writes all options to the config file 135 * Writes all options to the config file
136 */ 136 */
137void BlueBase::writeConfig() { 137void BlueBase::writeConfig() {
138 138
139 Config cfg( "bluetoothmanager" ); 139 Config cfg( "bluetoothmanager" );
140 cfg.setGroup( "bluezsettings" ); 140 cfg.setGroup( "bluezsettings" );
141 141
142 cfg.writeEntry( "name" , m_deviceName ); 142 cfg.writeEntry( "name" , m_deviceName );
143 cfg.writeEntryCrypt( "passkey" , m_defaultPasskey ); 143 cfg.writeEntryCrypt( "passkey" , m_defaultPasskey );
144 cfg.writeEntry( "useEncryption" , m_useEncryption ); 144 cfg.writeEntry( "useEncryption" , m_useEncryption );
145 cfg.writeEntry( "enableAuthentification" , m_enableAuthentification ); 145 cfg.writeEntry( "enableAuthentification" , m_enableAuthentification );
146 cfg.writeEntry( "enablePagescan" , m_enablePagescan ); 146 cfg.writeEntry( "enablePagescan" , m_enablePagescan );
147 cfg.writeEntry( "enableInquiryscan" , m_enableInquiryscan ); 147 cfg.writeEntry( "enableInquiryscan" , m_enableInquiryscan );
148 148
149 writeToHciConfig(); 149 writeToHciConfig();
150} 150}
151 151
152/** 152/**
153 * Modify the hcid.conf file to our needs 153 * Modify the hcid.conf file to our needs
154 */ 154 */
155void BlueBase::writeToHciConfig() { 155void BlueBase::writeToHciConfig() {
156 qWarning("writeToHciConfig"); 156 qWarning("writeToHciConfig");
157 HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); 157 HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" );
158 hciconf.load(); 158 hciconf.load();
159 hciconf.setPinHelper( "/bin/QtPalmtop/bin/blue-pin" ); 159 hciconf.setPinHelper( "/bin/QtPalmtop/bin/blue-pin" );
160 hciconf.setName( m_deviceName ); 160 hciconf.setName( m_deviceName );
161 hciconf.setEncrypt( m_useEncryption ); 161 hciconf.setEncrypt( m_useEncryption );
162 hciconf.setAuth( m_enableAuthentification ); 162 hciconf.setAuth( m_enableAuthentification );
163 hciconf.setPscan( m_enablePagescan ); 163 hciconf.setPscan( m_enablePagescan );
164 hciconf.setIscan( m_enableInquiryscan ); 164 hciconf.setIscan( m_enableInquiryscan );
165 hciconf.save(); 165 hciconf.save();
166} 166}
167 167
168 168
169/** 169/**
170 * Read the list of allready known devices 170 * Read the list of allready known devices
171 */ 171 */
172void BlueBase::readSavedDevices() { 172void BlueBase::readSavedDevices() {
173 173
174 QValueList<RemoteDevice> loadedDevices; 174 QValueList<RemoteDevice> loadedDevices;
175 DeviceHandler handler; 175 DeviceHandler handler;
176 loadedDevices = handler.load(); 176 loadedDevices = handler.load();
177 177
178 addSearchedDevices( loadedDevices ); 178 addSearchedDevices( loadedDevices );
179} 179}
180 180
181 181
182/** 182/**
183 * Write the list of allready known devices 183 * Write the list of allready known devices
184 */ 184 */
185void BlueBase::writeSavedDevices() { 185void BlueBase::writeSavedDevices() {
186 QListViewItemIterator it( ListView2 ); 186 QListViewItemIterator it( ListView2 );
187 BTListItem* item; 187 BTListItem* item;
188 BTDeviceItem* device; 188 BTDeviceItem* device;
189 RemoteDevice::ValueList list; 189 RemoteDevice::ValueList list;
190 for ( ; it.current(); ++it ) { 190 for ( ; it.current(); ++it ) {
191 item = (BTListItem*)it.current(); 191 item = (BTListItem*)it.current();
192 if(item->typeId() != BTListItem::Device ) 192 if(item->typeId() != BTListItem::Device )
193 continue; 193 continue;
194 device = (BTDeviceItem*)item; 194 device = (BTDeviceItem*)item;
195 195
196 list.append( device->remoteDevice() ); 196 list.append( device->remoteDevice() );
197 } 197 }
198 /* 198 /*
199 * if not empty save the List through DeviceHandler 199 * if not empty save the List through DeviceHandler
200 */ 200 */
201 if ( list.isEmpty() ) 201 if ( list.isEmpty() )
202 return; 202 return;
203 DeviceHandler handler; 203 DeviceHandler handler;
204 handler.save( list ); 204 handler.save( list );
205} 205}
206 206
207 207
208/** 208/**
209 * Set up the gui 209 * Set up the gui
210 */ 210 */
211void BlueBase::initGui() { 211void BlueBase::initGui() {
212 StatusLabel->setText( status() ); // maybe move it to getStatus() 212 StatusLabel->setText( status() ); // maybe move it to getStatus()
213 cryptCheckBox->setChecked( m_useEncryption ); 213 cryptCheckBox->setChecked( m_useEncryption );
214 authCheckBox->setChecked( m_enableAuthentification ); 214 authCheckBox->setChecked( m_enableAuthentification );
215 pagescanCheckBox->setChecked( m_enablePagescan ); 215 pagescanCheckBox->setChecked( m_enablePagescan );
216 inquiryscanCheckBox->setChecked( m_enableInquiryscan ); 216 inquiryscanCheckBox->setChecked( m_enableInquiryscan );
217 deviceNameLine->setText( m_deviceName ); 217 deviceNameLine->setText( m_deviceName );
218 passkeyLine->setText( m_defaultPasskey ); 218 passkeyLine->setText( m_defaultPasskey );
219 // set info tab 219 // set info tab
220 setInfo(); 220 setInfo();
221} 221}
222 222
223 223
224/** 224/**
225 * Get the status informations and returns it 225 * Get the status informations and returns it
226 * @return QString the status informations gathered 226 * @return QString the status informations gathered
227 */ 227 */
228QString BlueBase::status()const{ 228QString BlueBase::status()const{
229 QString infoString = tr( "<b>Device name : </b> Ipaq" ); 229 QString infoString = tr( "<b>Device name : </b> Ipaq" );
230 infoString += QString( "<br><b>" + tr( "MAC adress: " ) +"</b> No idea" ); 230 infoString += QString( "<br><b>" + tr( "MAC adress: " ) +"</b> No idea" );
231 infoString += QString( "<br><b>" + tr( "Class" ) + "</b> PDA" ); 231 infoString += QString( "<br><b>" + tr( "Class" ) + "</b> PDA" );
232 232
233 return (infoString); 233 return (infoString);
234} 234}
235 235
236 236
237/** 237/**
238 * Read the current values from the gui and invoke writeConfig() 238 * Read the current values from the gui and invoke writeConfig()
239 */ 239 */
240void BlueBase::applyConfigChanges() { 240void BlueBase::applyConfigChanges() {
241 m_deviceName = deviceNameLine->text(); 241 m_deviceName = deviceNameLine->text();
242 m_defaultPasskey = passkeyLine->text(); 242 m_defaultPasskey = passkeyLine->text();
243 m_useEncryption = cryptCheckBox->isChecked(); 243 m_useEncryption = cryptCheckBox->isChecked();
244 m_enableAuthentification = authCheckBox->isChecked(); 244 m_enableAuthentification = authCheckBox->isChecked();
245 m_enablePagescan = pagescanCheckBox->isChecked(); 245 m_enablePagescan = pagescanCheckBox->isChecked();
246 m_enableInquiryscan = inquiryscanCheckBox->isChecked(); 246 m_enableInquiryscan = inquiryscanCheckBox->isChecked();
247 247
248 writeConfig(); 248 writeConfig();
249 249
250 QMessageBox::information( this, tr("Test") , tr("Changes were applied.") ); 250 QMessageBox::information( this, tr("Test") , tr("Changes were applied.") );
251} 251}
252 252
253/** 253/**
254 * Add fresh found devices from scan dialog to the listing 254 * Add fresh found devices from scan dialog to the listing
255 * 255 *
256 */ 256 */
257void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices ) { 257void BlueBase::addSearchedDevices( const QValueList<RemoteDevice> &newDevices ) {
258 BTDeviceItem * deviceItem; 258 BTDeviceItem * deviceItem;
259 QValueList<RemoteDevice>::ConstIterator it; 259 QValueList<RemoteDevice>::ConstIterator it;
260 260
261 for( it = newDevices.begin(); it != newDevices.end() ; ++it ) { 261 for( it = newDevices.begin(); it != newDevices.end() ; ++it ) {
262 262
263 if (find( (*it) )) // is already inserted 263 if (find( (*it) )) // is already inserted
264 continue; 264 continue;
265 265
266 deviceItem = new BTDeviceItem( ListView2 , (*it) ); 266 deviceItem = new BTDeviceItem( ListView2 , (*it) );
267 deviceItem->setPixmap( 1, m_findPix );
267 deviceItem->setExpandable ( true ); 268 deviceItem->setExpandable ( true );
268 269
269 // look if device is avail. atm, async 270 // look if device is avail. atm, async
270 deviceActive( (*it) ); 271 deviceActive( (*it) );
271 272
272 // ggf auch hier? 273 // ggf auch hier?
273 addServicesToDevice( deviceItem ); 274 addServicesToDevice( deviceItem );
274 } 275 }
275} 276}
276 277
277 278
278/** 279/**
279 * Action that is toggled on entrys on click 280 * Action that is toggled on entrys on click
280 */ 281 */
281void BlueBase::startServiceActionClicked( QListViewItem */*item*/ ) { 282void BlueBase::startServiceActionClicked( QListViewItem */*item*/ ) {
282} 283}
283 284
284 285
285/** 286/**
286 * Action that are toggled on hold (mostly QPopups i guess) 287 * Action that are toggled on hold (mostly QPopups i guess)
287 */ 288 */
288void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & point, int /*column*/ ) { 289void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & point, int /*column*/ ) {
289 if (!item ) 290 if (!item )
290 return; 291 return;
291 292
292 QPopupMenu *menu = new QPopupMenu(); 293 QPopupMenu *menu = new QPopupMenu();
293 int ret=0; 294 int ret=0;
294 295
295 if ( ((BTListItem*)item)->type() == "device") { 296 if ( ((BTListItem*)item)->type() == "device") {
296 297
297 QPopupMenu *groups = new QPopupMenu(); 298 QPopupMenu *groups = new QPopupMenu();
298 299
299 menu->insertItem( tr("rescan sevices:"), 0); 300 menu->insertItem( tr("rescan sevices:"), 0);
300 menu->insertItem( tr("to group"), groups , 1); 301 menu->insertItem( tr("to group"), groups , 1);
301 // menu->insertItem( tr("bound device"), 2); 302 // menu->insertItem( tr("bound device"), 2);
302 menu->insertItem( tr("delete"), 3); 303 menu->insertItem( tr("delete"), 3);
303 304
304 ret = menu->exec( point , 0); 305 ret = menu->exec( point , 0);
305 306
306 switch(ret) { 307 switch(ret) {
307 case -1: 308 case -1:
308 break; 309 break;
309 case 0: 310 case 0:
310 addServicesToDevice( (BTDeviceItem*)item ); 311 addServicesToDevice( (BTDeviceItem*)item );
311 break; 312 break;
312 case 1: 313 case 1:
313 314
314 break; 315 break;
315 316
316 // NO need to, since hcid does that on the fly 317 // NO need to, since hcid does that on the fly
317 // case 2: 318 // case 2:
318 // make connection 319 // make connection
319 //m_localDevice->connectTo( ((BTDeviceItem*)item)->mac() ); 320 //m_localDevice->connectTo( ((BTDeviceItem*)item)->mac() );
320 //break; 321 //break;
321 case 3: 322 case 3:
322 // deletes childs too 323 // deletes childs too
323 delete item; 324 delete item;
324 break; 325 break;
325 } 326 }
326 delete groups; 327 delete groups;
327 328
328 } 329 }
329 330
330 /* 331 /*
331 * We got service sensitive PopupMenus in our factory 332 * We got service sensitive PopupMenus in our factory
332 * We will create one through the factory and will insert 333 * We will create one through the factory and will insert
333 * our Separator + ShowInfo into the menu or create a new 334 * our Separator + ShowInfo into the menu or create a new
334 * one if the factory returns 0 335 * one if the factory returns 0
335 * PopupMenu deletion is kind of weird. 336 * PopupMenu deletion is kind of weird.
336 * If escaped( -1 ) or any of our items were chosen we'll 337 * If escaped( -1 ) or any of our items were chosen we'll
337 * delete the PopupMenu otherwise it's the responsibility of 338 * delete the PopupMenu otherwise it's the responsibility of
338 * the PopupMenu to delete itself 339 * the PopupMenu to delete itself
339 * 340 *
340 */ 341 */
341 else if ( ((BTListItem*)item)->type() == "service") { 342 else if ( ((BTListItem*)item)->type() == "service") {
342 BTServiceItem* service = (BTServiceItem*)item; 343 BTServiceItem* service = (BTServiceItem*)item;
343 QMap<int, QString> list = service->services().classIdList(); 344 QMap<int, QString> list = service->services().classIdList();
344 QMap<int, QString>::Iterator it = list.begin(); 345 QMap<int, QString>::Iterator it = list.begin();
345 QPopupMenu *popup =0l; 346 QPopupMenu *popup =0l;
346 if ( it != list.end() ) { 347 if ( it != list.end() ) {
347 qWarning("Searching id %d %s", it.key(), it.data().latin1() ); 348 qWarning("Searching id %d %s", it.key(), it.data().latin1() );
348 popup = m_popHelper.find( it.key() /*1*/, 349 popup = m_popHelper.find( it.key() /*1*/,
349 service->services(), 350 service->services(),
350 (BTDeviceItem*)service->parent() ); 351 (BTDeviceItem*)service->parent() );
351 }else { 352 }else {
352 qWarning("Empty"); 353 qWarning("Empty");
353 } 354 }
354 355
355 if ( popup == 0l ) { 356 if ( popup == 0l ) {
356 qWarning("factory returned 0l"); 357 qWarning("factory returned 0l");
357 popup = new QPopupMenu(); 358 popup = new QPopupMenu();
358 } 359 }
359 360
360 int test1 = popup->insertItem( tr("Test1:"), 0); 361 int test1 = popup->insertItem( tr("Test1:"), 0);
361 362
362 ret = popup->exec( point ); 363 ret = popup->exec( point );
363 qWarning("returned from exec() "); 364 qWarning("returned from exec() ");
364 if ( ret == -1 ) { 365 if ( ret == -1 ) {
365 ; 366 ;
366 } else if ( ret == test1 ) { 367 } else if ( ret == test1 ) {
367 ; 368 ;
368 } 369 }
369 delete popup; 370 delete popup;
370 } 371 }
371 delete menu; 372 delete menu;
372} 373}
373 374
374 375
375/** 376/**
376 * Search and display avail. services for a device (on expand from device listing) 377 * Search and display avail. services for a device (on expand from device listing)
377 * @param item the service item returned 378 * @param item the service item returned
378 */ 379 */
379void BlueBase::addServicesToDevice( BTDeviceItem * item ) { 380void BlueBase::addServicesToDevice( BTDeviceItem * item ) {
380 qDebug("addServicesToDevice"); 381 qDebug("addServicesToDevice");
381 // row of mac adress text(3) 382 // row of mac adress text(3)
382 RemoteDevice device = item->remoteDevice(); 383 RemoteDevice device = item->remoteDevice();
383 m_deviceList.insert( item->mac() , item ); 384 m_deviceList.insert( item->mac() , item );
384 // and some time later I get a signal foundServices( const QString& device, Services::ValueList ); back 385 // and some time later I get a signal foundServices( const QString& device, Services::ValueList ); back
385 m_localDevice->searchServices( device ); 386 m_localDevice->searchServices( device );
386} 387}
387 388
388 389
389/** 390/**
390 * Overloaded. This one it the one that is connected to the foundServices signal 391 * Overloaded. This one it the one that is connected to the foundServices signal
391 * @param device the mac address of the remote device 392 * @param device the mac address of the remote device
392 * @param servicesList the list with the service the device has. 393 * @param servicesList the list with the service the device has.
393 */ 394 */
394void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList ) { 395void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList ) {
395 qDebug("fill services list"); 396 qDebug("fill services list");
396 397
397 QMap<QString,BTDeviceItem*>::Iterator it; 398 QMap<QString,BTDeviceItem*>::Iterator it;
398 BTDeviceItem* deviceItem = 0; 399 BTDeviceItem* deviceItem = 0;
399 400
400 // get the right devices which requested the search 401 // get the right devices which requested the search
401 it = m_deviceList.find( device ); 402 it = m_deviceList.find( device );
402 if( it == m_deviceList.end() ) 403 if( it == m_deviceList.end() )
403 return; 404 return;
404 deviceItem = it.data(); 405 deviceItem = it.data();
405 406
406 QValueList<OpieTooth::Services>::Iterator it2; 407 QValueList<OpieTooth::Services>::Iterator it2;
407 BTServiceItem * serviceItem; 408 BTServiceItem * serviceItem;
408 409
409 if (!servicesList.isEmpty() ) { 410 if (!servicesList.isEmpty() ) {
410 // add services 411 // add services
411 QMap<int, QString> list; 412 QMap<int, QString> list;
412 QMap<int, QString>::Iterator classIt; 413 QMap<int, QString>::Iterator classIt;
413 for( it2 = servicesList.begin(); it2 != servicesList.end(); ++it2 ) { 414 for( it2 = servicesList.begin(); it2 != servicesList.end(); ++it2 ) {
414 serviceItem = new BTServiceItem( deviceItem , (*it2) ); 415 serviceItem = new BTServiceItem( deviceItem , (*it2) );
415 list = (*it2).classIdList(); 416 list = (*it2).classIdList();
416 classIt = list.begin(); 417 classIt = list.begin();
417 int classId=0; 418 int classId=0;
418 if ( classIt != list.end() ) { 419 if ( classIt != list.end() ) {
419 classId = classIt.key(); 420 classId = classIt.key();
420 } 421 }
421 422
422 serviceItem->setPixmap( 0, m_iconLoader->serviceIcon( classId ) ); 423 serviceItem->setPixmap( 0, m_iconLoader->serviceIcon( classId ) );
423 } 424 }
424 } else { 425 } else {
425 Services s1; 426 Services s1;
426 s1.setServiceName( tr("no serives found") ); 427 s1.setServiceName( tr("no serives found") );
427 serviceItem = new BTServiceItem( deviceItem, s1 ); 428 serviceItem = new BTServiceItem( deviceItem, s1 );
428 } 429 }
429 // now remove them from the list 430 // now remove them from the list
430 m_deviceList.remove( it ); 431 m_deviceList.remove( it );
431} 432}
432 433
433 434
434/** 435/**
435 * Add the existing connections (pairs) to the connections tab. 436 * Add the existing connections (pairs) to the connections tab.
436 * This one triggers the search 437 * This one triggers the search
437 */ 438 */
438void BlueBase::addConnectedDevices() { 439void BlueBase::addConnectedDevices() {
439 m_localDevice->searchConnections(); 440 m_localDevice->searchConnections();
440} 441}
441 442
442 443
443/** 444/**
444 * This adds the found connections to the connection tab. 445 * This adds the found connections to the connection tab.
445 * @param connectionList the ValueList with all current connections 446 * @param connectionList the ValueList with all current connections
446 */ 447 */
447void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList ) { 448void BlueBase::addConnectedDevices( ConnectionState::ValueList connectionList ) {
448 449
449 // clear the ListView first 450 // clear the ListView first
450 ListView4->clear(); 451 ListView4->clear();
451 452
452 QValueList<OpieTooth::ConnectionState>::Iterator it; 453 QValueList<OpieTooth::ConnectionState>::Iterator it;
453 BTConnectionItem * connectionItem; 454 BTConnectionItem * connectionItem;
454 455
455 if ( !connectionList.isEmpty() ) { 456 if ( !connectionList.isEmpty() ) {
456 457
457 for (it = connectionList.begin(); it != connectionList.end(); ++it) { 458 for (it = connectionList.begin(); it != connectionList.end(); ++it) {
458 connectionItem = new BTConnectionItem( ListView4 , (*it) ); 459 connectionItem = new BTConnectionItem( ListView4 , (*it) );