summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp2
-rw-r--r--noncore/net/opietooth/manager/panpopup.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 04fa117..935c11a 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -312,49 +312,49 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin
312 break; 312 break;
313 } 313 }
314 delete groups; 314 delete groups;
315 315
316 } 316 }
317 317
318 /* 318 /*
319 * We got service sensitive PopupMenus in our factory 319 * We got service sensitive PopupMenus in our factory
320 * We will create one through the factory and will insert 320 * We will create one through the factory and will insert
321 * our Separator + ShowInfo into the menu or create a new 321 * our Separator + ShowInfo into the menu or create a new
322 * one if the factory returns 0 322 * one if the factory returns 0
323 * PopupMenu deletion is kind of weird. 323 * PopupMenu deletion is kind of weird.
324 * If escaped( -1 ) or any of our items were chosen we'll 324 * If escaped( -1 ) or any of our items were chosen we'll
325 * delete the PopupMenu otherwise it's the responsibility of 325 * delete the PopupMenu otherwise it's the responsibility of
326 * the PopupMenu to delete itself 326 * the PopupMenu to delete itself
327 * 327 *
328 */ 328 */
329 else if ( ((BTListItem*)item)->type() == "service") { 329 else if ( ((BTListItem*)item)->type() == "service") {
330 BTServiceItem* service = (BTServiceItem*)item; 330 BTServiceItem* service = (BTServiceItem*)item;
331 QMap<int, QString> list = service->services().classIdList(); 331 QMap<int, QString> list = service->services().classIdList();
332 QMap<int, QString>::Iterator it = list.begin(); 332 QMap<int, QString>::Iterator it = list.begin();
333 QPopupMenu *popup =0l; 333 QPopupMenu *popup =0l;
334 if ( it != list.end() ) { 334 if ( it != list.end() ) {
335 qWarning("Searching id %d %s", it.key(), it.data().latin1() ); 335 qWarning("Searching id %d %s", it.key(), it.data().latin1() );
336 popup = m_popHelper.find( 4358, 336 popup = m_popHelper.find( it.key(),
337 service->services(), 337 service->services(),
338 (BTDeviceItem*)service->parent() ); 338 (BTDeviceItem*)service->parent() );
339 }else { 339 }else {
340 qWarning("Empty"); 340 qWarning("Empty");
341 } 341 }
342 342
343 if ( popup == 0l ) { 343 if ( popup == 0l ) {
344 qWarning("factory returned 0l"); 344 qWarning("factory returned 0l");
345 popup = new QPopupMenu(); 345 popup = new QPopupMenu();
346 } 346 }
347 int test1 = popup->insertItem( tr("Test1:"), 2); 347 int test1 = popup->insertItem( tr("Test1:"), 2);
348 348
349 ret = popup->exec( point ); 349 ret = popup->exec( point );
350 qWarning("returned from exec() "); 350 qWarning("returned from exec() ");
351 if ( ret == -1 ) { 351 if ( ret == -1 ) {
352 ; 352 ;
353 } else if ( ret == test1 ) { 353 } else if ( ret == test1 ) {
354 ; 354 ;
355 } 355 }
356 delete popup; 356 delete popup;
357 } 357 }
358 delete menu; 358 delete menu;
359} 359}
360 360
diff --git a/noncore/net/opietooth/manager/panpopup.cpp b/noncore/net/opietooth/manager/panpopup.cpp
index 61e632b..7a0ee55 100644
--- a/noncore/net/opietooth/manager/panpopup.cpp
+++ b/noncore/net/opietooth/manager/panpopup.cpp
@@ -22,41 +22,42 @@ PanPopup::PanPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() {
22 22
23 a = new QAction(); // so it's get deleted 23 a = new QAction(); // so it's get deleted
24 a->setText( tr("connect") ); 24 a->setText( tr("connect") );
25 a->addTo( this ); 25 a->addTo( this );
26 connect( a, SIGNAL( activated() ), this, SLOT( slotConnect() ) ); 26 connect( a, SIGNAL( activated() ), this, SLOT( slotConnect() ) );
27 27
28 28
29 b = new QAction(); 29 b = new QAction();
30 b->setText( tr( "connect+conf" ) ); 30 b->setText( tr( "connect+conf" ) );
31 b->addTo( this ); 31 b->addTo( this );
32 connect( b, SIGNAL( activated() ), this, SLOT( slotConnectAndConfig() ) ); 32 connect( b, SIGNAL( activated() ), this, SLOT( slotConnectAndConfig() ) );
33 33
34 c = new QAction(); 34 c = new QAction();
35 c->setText( tr( "disconnect" ) ); 35 c->setText( tr( "disconnect" ) );
36 c->addTo( this ); 36 c->addTo( this );
37 connect( c, SIGNAL( activated() ), this, SLOT( slotDisconnect() ) ); 37 connect( c, SIGNAL( activated() ), this, SLOT( slotDisconnect() ) );
38 38
39}; 39};
40 40
41PanPopup::~PanPopup() { 41PanPopup::~PanPopup() {
42 42
43} 43}
44 44
45void PanPopup::slotConnect() { 45void PanPopup::slotConnect() {
46
46 m_panconnection = new StartPanConnection( m_item->mac() ); 47 m_panconnection = new StartPanConnection( m_item->mac() );
47 m_panconnection->start(); 48 m_panconnection->start();
48} 49}
49 50
50void PanPopup::slotDisconnect() { 51void PanPopup::slotDisconnect() {
51 m_panconnection->stop(); 52 m_panconnection->stop();
52} 53}
53 54
54 55
55void PanPopup::slotConnectAndConfig() { 56void PanPopup::slotConnectAndConfig() {
56 slotConnect(); 57 slotConnect();
57 58
58 // more intelligence here later like passing the device ( bnepX ) 59 // more intelligence here later like passing the device ( bnepX )
59 QCopEnvelope e( "QPE/System", "execute(QString)" ); 60 QCopEnvelope e( "QPE/System", "execute(QString)" );
60 e << QString( "networksetup" ); 61 e << QString( "networksetup" );
61 62
62} 63}