summaryrefslogtreecommitdiff
path: root/core/obex/obex.cc
Side-by-side diff
Diffstat (limited to 'core/obex/obex.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/obex.cc22
1 files changed, 19 insertions, 3 deletions
diff --git a/core/obex/obex.cc b/core/obex/obex.cc
index b8ed6e0..595fed9 100644
--- a/core/obex/obex.cc
+++ b/core/obex/obex.cc
@@ -3,4 +3,7 @@
#include <qfile.h>
-#include <qmessagebox.h>
+#include <qfileinfo.h>
+#include <qtextcodec.h>
+
#include <qpe/qcopenvelope_qws.h>
+
#include <opie/oprocess.h>
@@ -108,4 +111,10 @@ void Obex::slotStdOut(OProcess* proc, char* buf, int len){
if ( proc == m_rec ) { // only receive
- QString str = QString::fromUtf8( buf, len );
- m_outp.append( str );
+ for (int i = 0; i < len; i++ ) {
+ printf("%c", buf[i] );
+ }
+ printf("\n");
+ QByteArray ar( len );
+ memcpy( ar.data(), buf, len );
+ qWarning("parsed: %s", ar.data() );
+ m_outp.append( ar );
}
@@ -118,2 +127,9 @@ void Obex::received() {
qWarning("ACHTUNG %s", filename.latin1() );
+ if (filename.contains( 'ö' ) || filename.contains( 'ä' ) || filename.contains('ü' ) ) {
+ qWarning("renaming!!!!");
+ QFileInfo inf( filename );
+ QString newName = "/tmp/opie-obex." + inf.extension();
+ ::rename( QFile::encodeName( filename ).data(), newName );
+ qWarning("name is %s", QFile::encodeName( filename ).data() );
+ }
emit receivedFile( filename );