summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/obex/obex.cc28
-rw-r--r--core/obex/obexsend.cpp7
-rw-r--r--core/obex/receiver.cpp18
3 files changed, 9 insertions, 44 deletions
diff --git a/core/obex/obex.cc b/core/obex/obex.cc
index 7c40b90..5dfcfb5 100644
--- a/core/obex/obex.cc
+++ b/core/obex/obex.cc
@@ -36,3 +36,2 @@ void Obex::receive() {
m_outp = QString::null;
- owarn << "Receive" << oendl;
m_rec = new OProcess();
@@ -47,3 +46,2 @@ void Obex::receive() {
if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
- owarn << "could not start :(" oendl;
emit done( false );
@@ -52,5 +50,4 @@ void Obex::receive() {
}
-// emit currentTry(m_count );
-
}
+
void Obex::send( const QString& fileName) { // if currently receiving stop it send receive
@@ -58,8 +55,5 @@ void Obex::send( const QString& fileName) { // if currently receiving stop it se
m_file = fileName;
- owarn << "send " << fileName.latin1() << oendl;
if (m_rec != 0 ) {
- owarn << "running" oendl;
if (m_rec->isRunning() ) {
emit error(-1 );
- owarn << "is running" << oendl;
delete m_rec;
@@ -68,3 +62,2 @@ void Obex::send( const QString& fileName) { // if currently receiving stop it se
}else{
- owarn << "is not running" << oendl;
emit error( -1 ); // we did not delete yet but it's not running slotExited is pending
@@ -76,3 +69,2 @@ void Obex::send( const QString& fileName) { // if currently receiving stop it se
void Obex::sendNow(){
- owarn << "sendNow" << oendl;
if ( m_count >= 25 ) { // could not send
@@ -95,3 +87,2 @@ void Obex::sendNow(){
if (!m_send->start(/*OProcess::NotifyOnExit, OProcess::AllOutput*/ ) ) {
- owarn << "could not send" << oendl;
m_count = 25;
@@ -107,7 +98,7 @@ void Obex::sendNow(){
void Obex::slotExited(OProcess* proc ){
- if (proc == m_rec ) { // receive process
+ if (proc == m_rec ) // receive process
received();
- }else if ( proc == m_send ) {
+ else if ( proc == m_send )
sendEnd();
- }
+
}
@@ -117,3 +108,2 @@ void Obex::slotStdOut(OProcess* proc, char* buf, int len){
memcpy( ar.data(), buf, len );
- owarn << "parsed: " << ar.data() << oendl;
m_outp.append( ar );
@@ -126,3 +116,2 @@ void Obex::received() {
QString filename = parseOut();
- owarn << "ACHTUNG " << filename.latin1() << oendl;
emit receivedFile( filename );
@@ -142,3 +131,2 @@ void Obex::sendEnd() {
m_send=0;
- owarn << "done" << oendl;
emit sent(true);
@@ -148,3 +136,2 @@ void Obex::sendEnd() {
m_send = 0;
- owarn << "try sending again" << oendl;
sendNow();
@@ -165,10 +152,6 @@ QString Obex::parseOut( ){
if ( pos > 0 ) {
- owarn << pos << " " << (*it).mid(6 ).latin1() << oendl;
- owarn << (*it).length() << " " << (*it).length()-pos << oendl;
path = (*it).remove( pos, (*it).length() - pos );
- owarn << path.latin1() << oendl;
path = path.mid(6 );
path = path.stripWhiteSpace();
- owarn << "path " << path.latin1() << oendl;
}
@@ -182,3 +165,2 @@ QString Obex::parseOut( ){
void Obex::slotError() {
- owarn << "slotError" << oendl;
if ( m_receive )
@@ -195,6 +177,4 @@ void Obex::shutDownReceive() {
if (m_rec != 0 ) {
- owarn << "running" << oendl;
if (m_rec->isRunning() ) {
emit error(-1 );
- owarn << "is running" << oendl;
delete m_rec;
diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp
index f3dd11c..675c5e4 100644
--- a/core/obex/obexsend.cpp
+++ b/core/obex/obexsend.cpp
@@ -107,3 +107,2 @@ void SendWidget::send( const QString& file, const QString& desc ) {
void SendWidget::slotIrDaDevices( const QStringList& list) {
- owarn << "slot it irda devices " << oendl;
for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) {
@@ -125,4 +124,3 @@ void SendWidget::slotBTDevices( const QMap<QString, QString>& str ) {
}
-void SendWidget::slotSelectedDevice( int name, int dev ) {
- owarn << "Start beam? " << name << " " << dev << "" << oendl;
+void SendWidget::slotSelectedDevice( int name, int ) {
if ( name == m_irDeSearch ) {
@@ -135,3 +133,2 @@ void SendWidget::slotSelectedDevice( int name, int dev ) {
void SendWidget::dispatchIrda( const QCString& str, const QByteArray& ar ) {
- owarn << "dispatch irda " << str.data() << "" << oendl;
if ( str == "devices(QStringList)" ) {
@@ -150,3 +147,2 @@ void SendWidget::slotIrError( int ) {
void SendWidget::slotIrSent( bool b) {
- owarn << "irda sent!!" << oendl;
QString text = b ? tr("Sent") : tr("Failure");
@@ -207,3 +203,2 @@ void DeviceBox::setStatus( int id, const QString& status ) {
void DeviceBox::setSource( const QString& str ) {
- owarn << "SetSource:" << str.toInt() << "" << oendl;
int id = str.toInt();
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
@@ -78,13 +78,11 @@ void Receiver::tidyUp( QString& _file, const QString& ending) {
- (void)::strncat( foo, ending.latin1(), 4 );
- _file = QString::fromLatin1( foo );
+ (void)::strncat( foo, QFile::encodeName(ending), 4 );
+ _file = QString::fromLocal8Bit( foo );
QString cmd = QString("sed -e \"s/^\\(X-MICROSOFT-BODYINK\\)\\;/\\1:/;\" < %2 > %2 ").arg( Global::shellQuote(file)).arg( Global::shellQuote(_file) );
- owarn << "Executing: " << cmd << "" << oendl;
- (void)::system( cmd.latin1() );
+ (void)::system( QFile::encodeName(cmd) );
cmd = QString("rm %1").arg( Global::shellQuote(file) );
- (void)::system( cmd.latin1() );
+ (void)::system( QFile::encodeName(cmd) );
}
int Receiver::checkFile( QString& file ) {
- owarn << "check file!! " << file << "" << oendl;
int ret;
@@ -113,3 +111,2 @@ int Receiver::checkFile( QString& file ) {
- owarn << "check it now " << ret << "" << oendl;
return ret;
@@ -154,3 +151,2 @@ void OtherHandler::handle( const QString& file ) {
DocLnk lnk(file);
- owarn << " " << lnk.type() << " " << lnk.icon() << "" << oendl;
@@ -197,3 +193,2 @@ QString OtherHandler::targetName( const QString& file ) {
void OtherHandler::copy(const QString& src, const QString& file) {
- owarn << "src " << src << ", dest " << file << "" << oendl;
FileManager *fm;
@@ -202,7 +197,2 @@ void OtherHandler::copy(const QString& src, const QString& file) {
}
-
-// QString cmd = QString("mv %1 %2").arg( Global::shellQuote( src )).
-// arg( Global::shellQuote( file ) );
-// ::system( cmd.latin1() );
- // done
}