author | zecke <zecke> | 2003-02-16 17:50:15 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-02-16 17:50:15 (UTC) |
commit | 62cc9d89378f281c11599f38c3ebe89886b69568 (patch) (unidiff) | |
tree | 7499e9704f66820e785acc8c772e35b4f804aa80 | |
parent | e9e20c4e64b8b228af928822e3d4a49ed773dc2e (diff) | |
download | opie-62cc9d89378f281c11599f38c3ebe89886b69568.zip opie-62cc9d89378f281c11599f38c3ebe89886b69568.tar.gz opie-62cc9d89378f281c11599f38c3ebe89886b69568.tar.bz2 |
Fix getting files
-rw-r--r-- | core/obex/obex.cc | 8 | ||||
-rw-r--r-- | core/obex/receiver.cpp | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/core/obex/obex.cc b/core/obex/obex.cc index 92cd317..b8ed6e0 100644 --- a/core/obex/obex.cc +++ b/core/obex/obex.cc | |||
@@ -17,7 +17,7 @@ Obex::Obex( QObject *parent, const char* name ) | |||
17 | m_receive = false; | 17 | m_receive = false; |
18 | connect( this, SIGNAL(error(int) ), // for recovering to receive | 18 | connect( this, SIGNAL(error(int) ), // for recovering to receive |
19 | SLOT(slotError() ) ); | 19 | SLOT(slotError() ) ); |
20 | connect( this, SIGNAL(sent() ), | 20 | connect( this, SIGNAL(sent(bool) ), |
21 | SLOT(slotError() ) ); | 21 | SLOT(slotError() ) ); |
22 | }; | 22 | }; |
23 | Obex::~Obex() { | 23 | Obex::~Obex() { |
@@ -106,8 +106,8 @@ void Obex::slotExited(OProcess* proc ){ | |||
106 | } | 106 | } |
107 | void Obex::slotStdOut(OProcess* proc, char* buf, int len){ | 107 | void Obex::slotStdOut(OProcess* proc, char* buf, int len){ |
108 | if ( proc == m_rec ) { // only receive | 108 | if ( proc == m_rec ) { // only receive |
109 | QCString cstring( buf, len ); | 109 | QString str = QString::fromUtf8( buf, len ); |
110 | m_outp.append( cstring.data() ); | 110 | m_outp.append( str ); |
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
@@ -115,7 +115,7 @@ void Obex::received() { | |||
115 | if (m_rec->normalExit() ) { | 115 | if (m_rec->normalExit() ) { |
116 | if ( m_rec->exitStatus() == 0 ) { // we got one | 116 | if ( m_rec->exitStatus() == 0 ) { // we got one |
117 | QString filename = parseOut(); | 117 | QString filename = parseOut(); |
118 | qWarning("ACHTUNG"); | 118 | qWarning("ACHTUNG %s", filename.latin1() ); |
119 | emit receivedFile( filename ); | 119 | emit receivedFile( filename ); |
120 | } | 120 | } |
121 | }else{ | 121 | }else{ |
diff --git a/core/obex/receiver.cpp b/core/obex/receiver.cpp index 50ee6cb..d5a7271 100644 --- a/core/obex/receiver.cpp +++ b/core/obex/receiver.cpp | |||
@@ -60,6 +60,7 @@ void Receiver::handleOther( const QString& other ) { | |||
60 | hand->handle( other ); | 60 | hand->handle( other ); |
61 | } | 61 | } |
62 | int Receiver::checkFile( const QString& file ) { | 62 | int Receiver::checkFile( const QString& file ) { |
63 | qWarning("check file!! %s", file.latin1() ); | ||
63 | int ret; | 64 | int ret; |
64 | if (file.right(4) == ".vcs" ) { | 65 | if (file.right(4) == ".vcs" ) { |
65 | ret = Datebook; | 66 | ret = Datebook; |
@@ -68,6 +69,8 @@ int Receiver::checkFile( const QString& file ) { | |||
68 | }else | 69 | }else |
69 | ret = Other; | 70 | ret = Other; |
70 | 71 | ||
72 | |||
73 | qWarning("check it now %d", ret ); | ||
71 | return ret; | 74 | return ret; |
72 | } | 75 | } |
73 | 76 | ||
@@ -106,6 +109,7 @@ void OtherHandler::handle( const QString& file ) { | |||
106 | m_file = file; | 109 | m_file = file; |
107 | m_na->setText(file); | 110 | m_na->setText(file); |
108 | DocLnk lnk(file); | 111 | DocLnk lnk(file); |
112 | qWarning(" %s %s", lnk.type().latin1(), lnk.icon().latin1() ); | ||
109 | 113 | ||
110 | QString str = tr("<p>You received a file of type %1 (<img src=\"%2\"> )What do you want to do?").arg(lnk.type() ).arg(lnk.icon() ); | 114 | QString str = tr("<p>You received a file of type %1 (<img src=\"%2\"> )What do you want to do?").arg(lnk.type() ).arg(lnk.icon() ); |
111 | m_view->setText( str ); | 115 | m_view->setText( str ); |