Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 9cfeaa2..189001d 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp @@ -311,12 +311,13 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin delete item; break; } delete groups; } else if ( ((BTListItem*)item)->type() == "service") { + menu->insertItem( tr("Test1:"), 0); menu->insertItem( tr("connect"), 1); menu->insertItem( tr("delete"), 2); ret = menu->exec( point , 0); @@ -367,15 +368,22 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin QValueList<OpieTooth::Services>::Iterator it2; BTServiceItem * serviceItem; if (!servicesList.isEmpty() ) { // add services + QMap<int, QString> list; + QMap<int, QString>::Iterator classIt; for( it2 = servicesList.begin(); it2 != servicesList.end(); ++it2 ) { serviceItem = new BTServiceItem( deviceItem , (*it2) ); - serviceItem->setPixmap( 0, m_iconLoader->serviceIcon( (*it2).classIdList() ) ); + list = (*it2).classIdList(); + classIt = list.begin(); + int classId; + if ( classIt != list.end() ) + classId = classIt.key(); + serviceItem->setPixmap( 0, m_iconLoader->serviceIcon( classId ) ); } } else { Services s1; s1.setServiceName( tr("no serives found") ); serviceItem = new BTServiceItem( deviceItem, s1 ); } |