summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/Opietooth.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/Opietooth.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
index b14cc2f..8323549 100644
--- a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
+++ b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
@@ -528,25 +528,25 @@ void OTScan::SLOT_Selected( QListViewItem * it ) {
528 // store result 528 // store result
529 SelectedPeer = ((PeerLVI *)it->parent())->peer(); 529 SelectedPeer = ((PeerLVI *)it->parent())->peer();
530 SelectedChannel = ((ChannelLVI *)it)->channel(); 530 SelectedChannel = ((ChannelLVI *)it)->channel();
531 } else { 531 } else {
532 // click on device 532 // click on device
533 if( it->depth() != 0 ) { 533 if( it->depth() != 0 ) {
534 return; 534 return;
535 } 535 }
536 536
537 SelectedPeer = ((PeerLVI *)it)->peer(); 537 SelectedPeer = ((PeerLVI *)it)->peer();
538 SelectedChannel = 0; 538 SelectedChannel = 0;
539 } 539 }
540 owarn << "Selected " << SelectedPeer->address().toString() << 540 odebug << "Selected " << SelectedPeer->address().toString() <<
541 " Channel " << SelectedChannel << oendl; 541 " Channel " << SelectedChannel << oendl;
542 emit selected(); 542 emit selected();
543} 543}
544 544
545void OTScan::SLOT_FinishedDetecting( ) { 545void OTScan::SLOT_FinishedDetecting( ) {
546 scanMode( false ); 546 scanMode( false );
547} 547}
548 548
549void OTScan::SLOT_CleanupOld( ) { 549void OTScan::SLOT_CleanupOld( ) {
550 550
551 // iterate over all peers and find those that 551 // iterate over all peers and find those that
552 // are down and have no pairing info 552 // are down and have no pairing info
@@ -556,66 +556,66 @@ void OTScan::SLOT_CleanupOld( ) {
556 QListViewItem * Lit = DetectedPeers_LV->firstChild(); 556 QListViewItem * Lit = DetectedPeers_LV->firstChild();
557 while( Lit ) { 557 while( Lit ) {
558 TheP = ((PeerLVI *)Lit)->peer(); 558 TheP = ((PeerLVI *)Lit)->peer();
559 if( TheP->state() == OTPeer::Peer_Down ) { 559 if( TheP->state() == OTPeer::Peer_Down ) {
560 unsigned int k; 560 unsigned int k;
561 561
562 // what about linkkeys ? 562 // what about linkkeys ?
563 for( k = 0; k < Keys.count(); k ++ ) { 563 for( k = 0; k < Keys.count(); k ++ ) {
564 if( TheP->address() == Keys[k].to() || 564 if( TheP->address() == Keys[k].to() ||
565 TheP->address() == Keys[k].from() 565 TheP->address() == Keys[k].from()
566 ) { 566 ) {
567 // part of linkkey 567 // part of linkkey
568 owarn << "LINKKEY " << TheP->address().toString() << oendl; 568 odebug << "LINKKEY " << TheP->address().toString() << oendl;
569 break; 569 break;
570 } 570 }
571 } 571 }
572 572
573 if( k == Keys.count() ) { 573 if( k == Keys.count() ) {
574 owarn << "RM LINKKEY " << TheP->address().toString() << oendl; 574 odebug << "RM LINKKEY " << TheP->address().toString() << oendl;
575 // not found -> remember to remove this peer 575 // not found -> remember to remove this peer
576 QListViewItem * Nit; 576 QListViewItem * Nit;
577 OT->removePeer( TheP ); 577 OT->removePeer( TheP );
578 Nit = Lit->nextSibling(); 578 Nit = Lit->nextSibling();
579 delete Lit; 579 delete Lit;
580 Lit = Nit; 580 Lit = Nit;
581 continue; 581 continue;
582 } 582 }
583 } else { 583 } else {
584 owarn << "NODOWN " << TheP->address().toString() << oendl; 584 odebug << "NODOWN " << TheP->address().toString() << oendl;
585 } 585 }
586 586
587 Lit = Lit->nextSibling(); 587 Lit = Lit->nextSibling();
588 } 588 }
589} 589}
590 590
591void OTScan::SLOT_NewPeer( OTPeer * P, bool IsNew ){ 591void OTScan::SLOT_NewPeer( OTPeer * P, bool IsNew ){
592 PeerLVI * it = 0; 592 PeerLVI * it = 0;
593 593
594 if( IsNew ) { 594 if( IsNew ) {
595 it = new PeerLVI( P, DetectedPeers_LV ); 595 it = new PeerLVI( P, DetectedPeers_LV );
596 } else { 596 } else {
597 // find peer in table 597 // find peer in table
598 QListViewItem * Lit = DetectedPeers_LV->firstChild(); 598 QListViewItem * Lit = DetectedPeers_LV->firstChild();
599 while( Lit ) { 599 while( Lit ) {
600 if( ((PeerLVI *)Lit)->peer() == P ) { 600 if( ((PeerLVI *)Lit)->peer() == P ) {
601 // this item 601 // this item
602 it = (PeerLVI *)Lit; 602 it = (PeerLVI *)Lit;
603 break; 603 break;
604 } 604 }
605 Lit = Lit->nextSibling(); 605 Lit = Lit->nextSibling();
606 } 606 }
607 607
608 if( ! it ) { 608 if( ! it ) {
609 owarn << "Should not occur" << oendl; 609 odebug << "Should not occur" << oendl;
610 return; 610 return;
611 } 611 }
612 } 612 }
613 613
614 // update/show info 614 // update/show info
615 it->setText( 0, P->name() ); 615 it->setText( 0, P->name() );
616 it->setPixmap(0, Icons->deviceIcon( 616 it->setPixmap(0, Icons->deviceIcon(
617 OT->deviceTypeToName( P->deviceClass() ) ) ); 617 OT->deviceTypeToName( P->deviceClass() ) ) );
618 618
619 // tell peer to report its state async 619 // tell peer to report its state async
620 connect( P, 620 connect( P,
621 SIGNAL( peerStateReport( OTPeer *)), 621 SIGNAL( peerStateReport( OTPeer *)),
@@ -920,25 +920,25 @@ void OTManage::SLOT_ShowDriver( QListViewItem * It ) {
920 // not toplevel 920 // not toplevel
921 return; 921 return;
922 922
923 DriverLVI * it = (DriverLVI *) It; 923 DriverLVI * it = (DriverLVI *) It;
924 DriverIsUp_CB->setChecked( it->driver()->isUp() ); 924 DriverIsUp_CB->setChecked( it->driver()->isUp() );
925} 925}
926 926
927void OTManage::SLOT_UpDriver( bool Up ) { 927void OTManage::SLOT_UpDriver( bool Up ) {
928 QListViewItem * it = AllDrivers_LV->firstChild(); 928 QListViewItem * it = AllDrivers_LV->firstChild();
929 while( it ) { 929 while( it ) {
930 if( it->isSelected() ) { 930 if( it->isSelected() ) {
931 OTDriver * D = ((DriverLVI *)it)->driver(); 931 OTDriver * D = ((DriverLVI *)it)->driver();
932 owarn << "UP driver " << D->devname() << oendl; 932 odebug << "UP driver " << D->devname() << oendl;
933 // this 933 // this
934 D->setUp( Up ); 934 D->setUp( Up );
935 return; 935 return;
936 } 936 }
937 it = it->nextSibling(); 937 it = it->nextSibling();
938 } 938 }
939} 939}
940 940
941void OTManage::SLOT_StateChange( OTDriver * D, bool Up ) { 941void OTManage::SLOT_StateChange( OTDriver * D, bool Up ) {
942 QListViewItem * it = AllDrivers_LV->firstChild(); 942 QListViewItem * it = AllDrivers_LV->firstChild();
943 while( it ) { 943 while( it ) {
944 if( ((DriverLVI *)it)->driver() == D ) { 944 if( ((DriverLVI *)it)->driver() == D ) {