summaryrefslogtreecommitdiff
path: root/core/obex/receiver.cpp
Unidiff
Diffstat (limited to 'core/obex/receiver.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/obex/receiver.cpp41
1 files changed, 22 insertions, 19 deletions
diff --git a/core/obex/receiver.cpp b/core/obex/receiver.cpp
index ee2668b..8885256 100644
--- a/core/obex/receiver.cpp
+++ b/core/obex/receiver.cpp
@@ -1,10 +1,14 @@
1#include <sys/types.h> 1#include "obex.h"
2#include <sys/stat.h> 2#include "receiver.h"
3#include <sys/mman.h> 3using namespace OpieObex;
4#include <stdlib.h> // int system
5#include <unistd.h>
6 4
7#include <fcntl.h> 5/* OPIE */
6#include <opie2/odebug.h>
7#include <qpe/applnk.h>
8#include <qpe/qpeapplication.h>
9#include <qpe/qcopenvelope_qws.h>
10using namespace Opie::Core;
8 11
12/* QT */
9#include <qfileinfo.h> 13#include <qfileinfo.h>
10#include <qlabel.h> 14#include <qlabel.h>
@@ -12,12 +16,11 @@
12#include <qpushbutton.h> 16#include <qpushbutton.h>
13 17
14#include <qpe/applnk.h> 18/* STD */
15#include <qpe/qpeapplication.h> 19#include <sys/types.h>
16#include <qpe/qcopenvelope_qws.h> 20#include <sys/stat.h>
17 21#include <sys/mman.h>
18#include "obex.h" 22#include <stdlib.h> // int system
19#include "receiver.h" 23#include <unistd.h>
20 24#include <fcntl.h>
21using namespace OpieObex;
22 25
23/* TRANSLATOR OpieObex::Receiver */ 26/* TRANSLATOR OpieObex::Receiver */
@@ -76,5 +79,5 @@ void Receiver::tidyUp( QString& _file, const QString& ending) {
76 _file = QString::fromLatin1( foo ); 79 _file = QString::fromLatin1( foo );
77 QString cmd = QString("sed -e \"s/^\\(X-MICROSOFT-BODYINK\\)\\;/\\1:/;\" < %2 > %2 ").arg( Global::shellQuote(file)).arg( Global::shellQuote(_file) ); 80 QString cmd = QString("sed -e \"s/^\\(X-MICROSOFT-BODYINK\\)\\;/\\1:/;\" < %2 > %2 ").arg( Global::shellQuote(file)).arg( Global::shellQuote(_file) );
78 qWarning("Executing: %s", cmd.latin1() ); 81 owarn << "Executing: " << cmd << "" << oendl;
79 (void)::system( cmd.latin1() ); 82 (void)::system( cmd.latin1() );
80 83
@@ -83,5 +86,5 @@ void Receiver::tidyUp( QString& _file, const QString& ending) {
83} 86}
84int Receiver::checkFile( QString& file ) { 87int Receiver::checkFile( QString& file ) {
85 qWarning("check file!! %s", file.latin1() ); 88 owarn << "check file!! " << file << "" << oendl;
86 int ret; 89 int ret;
87 QString ending; 90 QString ending;
@@ -108,5 +111,5 @@ int Receiver::checkFile( QString& file ) {
108 tidyUp( file, ending ); 111 tidyUp( file, ending );
109 112
110 qWarning("check it now %d", ret ); 113 owarn << "check it now " << ret << "" << oendl;
111 return ret; 114 return ret;
112} 115}
@@ -149,5 +152,5 @@ void OtherHandler::handle( const QString& file ) {
149 m_na->setText(file); 152 m_na->setText(file);
150 DocLnk lnk(file); 153 DocLnk lnk(file);
151 qWarning(" %s %s", lnk.type().latin1(), lnk.icon().latin1() ); 154 owarn << " " << lnk.type() << " " << lnk.icon() << "" << oendl;
152 155
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() ); 156 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() );
@@ -192,5 +195,5 @@ QString OtherHandler::targetName( const QString& file ) {
192/* fast cpy */ 195/* fast cpy */
193void OtherHandler::copy(const QString& src, const QString& file) { 196void OtherHandler::copy(const QString& src, const QString& file) {
194 qWarning("src %s, dest %s", src.latin1(),file.latin1() ); 197 owarn << "src " << src << ", dest " << file << "" << oendl;
195 QString cmd = QString("mv %1 %2").arg( Global::shellQuote( src )). 198 QString cmd = QString("mv %1 %2").arg( Global::shellQuote( src )).
196 arg( Global::shellQuote( file ) ); 199 arg( Global::shellQuote( file ) );