-rw-r--r-- | core/obex/receiver.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/core/obex/receiver.cpp b/core/obex/receiver.cpp index d4ae323..7d9a42a 100644 --- a/core/obex/receiver.cpp +++ b/core/obex/receiver.cpp | |||
@@ -76,17 +76,15 @@ void Receiver::tidyUp( QString& _file, const QString& ending) { | |||
76 | if ( fd == -1 ) | 76 | if ( fd == -1 ) |
77 | return; | 77 | return; |
78 | 78 | ||
79 | (void)::strncat( foo, ending.latin1(), 4 ); | 79 | (void)::strncat( foo, QFile::encodeName(ending), 4 ); |
80 | _file = QString::fromLatin1( foo ); | 80 | _file = QString::fromLocal8Bit( foo ); |
81 | QString cmd = QString("sed -e \"s/^\\(X-MICROSOFT-BODYINK\\)\\;/\\1:/;\" < %2 > %2 ").arg( Global::shellQuote(file)).arg( Global::shellQuote(_file) ); | 81 | QString cmd = QString("sed -e \"s/^\\(X-MICROSOFT-BODYINK\\)\\;/\\1:/;\" < %2 > %2 ").arg( Global::shellQuote(file)).arg( Global::shellQuote(_file) ); |
82 | owarn << "Executing: " << cmd << "" << oendl; | 82 | (void)::system( QFile::encodeName(cmd) ); |
83 | (void)::system( cmd.latin1() ); | ||
84 | 83 | ||
85 | cmd = QString("rm %1").arg( Global::shellQuote(file) ); | 84 | cmd = QString("rm %1").arg( Global::shellQuote(file) ); |
86 | (void)::system( cmd.latin1() ); | 85 | (void)::system( QFile::encodeName(cmd) ); |
87 | } | 86 | } |
88 | int Receiver::checkFile( QString& file ) { | 87 | int Receiver::checkFile( QString& file ) { |
89 | owarn << "check file!! " << file << "" << oendl; | ||
90 | int ret; | 88 | int ret; |
91 | QString ending; | 89 | QString ending; |
92 | 90 | ||
@@ -111,7 +109,6 @@ int Receiver::checkFile( QString& file ) { | |||
111 | */ | 109 | */ |
112 | tidyUp( file, ending ); | 110 | tidyUp( file, ending ); |
113 | 111 | ||
114 | owarn << "check it now " << ret << "" << oendl; | ||
115 | return ret; | 112 | return ret; |
116 | } | 113 | } |
117 | 114 | ||
@@ -152,7 +149,6 @@ void OtherHandler::handle( const QString& file ) { | |||
152 | m_file = file; | 149 | m_file = file; |
153 | m_na->setText(file); | 150 | m_na->setText(file); |
154 | DocLnk lnk(file); | 151 | DocLnk lnk(file); |
155 | owarn << " " << lnk.type() << " " << lnk.icon() << "" << oendl; | ||
156 | 152 | ||
157 | 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() ); | 153 | 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() ); |
158 | m_view->setText( str ); | 154 | m_view->setText( str ); |
@@ -195,14 +191,8 @@ QString OtherHandler::targetName( const QString& file ) { | |||
195 | 191 | ||
196 | /* fast cpy */ | 192 | /* fast cpy */ |
197 | void OtherHandler::copy(const QString& src, const QString& file) { | 193 | void OtherHandler::copy(const QString& src, const QString& file) { |
198 | owarn << "src " << src << ", dest " << file << "" << oendl; | ||
199 | FileManager *fm; | 194 | FileManager *fm; |
200 | if(!fm->copyFile(src,file)) { | 195 | if(!fm->copyFile(src,file)) { |
201 | owarn << "Copy failed" << oendl; | 196 | owarn << "Copy failed" << oendl; |
202 | } | 197 | } |
203 | |||
204 | // QString cmd = QString("mv %1 %2").arg( Global::shellQuote( src )). | ||
205 | // arg( Global::shellQuote( file ) ); | ||
206 | // ::system( cmd.latin1() ); | ||
207 | // done | ||
208 | } | 198 | } |