-rw-r--r-- | core/applets/obex/obex.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/core/applets/obex/obex.cc b/core/applets/obex/obex.cc index f35d57a..683964b 100644 --- a/core/applets/obex/obex.cc +++ b/core/applets/obex/obex.cc | |||
@@ -1,19 +1,20 @@ | |||
1 | 1 | ||
2 | #include <qapplication.h> | 2 | #include <qapplication.h> |
3 | 3 | #include <qmessagebox.h> | |
4 | #include <qpe/qcopenvelope_qws.h> | ||
4 | #include <opie/oprocess.h> | 5 | #include <opie/oprocess.h> |
5 | #include "obex.h" | 6 | #include "obex.h" |
6 | 7 | ||
7 | using namespace OpieObex; | 8 | using namespace OpieObex; |
8 | 9 | ||
9 | Obex::Obex( QObject *parent, const char* name ) | 10 | Obex::Obex( QObject *parent, const char* name ) |
10 | : QObject(parent, name ) | 11 | : QObject(parent, name ) |
11 | { | 12 | { |
12 | m_rec = 0; | 13 | m_rec = 0; |
13 | m_send=0; | 14 | m_send=0; |
14 | m_count = 0; | 15 | m_count = 0; |
15 | }; | 16 | }; |
16 | Obex::~Obex() { | 17 | Obex::~Obex() { |
17 | delete m_rec; | 18 | delete m_rec; |
18 | delete m_send; | 19 | delete m_send; |
19 | } | 20 | } |
@@ -24,10 +25,10 @@ void Obex::receive() { | |||
24 | // connect to the necessary slots | 25 | // connect to the necessary slots |
25 | connect(m_rec, SIGNAL(processExited(OProcess*) ), | 26 | connect(m_rec, SIGNAL(processExited(OProcess*) ), |
26 | this, SLOT(slotExited(OProcess*) ) ); | 27 | this, SLOT(slotExited(OProcess*) ) ); |
27 | 28 | ||
28 | connect(m_rec, SIGNAL(receivedStdout(OProcess*, char*, int ) ), | 29 | connect(m_rec, SIGNAL(receivedStdout(OProcess*, char*, int ) ), |
29 | this, SLOT(slotStdOut(OProcess*, char*, int) ) ); | 30 | this, SLOT(slotStdOut(OProcess*, char*, int) ) ); |
30 | 31 | ||
31 | if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 32 | if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
32 | qWarning("could not start :("); | 33 | qWarning("could not start :("); |
33 | emit done( false ); | 34 | emit done( false ); |
@@ -49,11 +50,11 @@ void Obex::sendNow(){ | |||
49 | m_send = new OProcess(); | 50 | m_send = new OProcess(); |
50 | *m_send << "irobex_palm3"; | 51 | *m_send << "irobex_palm3"; |
51 | *m_send << m_file; | 52 | *m_send << m_file; |
52 | 53 | ||
53 | // connect to slots Exited and and StdOut | 54 | // connect to slots Exited and and StdOut |
54 | connect(m_send, SIGNAL(processExited(OProcess*) ), | 55 | connect(m_send, SIGNAL(processExited(OProcess*) ), |
55 | this, SLOT(slotExited(OProcess*)) ); | 56 | this, SLOT(slotExited(OProcess*)) ); |
56 | connect(m_send, SIGNAL(receivedStdout(OProcess*, char*, int )), | 57 | connect(m_send, SIGNAL(receivedStdout(OProcess*, char*, int )), |
57 | this, SLOT(slotStdOut(OProcess*, char*, int) ) ); | 58 | this, SLOT(slotStdOut(OProcess*, char*, int) ) ); |
58 | // now start it | 59 | // now start it |
59 | if (!m_send->start(/*OProcess::NotifyOnExit, OProcess::AllOutput*/ ) ) { | 60 | if (!m_send->start(/*OProcess::NotifyOnExit, OProcess::AllOutput*/ ) ) { |
@@ -91,6 +92,7 @@ void Obex::recieved() { | |||
91 | }; | 92 | }; |
92 | delete m_rec; | 93 | delete m_rec; |
93 | } | 94 | } |
95 | |||
94 | void Obex::sendEnd() { | 96 | void Obex::sendEnd() { |
95 | if (m_send->normalExit() ) { | 97 | if (m_send->normalExit() ) { |
96 | if ( m_send->exitStatus() == 0 ) { | 98 | if ( m_send->exitStatus() == 0 ) { |