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.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/io_irda.cpp b/noncore/apps/opie-console/io_irda.cpp
index 56a373c..b3b693f 100644
--- a/noncore/apps/opie-console/io_irda.cpp
+++ b/noncore/apps/opie-console/io_irda.cpp
@@ -18,28 +18,30 @@ void IOIrda::close() {
18 IOSerial::close(); 18 IOSerial::close();
19 // still need error handling 19 // still need error handling
20 delete m_attach; 20 delete m_attach;
21} 21}
22 22
23bool IOIrda::open() { 23bool IOIrda::open() {
24 bool ret;
24 25
25 // irdaattach here 26 // irdaattach here
26 m_attach = new OProcess(); 27 m_attach = new OProcess();
27 *m_attach << "irattach /dev/ttyS2 -s"; 28 *m_attach << "irattach /dev/ttyS2 -s";
28 29
29 connect( m_attach, SIGNAL( processExited( OProcess* ) ), 30 connect( m_attach, SIGNAL( processExited( OProcess* ) ),
30 this, SLOT( slotExited( OProcess* ) ) ); 31 this, SLOT( slotExited( OProcess* ) ) );
31 32
32 if ( m_attach->start() ) { 33 if ( m_attach->start() ) {
33 IOSerial::open(); 34 ret= IOSerial::open();
34 } else { 35 } else {
35 // emit error!!! 36 // emit error!!!
36 qWarning("could not attach to device"); 37 qWarning("could not attach to device");
37 delete m_attach; 38 delete m_attach;
38 m_attach = 0l; 39 m_attach = 0l;
39 } 40 }
41 return ret;
40} 42}
41 43
42void IOIrda::reload( const Profile &config ) { 44void IOIrda::reload( const Profile &config ) {
43 m_device = config.readEntry("Device", IRDA_DEFAULT_DEVICE); 45 m_device = config.readEntry("Device", IRDA_DEFAULT_DEVICE);
44 m_baud = config.readNumEntry("Baud", IRDA_DEFAULT_BAUD); 46 m_baud = config.readNumEntry("Baud", IRDA_DEFAULT_BAUD);
45 m_parity = config.readNumEntry("Parity", IRDA_DEFAULT_PARITY); 47 m_parity = config.readNumEntry("Parity", IRDA_DEFAULT_PARITY);
@@ -56,7 +58,8 @@ QString IOIrda::identifier() const {
56QString IOIrda::name() const { 58QString IOIrda::name() const {
57 return "Irda IO Layer"; 59 return "Irda IO Layer";
58} 60}
59 61
60void IOIrda::slotExited(OProcess* proc ){ 62void IOIrda::slotExited(OProcess* proc ){
61 close(); 63 close();
64 delete proc;
62} 65}