summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/mhwrapper.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper/mhwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/mhwrapper.cpp22
1 files changed, 8 insertions, 14 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
@@ -4,15 +4,15 @@
#include "mailwrapper.h"
#include <libetpan/libetpan.h>
#include <qdir.h>
#include <qmessagebox.h>
#include <stdlib.h>
#include <qpe/global.h>
-#include <oprocess.h>
#include <klocale.h>
-//#include <opie2/odebug.h>
+#include <kglobal.h>
+//#include <opie2/odebug.h>
using namespace Opie::Core;
MHwrapper::MHwrapper(const QString & mbox_dir,const QString&mbox_name)
: Genericwrapper(),MHPath(mbox_dir),MHName(mbox_name)
{
if (MHPath.length()>0) {
@@ -312,45 +312,39 @@ int MHwrapper::deleteMbox(const FolderP&tfolder)
int r = mailsession_delete_folder(m_storage->sto_session,(char*)tfolder->getName().latin1());
if (r != MAIL_NO_ERROR) {
qDebug("error deleting mail box ");
return 0;
}
+ QString delDir = locateLocal( "apps", "kopiemail")+ "localmail";
+ qDebug("*****************\ndel %s %s ", delDir.latin1(),tfolder->getName().latin1() );
+#if 0
QString cmd = "rm -rf "+tfolder->getName();
QStringList command;
command << "/bin/sh";
command << "-c";
command << cmd.latin1();
OProcess *process = new OProcess();
+ /*
connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
this, SLOT( processEnded(Opie::Core::OProcess*)));
connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)),
this, SLOT( oprocessStderr(Opie::Core::OProcess*,char*,int)));
-
+ */
*process << command;
removeMboxfailed = false;
if(!process->start(OProcess::Block, OProcess::All) ) {
qDebug("could not start process ");
return 0;
}
+#endif
qDebug("mail box deleted ");
return 1;
}
-void MHwrapper::processEnded(OProcess *p)
-{
- if (p) delete p;
-}
-
-void MHwrapper::oprocessStderr(OProcess*, char *buffer, int )
-{
- QString lineStr = buffer;
- QMessageBox::warning( 0, i18n("Error"), lineStr ,i18n("Ok") );
- removeMboxfailed = true;
-}
void MHwrapper::statusFolder(folderStat&target_stat,const QString & mailbox)
{
init_storage();
if (!m_storage) {
return;