-rw-r--r-- | core/obex/obex.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/obex/obex.cc b/core/obex/obex.cc index 83d1faf..92cd317 100644 --- a/core/obex/obex.cc +++ b/core/obex/obex.cc @@ -1,14 +1,15 @@ #include <qapplication.h> +#include <qfile.h> #include <qmessagebox.h> #include <qpe/qcopenvelope_qws.h> #include <opie/oprocess.h> #include "obex.h" using namespace OpieObex; Obex::Obex( QObject *parent, const char* name ) : QObject(parent, name ) { m_rec = 0; m_send=0; @@ -39,25 +40,25 @@ void Obex::receive() { if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning("could not start :("); emit done( false ); delete m_rec; m_rec = 0; } // emit currentTry(m_count ); } void Obex::send( const QString& fileName) { // if currently receiving stop it send receive m_count = 0; m_file = fileName; - qWarning("send"); + qWarning("send %s", fileName.latin1() ); if (m_rec != 0 ) { qWarning("running"); if (m_rec->isRunning() ) { emit error(-1 ); qWarning("is running"); delete m_rec; m_rec = 0; }else{ qWarning("is not running"); emit error( -1 ); // we did not delete yet but it's not running slotExited is pending return; @@ -66,25 +67,25 @@ void Obex::send( const QString& fileName) { // if currently receiving stop it se sendNow(); } void Obex::sendNow(){ qWarning("sendNow"); if ( m_count >= 25 ) { // could not send emit error(-1 ); emit sent(false); return; } // OProcess inititialisation m_send = new OProcess(); *m_send << "irobex_palm3"; - *m_send << m_file; + *m_send << QFile::encodeName(m_file); // connect to slots Exited and and StdOut connect(m_send, SIGNAL(processExited(OProcess*) ), this, SLOT(slotExited(OProcess*)) ); connect(m_send, SIGNAL(receivedStdout(OProcess*, char*, int )), this, SLOT(slotStdOut(OProcess*, char*, int) ) ); // now start it if (!m_send->start(/*OProcess::NotifyOnExit, OProcess::AllOutput*/ ) ) { qWarning("could not send" ); m_count = 25; emit error(-1 ); |