bluetoothengine/btui/btuidelegate/btdelegateconnect.cpp
changeset 67 16e4b9007960
parent 57 5ebadcda06cb
equal deleted inserted replaced
65:001a94c71129 67:16e4b9007960
    27 #include "btuiiconutil.h"
    27 #include "btuiiconutil.h"
    28 #include "btdelegatefactory.h"
    28 #include "btdelegatefactory.h"
    29 #include <bluetoothuitrace.h>
    29 #include <bluetoothuitrace.h>
    30 #include <e32property.h>
    30 #include <e32property.h>
    31 #include <ctsydomainpskeys.h>  
    31 #include <ctsydomainpskeys.h>  
       
    32 #include <hbparameterlengthlimiter.h>
    32 
    33 
    33 BtDelegateConnect::BtDelegateConnect(
    34 BtDelegateConnect::BtDelegateConnect(
    34         BtSettingModel* settingModel, 
    35         BtSettingModel* settingModel, 
    35         BtDeviceModel* deviceModel, QObject *parent) :
    36         BtDeviceModel* deviceModel, QObject *parent) :
    36     BtAbstractDelegate(settingModel, deviceModel, parent), mBtengConnMan(0),
    37     BtAbstractDelegate(settingModel, deviceModel, parent), mBtengConnMan(0),
   135         TBTDeviceClass btEngDeviceClass(mCod);
   136         TBTDeviceClass btEngDeviceClass(mCod);
   136         error = mBtengConnMan->Connect(mAddr, btEngDeviceClass);
   137         error = mBtengConnMan->Connect(mAddr, btEngDeviceClass);
   137     }
   138     }
   138     
   139     
   139     if( error ) {
   140     if( error ) {
       
   141     		QString prompt = HbParameterLengthLimiter(hbTrId("txt_bt_info_unable_to_connect_with_bluetooth")).arg(mDeviceName);
       
   142     		HbMessageBox::warning(prompt);
   140         emitCommandComplete(error);
   143         emitCommandComplete(error);
   141     }
   144     }
   142     BOstraceFunctionExit1( DUMMY_DEVLIST, this );
   145     BOstraceFunctionExit1( DUMMY_DEVLIST, this );
   143 }
   146 }
   144 
   147 
   193                     HbMessageBox::Continue | HbMessageBox::Cancel );
   196                     HbMessageBox::Continue | HbMessageBox::Cancel );
   194         }
   197         }
   195     }
   198     }
   196     else {
   199     else {
   197         // command is finished
   200         // command is finished
       
   201         if(aErr){
       
   202         		QString prompt = HbParameterLengthLimiter(hbTrId("txt_bt_info_unable_to_connect_with_bluetooth")).arg(mDeviceName);
       
   203     				HbMessageBox::warning(prompt);
       
   204         }
   198         emitCommandComplete(aErr);
   205         emitCommandComplete(aErr);
   199     }
   206     }
   200     BOstraceFunctionExit1( DUMMY_DEVLIST, this );
   207     BOstraceFunctionExit1( DUMMY_DEVLIST, this );
   201 }
   208 }
   202 
   209