Diffstat (limited to 'noncore/net/mail/libmailwrapper/mhwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/mhwrapper.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.cpp b/noncore/net/mail/libmailwrapper/mhwrapper.cpp index 0b00a2e..21e24a0 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mhwrapper.cpp | |||
@@ -5,12 +5,15 @@ | |||
5 | #include <qdir.h> | 5 | #include <qdir.h> |
6 | #include <qmessagebox.h> | 6 | #include <qmessagebox.h> |
7 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <qpe/global.h> | 8 | #include <qpe/global.h> |
9 | #include <opie2/oprocess.h> | 9 | #include <opie2/oprocess.h> |
10 | 10 | ||
11 | using namespace Opie::Core; | ||
12 | using namespace Opie::Core; | ||
13 | using namespace Opie::Core; | ||
11 | MHwrapper::MHwrapper(const QString & mbox_dir,const QString&mbox_name) | 14 | MHwrapper::MHwrapper(const QString & mbox_dir,const QString&mbox_name) |
12 | : Genericwrapper(),MHPath(mbox_dir),MHName(mbox_name) | 15 | : Genericwrapper(),MHPath(mbox_dir),MHName(mbox_name) |
13 | { | 16 | { |
14 | if (MHPath.length()>0) { | 17 | if (MHPath.length()>0) { |
15 | if (MHPath[MHPath.length()-1]=='/') { | 18 | if (MHPath[MHPath.length()-1]=='/') { |
16 | MHPath=MHPath.left(MHPath.length()-1); | 19 | MHPath=MHPath.left(MHPath.length()-1); |
@@ -57,13 +60,13 @@ void MHwrapper::clean_storage() | |||
57 | 60 | ||
58 | MHwrapper::~MHwrapper() | 61 | MHwrapper::~MHwrapper() |
59 | { | 62 | { |
60 | clean_storage(); | 63 | clean_storage(); |
61 | } | 64 | } |
62 | 65 | ||
63 | void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::OSmartPointer<RecMail> > &target ) | 66 | void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target ) |
64 | { | 67 | { |
65 | init_storage(); | 68 | init_storage(); |
66 | if (!m_storage) { | 69 | if (!m_storage) { |
67 | return; | 70 | return; |
68 | } | 71 | } |
69 | QString f = buildPath(mailbox); | 72 | QString f = buildPath(mailbox); |
@@ -73,15 +76,15 @@ void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::OSmartPoi | |||
73 | return; | 76 | return; |
74 | } | 77 | } |
75 | parseList(target,m_storage->sto_session,f); | 78 | parseList(target,m_storage->sto_session,f); |
76 | Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); | 79 | Global::statusMessage(tr("Mailbox has %1 mail(s)").arg(target.count())); |
77 | } | 80 | } |
78 | 81 | ||
79 | QValueList<Opie::OSmartPointer<Folder> >* MHwrapper::listFolders() | 82 | QValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() |
80 | { | 83 | { |
81 | QValueList<Opie::OSmartPointer<Folder> >* folders = new QValueList<Opie::OSmartPointer<Folder> >(); | 84 | QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); |
82 | /* this is needed! */ | 85 | /* this is needed! */ |
83 | if (m_storage) mailstorage_disconnect(m_storage); | 86 | if (m_storage) mailstorage_disconnect(m_storage); |
84 | init_storage(); | 87 | init_storage(); |
85 | if (!m_storage) { | 88 | if (!m_storage) { |
86 | return folders; | 89 | return folders; |
87 | } | 90 | } |
@@ -314,15 +317,15 @@ int MHwrapper::deleteMbox(const FolderP&tfolder) | |||
314 | QStringList command; | 317 | QStringList command; |
315 | command << "/bin/sh"; | 318 | command << "/bin/sh"; |
316 | command << "-c"; | 319 | command << "-c"; |
317 | command << cmd.latin1(); | 320 | command << cmd.latin1(); |
318 | OProcess *process = new OProcess(); | 321 | OProcess *process = new OProcess(); |
319 | 322 | ||
320 | connect(process, SIGNAL(processExited(OProcess*)), | 323 | connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), |
321 | this, SLOT( processEnded(OProcess*))); | 324 | this, SLOT( processEnded(OProcess*))); |
322 | connect(process, SIGNAL( receivedStderr(OProcess*,char*,int)), | 325 | connect(process, SIGNAL( receivedStderr(Opie::Core::OProcess*,char*,int)), |
323 | this, SLOT( oprocessStderr(OProcess*,char*,int))); | 326 | this, SLOT( oprocessStderr(OProcess*,char*,int))); |
324 | 327 | ||
325 | *process << command; | 328 | *process << command; |
326 | removeMboxfailed = false; | 329 | removeMboxfailed = false; |
327 | if(!process->start(OProcess::Block, OProcess::All) ) { | 330 | if(!process->start(OProcess::Block, OProcess::All) ) { |
328 | qDebug("could not start process"); | 331 | qDebug("could not start process"); |