Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/Opietooth.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/Opietooth.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp index 8323549..fc30bf8 100644 --- a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp +++ b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp | |||
@@ -181,13 +181,12 @@ void OTSniffing::SLOT_Trace( bool Run ) { | |||
181 | HciDump = 0; | 181 | HciDump = 0; |
182 | } | 182 | } |
183 | 183 | ||
184 | } | 184 | } |
185 | 185 | ||
186 | void OTSniffing::SLOT_Show( const QString & S ) { | 186 | void OTSniffing::SLOT_Show( const QString & S ) { |
187 | printf( "%s\n", S.latin1() ); | ||
188 | Output_TV->setText( Output_TV->text() + S + "\n" ); | 187 | Output_TV->setText( Output_TV->text() + S + "\n" ); |
189 | 188 | ||
190 | QScrollBar *scroll = Output_TV->verticalScrollBar(); | 189 | QScrollBar *scroll = Output_TV->verticalScrollBar(); |
191 | scroll->setValue(scroll->maxValue()); | 190 | scroll->setValue(scroll->maxValue()); |
192 | //Output_LB->insertItem( S ); | 191 | //Output_LB->insertItem( S ); |
193 | //Output_LB->setCurrentItem( Output_LB->count()-1 ); | 192 | //Output_LB->setCurrentItem( Output_LB->count()-1 ); |
@@ -374,12 +373,13 @@ void OTPairing::SLOT_Unpair( ) { | |||
374 | // | 373 | // |
375 | 374 | ||
376 | OTScan::OTScan( QWidget * parent, OTIcons * _IC ) : | 375 | OTScan::OTScan( QWidget * parent, OTIcons * _IC ) : |
377 | OTScanGUI( parent ), Filter() { | 376 | OTScanGUI( parent ), Filter() { |
378 | 377 | ||
379 | OT = OTGateway::getOTGateway(); | 378 | OT = OTGateway::getOTGateway(); |
379 | |||
380 | Icons = (_IC ) ? _IC : new OTIcons(); | 380 | Icons = (_IC ) ? _IC : new OTIcons(); |
381 | MyIcons = (_IC == 0 ); | 381 | MyIcons = (_IC == 0 ); |
382 | DetectedPeers_LV->header()->hide(); | 382 | DetectedPeers_LV->header()->hide(); |
383 | Current = 0; | 383 | Current = 0; |
384 | SelectedPeer = 0; | 384 | SelectedPeer = 0; |
385 | SelectedChannel = 0; | 385 | SelectedChannel = 0; |
@@ -441,12 +441,20 @@ int OTScan::getDevice( OTPeer *& Peer, | |||
441 | OTGateway * OT, | 441 | OTGateway * OT, |
442 | const UUIDVector & Filter, | 442 | const UUIDVector & Filter, |
443 | QWidget* Parent ) { | 443 | QWidget* Parent ) { |
444 | bool IsUp = 0; | 444 | bool IsUp = 0; |
445 | unsigned int i; | 445 | unsigned int i; |
446 | 446 | ||
447 | if( ! OT->isEnabled() ) { | ||
448 | QMessageBox::warning( 0, | ||
449 | tr("Scanning problem"), | ||
450 | tr("Bluetooth not enabled" ) | ||
451 | ); | ||
452 | return QDialog::Rejected; | ||
453 | } | ||
454 | |||
447 | // check if bluetooth is up | 455 | // check if bluetooth is up |
448 | OTDriverList & DL = OT->getDriverList(); | 456 | OTDriverList & DL = OT->getDriverList(); |
449 | for( i = 0; | 457 | for( i = 0; |
450 | i < DL.count(); | 458 | i < DL.count(); |
451 | i ++ ) { | 459 | i ++ ) { |
452 | if( DL[i]->isUp() ) { | 460 | if( DL[i]->isUp() ) { |