-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/panpopup.cpp | 1 |
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 break; } delete groups; } /* * We got service sensitive PopupMenus in our factory * We will create one through the factory and will insert * our Separator + ShowInfo into the menu or create a new * one if the factory returns 0 * PopupMenu deletion is kind of weird. * If escaped( -1 ) or any of our items were chosen we'll * delete the PopupMenu otherwise it's the responsibility of * the PopupMenu to delete itself * */ else if ( ((BTListItem*)item)->type() == "service") { BTServiceItem* service = (BTServiceItem*)item; QMap<int, QString> list = service->services().classIdList(); QMap<int, QString>::Iterator it = list.begin(); QPopupMenu *popup =0l; if ( it != list.end() ) { qWarning("Searching id %d %s", it.key(), it.data().latin1() ); - popup = m_popHelper.find( 4358, + popup = m_popHelper.find( it.key(), service->services(), (BTDeviceItem*)service->parent() ); }else { qWarning("Empty"); } if ( popup == 0l ) { qWarning("factory returned 0l"); popup = new QPopupMenu(); } int test1 = popup->insertItem( tr("Test1:"), 2); ret = popup->exec( point ); qWarning("returned from exec() "); if ( ret == -1 ) { ; } else if ( ret == test1 ) { ; } delete popup; } delete menu; } 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() { a = new QAction(); // so it's get deleted a->setText( tr("connect") ); a->addTo( this ); connect( a, SIGNAL( activated() ), this, SLOT( slotConnect() ) ); b = new QAction(); b->setText( tr( "connect+conf" ) ); b->addTo( this ); connect( b, SIGNAL( activated() ), this, SLOT( slotConnectAndConfig() ) ); c = new QAction(); c->setText( tr( "disconnect" ) ); c->addTo( this ); connect( c, SIGNAL( activated() ), this, SLOT( slotDisconnect() ) ); }; PanPopup::~PanPopup() { } void PanPopup::slotConnect() { + m_panconnection = new StartPanConnection( m_item->mac() ); m_panconnection->start(); } void PanPopup::slotDisconnect() { m_panconnection->stop(); } void PanPopup::slotConnectAndConfig() { slotConnect(); // more intelligence here later like passing the device ( bnepX ) QCopEnvelope e( "QPE/System", "execute(QString)" ); e << QString( "networksetup" ); } |