summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_bt.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/io_bt.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_bt.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp
index 4486eea..8dd8151 100644
--- a/noncore/apps/opie-console/io_bt.cpp
+++ b/noncore/apps/opie-console/io_bt.cpp
@@ -23,8 +23,9 @@ void IOBt::close() {
23 } 23 }
24} 24}
25 25
26bool IOBt::open() { 26bool IOBt::open() {
27 bool ret = false;
27 28
28 // only set up bt stuff if mac address was set, otherwise use the device set 29 // only set up bt stuff if mac address was set, otherwise use the device set
29 if ( !m_mac.isEmpty() ) { 30 if ( !m_mac.isEmpty() ) {
30 31
@@ -38,9 +39,9 @@ bool IOBt::open() {
38 connect( m_attach, SIGNAL( processExited( OProcess* ) ), 39 connect( m_attach, SIGNAL( processExited( OProcess* ) ),
39 this, SLOT( slotExited( OProcess* ) ) ); 40 this, SLOT( slotExited( OProcess* ) ) );
40 41
41 if ( m_attach->start() ) { 42 if ( m_attach->start() ) {
42 IOSerial::open(); 43 ret = IOSerial::open();
43 } else { 44 } else {
44 qWarning("could not attach to device"); 45 qWarning("could not attach to device");
45 delete m_attach; 46 delete m_attach;
46 m_attach = 0; 47 m_attach = 0;
@@ -48,10 +49,11 @@ bool IOBt::open() {
48 } else { 49 } else {
49 // directly to the normal serial 50 // directly to the normal serial
50 // TODO: look first if the connection really exists. ( is set up ) 51 // TODO: look first if the connection really exists. ( is set up )
51 52
52 IOSerial::open(); 53 ret =IOSerial::open();
53 } 54 }
55 return ret;
54} 56}
55 57
56void IOBt::reload( const Profile &config ) { 58void IOBt::reload( const Profile &config ) {
57 m_device = config.readEntry("Device", BT_DEFAULT_DEVICE); 59 m_device = config.readEntry("Device", BT_DEFAULT_DEVICE);
@@ -73,5 +75,6 @@ QString IOBt::name() const {
73} 75}
74 76
75void IOBt::slotExited( OProcess* proc ){ 77void IOBt::slotExited( OProcess* proc ){
76 close(); 78 close();
79 delete proc;
77} 80}