Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 58 |
1 files changed, 27 insertions, 31 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 7954cc3..af1cd23 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -158,5 +158,5 @@ void BlueBase::writeConfig() | |||
158 | void BlueBase::writeToHciConfig() | 158 | void BlueBase::writeToHciConfig() |
159 | { | 159 | { |
160 | owarn << "writeToHciConfig" << oendl; | 160 | owarn << "writeToHciConfig" << oendl; |
161 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); | 161 | HciConfWrapper hciconf ( "/etc/bluetooth/hcid.conf" ); |
162 | hciconf.load(); | 162 | hciconf.load(); |
@@ -319,34 +319,30 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin | |||
319 | 319 | ||
320 | QPopupMenu *menu = new QPopupMenu(); | 320 | QPopupMenu *menu = new QPopupMenu(); |
321 | int ret=0; | ||
322 | 321 | ||
323 | if ( ((BTListItem*)item)->type() == "device") | 322 | if ( static_cast<BTListItem*>( item )->type() == "device") |
324 | { | 323 | { |
325 | |||
326 | QPopupMenu *groups = new QPopupMenu(); | 324 | QPopupMenu *groups = new QPopupMenu(); |
327 | 325 | ||
328 | menu->insertItem( ((BTDeviceItem*)item)->name(),0 ); | 326 | menu->insertItem( static_cast<BTDeviceItem*>( item )->name(), 0 ); |
329 | menu->insertSeparator(1); | 327 | menu->insertSeparator( 1 ); |
330 | menu->insertItem( tr("rescan sevices"), 2); | 328 | menu->insertItem( tr( "&Rescan services" ), 2); |
331 | menu->insertItem( tr("to group"), groups , 3); | 329 | // menu->insertItem( tr( "&Add to group" ), groups, 3); |
332 | menu->insertItem( tr("delete"), 4); | 330 | menu->insertItem( tr( "&Delete"), 4); |
333 | 331 | int ret = menu->exec( point, 0); | |
334 | ret = menu->exec( point , 0); | ||
335 | 332 | ||
336 | switch(ret) | 333 | switch(ret) |
337 | { | 334 | { |
338 | case -1: | 335 | case -1: |
339 | break; | 336 | break; |
340 | case 2: | 337 | case 2: |
341 | addServicesToDevice( (BTDeviceItem*)item ); | 338 | addServicesToDevice( static_cast<BTDeviceItem*>( item ) ); |
342 | break; | 339 | break; |
343 | 340 | ||
344 | case 4: | 341 | case 4: |
345 | // deletes childs too | 342 | // deletes childs too |
346 | delete item; | 343 | delete item; |
347 | break; | 344 | break; |
348 | } | 345 | } |
349 | delete groups; | 346 | // delete groups; |
350 | |||
351 | } | 347 | } |
352 | 348 | ||
@@ -370,5 +366,5 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin | |||
370 | if ( it != list.end() ) | 366 | if ( it != list.end() ) |
371 | { | 367 | { |
372 | owarn << "Searching id " << it.key() << " " << it.data().latin1() << "" << oendl; | 368 | owarn << "Searching id " << it.key() << " " << it.data().latin1() << "" << oendl; |
373 | popup = m_popHelper.find( it.key(), | 369 | popup = m_popHelper.find( it.key(), |
374 | service->services(), | 370 | service->services(), |
@@ -377,16 +373,16 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin | |||
377 | else | 373 | else |
378 | { | 374 | { |
379 | owarn << "Empty" << oendl; | 375 | owarn << "Empty" << oendl; |
380 | } | 376 | } |
381 | 377 | ||
382 | if ( popup == 0l ) | 378 | if ( popup == 0l ) |
383 | { | 379 | { |
384 | owarn << "factory returned 0l" << oendl; | 380 | owarn << "factory returned 0l" << oendl; |
385 | popup = new QPopupMenu(); | 381 | popup = new QPopupMenu(); |
386 | } | 382 | } |
387 | int test1 = popup->insertItem( tr("Test1:"), 2); | 383 | int test1 = popup->insertItem( tr("Test1:"), 2); |
388 | 384 | ||
389 | ret = popup->exec( point ); | 385 | int ret = popup->exec( point ); |
390 | owarn << "returned from exec() " << oendl; | 386 | owarn << "returned from exec() " << oendl; |
391 | if ( ret == -1 ) | 387 | if ( ret == -1 ) |
392 | { | 388 | { |
@@ -409,5 +405,5 @@ void BlueBase::startServiceActionHold( QListViewItem * item, const QPoint & poin | |||
409 | void BlueBase::addServicesToDevice( BTDeviceItem * item ) | 405 | void BlueBase::addServicesToDevice( BTDeviceItem * item ) |
410 | { | 406 | { |
411 | odebug << "addServicesToDevice" << oendl; | 407 | odebug << "addServicesToDevice" << oendl; |
412 | // row of mac adress text(3) | 408 | // row of mac adress text(3) |
413 | RemoteDevice device = item->remoteDevice(); | 409 | RemoteDevice device = item->remoteDevice(); |
@@ -426,5 +422,5 @@ void BlueBase::addServicesToDevice( BTDeviceItem * item ) | |||
426 | void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList ) | 422 | void BlueBase::addServicesToDevice( const QString& device, Services::ValueList servicesList ) |
427 | { | 423 | { |
428 | odebug << "fill services list" << oendl; | 424 | odebug << "fill services list" << oendl; |
429 | 425 | ||
430 | QMap<QString,BTDeviceItem*>::Iterator it; | 426 | QMap<QString,BTDeviceItem*>::Iterator it; |
@@ -610,5 +606,5 @@ void BlueBase::deviceActive( const RemoteDevice &device ) | |||
610 | void BlueBase::deviceActive( const QString& device, bool connected ) | 606 | void BlueBase::deviceActive( const QString& device, bool connected ) |
611 | { | 607 | { |
612 | odebug << "deviceActive slot" << oendl; | 608 | odebug << "deviceActive slot" << oendl; |
613 | 609 | ||
614 | QMap<QString,BTDeviceItem*>::Iterator it; | 610 | QMap<QString,BTDeviceItem*>::Iterator it; |