summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-07-21 21:59:53 (UTC)
committer harlekin <harlekin>2002-07-21 21:59:53 (UTC)
commit5eca9401acbc4e683f1a78126272c5bd0c23c796 (patch) (unidiff)
tree8211d3f33ebade18539659f36188dcda37f59553
parent536f6562d6f12210527814afbcd05a02d05afe83 (diff)
downloadopie-5eca9401acbc4e683f1a78126272c5bd0c23c796.zip
opie-5eca9401acbc4e683f1a78126272c5bd0c23c796.tar.gz
opie-5eca9401acbc4e683f1a78126272c5bd0c23c796.tar.bz2
paperbag
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 1fd0ea2..6c17974 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -316,81 +316,78 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
316 break; 316 break;
317 317
318 // NO need to, since hcid does that on the fly 318 // NO need to, since hcid does that on the fly
319 // case 2: 319 // case 2:
320 // make connection 320 // make connection
321 //m_localDevice->connectTo( ((BTDeviceItem*)item)->mac() ); 321 //m_localDevice->connectTo( ((BTDeviceItem*)item)->mac() );
322 //break; 322 //break;
323 case 3: 323 case 3:
324 // deletes childs too 324 // deletes childs too
325 delete item; 325 delete item;
326 break; 326 break;
327 } 327 }
328 delete groups; 328 delete groups;
329 329
330 } 330 }
331 331
332 /* 332 /*
333 * We got service sensitive PopupMenus in our factory 333 * We got service sensitive PopupMenus in our factory
334 * We will create one through the factory and will insert 334 * We will create one through the factory and will insert
335 * our Separator + ShowInfo into the menu or create a new 335 * our Separator + ShowInfo into the menu or create a new
336 * one if the factory returns 0 336 * one if the factory returns 0
337 * PopupMenu deletion is kind of weird. 337 * PopupMenu deletion is kind of weird.
338 * If escaped( -1 ) or any of our items were chosen we'll 338 * If escaped( -1 ) or any of our items were chosen we'll
339 * delete the PopupMenu otherwise it's the responsibility of 339 * delete the PopupMenu otherwise it's the responsibility of
340 * the PopupMenu to delete itself 340 * the PopupMenu to delete itself
341 * 341 *
342 */ 342 */
343 else if ( ((BTListItem*)item)->type() == "service") { 343 else if ( ((BTListItem*)item)->type() == "service") {
344 BTServiceItem* service = (BTServiceItem*)item; 344 BTServiceItem* service = (BTServiceItem*)item;
345 QMap<int, QString> list = service->services().classIdList(); 345 QMap<int, QString> list = service->services().classIdList();
346 QMap<int, QString>::Iterator it = list.begin(); 346 QMap<int, QString>::Iterator it = list.begin();
347 QPopupMenu *popup =0l; 347 QPopupMenu *popup =0l;
348 popup->insertItem( (service->services()).serviceName() );
349 popup->insertSeparator();
350 if ( it != list.end() ) { 348 if ( it != list.end() ) {
351 qWarning("Searching id %d %s", it.key(), it.data().latin1() ); 349 qWarning("Searching id %d %s", it.key(), it.data().latin1() );
352 popup = m_popHelper.find( it.key() /*1*/, 350 popup = m_popHelper.find( it.key() /*1*/,
353 service->services(), 351 service->services(),
354 (BTDeviceItem*)service->parent() ); 352 (BTDeviceItem*)service->parent() );
355 }else { 353 }else {
356 qWarning("Empty"); 354 qWarning("Empty");
357 } 355 }
358 356
359 if ( popup == 0l ) { 357 if ( popup == 0l ) {
360 qWarning("factory returned 0l"); 358 qWarning("factory returned 0l");
361 popup = new QPopupMenu(); 359 popup = new QPopupMenu();
362 } 360 }
363 361 int test1 = popup->insertItem( tr("Test1:"), 2);
364 int test1 = popup->insertItem( tr("Test1:"), 0);
365 362
366 ret = popup->exec( point ); 363 ret = popup->exec( point );
367 qWarning("returned from exec() "); 364 qWarning("returned from exec() ");
368 if ( ret == -1 ) { 365 if ( ret == -1 ) {
369 ; 366 ;
370 } else if ( ret == test1 ) { 367 } else if ( ret == test1 ) {
371 ; 368 ;
372 } 369 }
373 delete popup; 370 delete popup;
374 } 371 }
375 delete menu; 372 delete menu;
376} 373}
377 374
378 375
379/** 376/**
380 * 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)
381 * @param item the service item returned 378 * @param item the service item returned
382 */ 379 */
383void BlueBase::addServicesToDevice( BTDeviceItem * item ) { 380void BlueBase::addServicesToDevice( BTDeviceItem * item ) {
384 qDebug("addServicesToDevice"); 381 qDebug("addServicesToDevice");
385 // row of mac adress text(3) 382 // row of mac adress text(3)
386 RemoteDevice device = item->remoteDevice(); 383 RemoteDevice device = item->remoteDevice();
387 m_deviceList.insert( item->mac() , item ); 384 m_deviceList.insert( item->mac() , item );
388 // 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
389 m_localDevice->searchServices( device ); 386 m_localDevice->searchServices( device );
390} 387}
391 388
392 389
393/** 390/**
394 * 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
395 * @param device the mac address of the remote device 392 * @param device the mac address of the remote device
396 * @param servicesList the list with the service the device has. 393 * @param servicesList the list with the service the device has.