summaryrefslogtreecommitdiff
path: root/core/obex/obex.cc
Unidiff
Diffstat (limited to 'core/obex/obex.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/obex.cc15
1 files changed, 3 insertions, 12 deletions
diff --git a/core/obex/obex.cc b/core/obex/obex.cc
index 595fed9..2a306de 100644
--- a/core/obex/obex.cc
+++ b/core/obex/obex.cc
@@ -11,6 +11,8 @@
11 11
12using namespace OpieObex; 12using namespace OpieObex;
13 13
14/* TRANSLATOR OpieObex::Obex */
15
14Obex::Obex( QObject *parent, const char* name ) 16Obex::Obex( QObject *parent, const char* name )
15 : QObject(parent, name ) 17 : QObject(parent, name )
16{ 18{
@@ -109,11 +111,7 @@ void Obex::slotExited(OProcess* proc ){
109} 111}
110void Obex::slotStdOut(OProcess* proc, char* buf, int len){ 112void Obex::slotStdOut(OProcess* proc, char* buf, int len){
111 if ( proc == m_rec ) { // only receive 113 if ( proc == m_rec ) { // only receive
112 for (int i = 0; i < len; i++ ) { 114 QByteArray ar( len );
113 printf("%c", buf[i] );
114 }
115 printf("\n");
116 QByteArray ar( len );
117 memcpy( ar.data(), buf, len ); 115 memcpy( ar.data(), buf, len );
118 qWarning("parsed: %s", ar.data() ); 116 qWarning("parsed: %s", ar.data() );
119 m_outp.append( ar ); 117 m_outp.append( ar );
@@ -125,13 +123,6 @@ void Obex::received() {
125 if ( m_rec->exitStatus() == 0 ) { // we got one 123 if ( m_rec->exitStatus() == 0 ) { // we got one
126 QString filename = parseOut(); 124 QString filename = parseOut();
127 qWarning("ACHTUNG %s", filename.latin1() ); 125 qWarning("ACHTUNG %s", filename.latin1() );
128 if (filename.contains( 'ö' ) || filename.contains( 'ä' ) || filename.contains('ü' ) ) {
129 qWarning("renaming!!!!");
130 QFileInfo inf( filename );
131 QString newName = "/tmp/opie-obex." + inf.extension();
132 ::rename( QFile::encodeName( filename ).data(), newName );
133 qWarning("name is %s", QFile::encodeName( filename ).data() );
134 }
135 emit receivedFile( filename ); 126 emit receivedFile( filename );
136 } 127 }
137 }else{ 128 }else{