summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/io_irda.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/io_irda.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/io_irda.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp
index ba0b0e5..07c2b62 100644
--- a/noncore/apps/opie-console/io_irda.cpp
+++ b/noncore/apps/opie-console/io_irda.cpp
@@ -1,17 +1,16 @@
1 1
2#include "io_irda.h" 2#include "io_irda.h"
3 3
4using namespace Opie::Core; 4using namespace Opie::Core;
5using namespace Opie::Core;
6IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) { 5IOIrda::IOIrda( const Profile &config ) : IOSerial( config ) {
7 m_attach = 0; 6 m_attach = 0;
8} 7}
9 8
10 9
11IOIrda::~IOIrda() { 10IOIrda::~IOIrda() {
12 if ( m_attach ) { 11 if ( m_attach ) {
13 delete m_attach; 12 delete m_attach;
14 } 13 }
15} 14}
16 15
17 16
@@ -21,25 +20,25 @@ void IOIrda::close() {
21 // still need error handling 20 // still need error handling
22 delete m_attach; 21 delete m_attach;
23} 22}
24 23
25bool IOIrda::open() { 24bool IOIrda::open() {
26 bool ret; 25 bool ret;
27 26
28 // irdaattach here 27 // irdaattach here
29 m_attach = new OProcess(); 28 m_attach = new OProcess();
30 *m_attach << "irattach /dev/ttyS2 -s"; 29 *m_attach << "irattach /dev/ttyS2 -s";
31 30
32 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ), 31 connect( m_attach, SIGNAL( processExited(Opie::Core::OProcess*) ),
33 this, SLOT( slotExited(OProcess*) ) ); 32 this, SLOT( slotExited(Opie::Core::OProcess*) ) );
34 33
35 if ( m_attach->start() ) { 34 if ( m_attach->start() ) {
36 ret= IOSerial::open(); 35 ret= IOSerial::open();
37 } else { 36 } else {
38 // emit error!!! 37 // emit error!!!
39 qWarning("could not attach to device"); 38 qWarning("could not attach to device");
40 delete m_attach; 39 delete m_attach;
41 m_attach = 0l; 40 m_attach = 0l;
42 } 41 }
43 return ret; 42 return ret;
44} 43}
45 44