summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/Opietooth.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/Opietooth.cpp10
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 ) {
HciDump = 0;
}
}
void OTSniffing::SLOT_Show( const QString & S ) {
- printf( "%s\n", S.latin1() );
Output_TV->setText( Output_TV->text() + S + "\n" );
QScrollBar *scroll = Output_TV->verticalScrollBar();
scroll->setValue(scroll->maxValue());
//Output_LB->insertItem( S );
//Output_LB->setCurrentItem( Output_LB->count()-1 );
@@ -374,12 +373,13 @@ void OTPairing::SLOT_Unpair( ) {
//
OTScan::OTScan( QWidget * parent, OTIcons * _IC ) :
OTScanGUI( parent ), Filter() {
OT = OTGateway::getOTGateway();
+
Icons = (_IC ) ? _IC : new OTIcons();
MyIcons = (_IC == 0 );
DetectedPeers_LV->header()->hide();
Current = 0;
SelectedPeer = 0;
SelectedChannel = 0;
@@ -441,12 +441,20 @@ int OTScan::getDevice( OTPeer *& Peer,
OTGateway * OT,
const UUIDVector & Filter,
QWidget* Parent ) {
bool IsUp = 0;
unsigned int i;
+ if( ! OT->isEnabled() ) {
+ QMessageBox::warning( 0,
+ tr("Scanning problem"),
+ tr("Bluetooth not enabled" )
+ );
+ return QDialog::Rejected;
+ }
+
// check if bluetooth is up
OTDriverList & DL = OT->getDriverList();
for( i = 0;
i < DL.count();
i ++ ) {
if( DL[i]->isUp() ) {