author | zautrix <zautrix> | 2004-10-30 11:40:54 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-30 11:40:54 (UTC) |
commit | 632b43950f1ac2980c281eb8901d797deb0ba971 (patch) (side-by-side diff) | |
tree | 72534bf865fbef61a29d5e8b2e65672c15b432c0 /kmicromail/libmailwrapper/mhwrapper.cpp | |
parent | 0057c2a8e90346583f606491730cae819d2313ac (diff) | |
download | kdepimpi-632b43950f1ac2980c281eb8901d797deb0ba971.zip kdepimpi-632b43950f1ac2980c281eb8901d797deb0ba971.tar.gz kdepimpi-632b43950f1ac2980c281eb8901d797deb0ba971.tar.bz2 |
made ompi compiling on desktop
Diffstat (limited to 'kmicromail/libmailwrapper/mhwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/mhwrapper.cpp | 22 |
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 @@ -1,28 +1,28 @@ // CHANGED 2004-09-31 Lutz Rogowski #include "mhwrapper.h" #include "mailtypes.h" #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) { if (MHPath[MHPath.length()-1]=='/') { MHPath=MHPath.left(MHPath.length()-1); } //odebug << MHPath << oendl; QDir dir(MHPath); if (!dir.exists()) { dir.mkdir(MHPath); } init_storage(); } @@ -302,65 +302,59 @@ int MHwrapper::deleteAllMail(const FolderP&tfolder) int MHwrapper::deleteMbox(const FolderP&tfolder) { init_storage(); if (!m_storage) { return 0; } if (!tfolder) return 0; if (tfolder->getName()=="/" || tfolder->getName().isEmpty()) return 0; 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; } target_stat.message_count = 0; target_stat.message_unseen = 0; target_stat.message_recent = 0; QString f = buildPath(mailbox); int r = mailsession_status_folder(m_storage->sto_session,(char*)f.latin1(),&target_stat.message_count, &target_stat.message_recent,&target_stat.message_unseen); if (r != MAIL_NO_ERROR) { Global::statusMessage(i18n("Error retrieving status")); } |