From 086b00610edfb25fb25cf54a0f8da8a16b55246a Mon Sep 17 00:00:00 2001 From: harlekin Date: Sun, 21 Jul 2002 20:02:13 +0000 Subject: connection to popups on services --- (limited to 'noncore/net/opietooth/manager/bluebase.cpp') diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index c81d4d1..ec05a95 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp @@ -285,6 +285,8 @@ void BlueBase::startServiceActionClicked( QListViewItem */*item*/ ) { * Action that are toggled on hold (mostly QPopups i guess) */ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & point, int /*column*/ ) { + if (!item ) + return; QPopupMenu *menu = new QPopupMenu(); int ret=0; @@ -342,9 +344,9 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin QPopupMenu *popup =0l; if ( it != list.end() ) { qWarning("Searching id %d %s", it.key(), it.data().latin1() ); - popup = m_popHelper.find( it.key(), + popup = m_popHelper.find( it.key() /*1*/, service->services(), - service->parent() ); + (BTDeviceItem*)service->parent() ); }else { qWarning("Empty"); } @@ -359,17 +361,18 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin int del = popup->insertItem( tr("delete"), 2); ret = popup->exec( point ); - + qWarning("returned from exec() "); if ( ret == -1 ) - delete popup; + ; else if ( ret == test1 ) - delete popup; + ; else if ( ret == con ) - delete popup; + ; else if ( ret == del ) { // take item first? -zecke delete item; } + delete popup; } delete menu; } -- cgit v0.9.0.2