summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/mhwrapper.cpp
Unidiff
Diffstat (limited to 'kmicromail/libmailwrapper/mhwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/mhwrapper.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/kmicromail/libmailwrapper/mhwrapper.cpp b/kmicromail/libmailwrapper/mhwrapper.cpp
index f4133c0..de6d220 100644
--- a/kmicromail/libmailwrapper/mhwrapper.cpp
+++ b/kmicromail/libmailwrapper/mhwrapper.cpp
@@ -8,6 +8,6 @@
8#include <stdlib.h> 8#include <stdlib.h>
9#include <qpe/global.h> 9#include <qpe/global.h>
10#include <oprocess.h>
11#include <klocale.h> 10#include <klocale.h>
11#include <kglobal.h>
12//#include <opie2/odebug.h> 12//#include <opie2/odebug.h>
13 13
@@ -316,4 +316,7 @@ int MHwrapper::deleteMbox(const FolderP&tfolder)
316 return 0; 316 return 0;
317 } 317 }
318 QString delDir = locateLocal( "apps", "kopiemail")+ "localmail";
319 qDebug("*****************\ndel %s %s ", delDir.latin1(),tfolder->getName().latin1() );
320#if 0
318 QString cmd = "rm -rf "+tfolder->getName(); 321 QString cmd = "rm -rf "+tfolder->getName();
319 QStringList command; 322 QStringList command;
@@ -323,9 +326,10 @@ int MHwrapper::deleteMbox(const FolderP&tfolder)
323 OProcess *process = new OProcess(); 326 OProcess *process = new OProcess();
324 327
328 /*
325 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), 329 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
326 this, SLOT( processEnded(Opie::Core::OProcess*))); 330 this, SLOT( processEnded(Opie::Core::OProcess*)));
327 connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), 331 connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)),
328 this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int))); 332 this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
329 333 */
330 *process << command; 334 *process << command;
331 removeMboxfailed = false; 335 removeMboxfailed = false;
@@ -334,19 +338,9 @@ int MHwrapper::deleteMbox(const FolderP&tfolder)
334 return 0; 338 return 0;
335 } 339 }
340#endif
336 qDebug("mail box deleted "); 341 qDebug("mail box deleted ");
337 return 1; 342 return 1;
338} 343}
339 344
340void MHwrapper::processEnded(OProcess *p)
341{
342 if (p) delete p;
343}
344
345void MHwrapper::oprocessStderr(OProcess*, char *buffer, int )
346{
347 QString lineStr = buffer;
348 QMessageBox::warning( 0, i18n("Error"), lineStr ,i18n("Ok") );
349 removeMboxfailed = true;
350}
351 345
352void MHwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) 346void MHwrapper::statusFolder(folderStat&target_stat,const QString & mailbox)