summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/pop3wrapper.cpp
Unidiff
Diffstat (limited to 'kmicromail/libmailwrapper/pop3wrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/pop3wrapper.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp
index 2888f7c..ebeed71 100644
--- a/kmicromail/libmailwrapper/pop3wrapper.cpp
+++ b/kmicromail/libmailwrapper/pop3wrapper.cpp
@@ -9,8 +9,10 @@
9 9
10#include <qpe/global.h> 10#include <qpe/global.h>
11#include <qfile.h> 11#include <qfile.h>
12#include <qprogressbar.h> 12#include <q3progressbar.h>
13#include <qapplication.h> 13#include <qapplication.h>
14//Added by qt3to4:
15#include <Q3ValueList>
14 16
15/* we don't fetch messages larger than 5 MB */ 17/* we don't fetch messages larger than 5 MB */
16#define HARD_MSG_SIZE_LIMIT 5242880 18#define HARD_MSG_SIZE_LIMIT 5242880
@@ -62,14 +64,14 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) {
62 if (msg_cache.exists()) { 64 if (msg_cache.exists()) {
63 msg_cache.remove(); 65 msg_cache.remove();
64 } 66 }
65 msg_cache.open(IO_ReadWrite|IO_Truncate); 67 msg_cache.open(QIODevice::ReadWrite|QIODevice::Truncate);
66 last_msg_id = mail->getNumber(); 68 last_msg_id = mail->getNumber();
67 err = mailsession_get_message(m_pop3->sto_session, mail->getNumber(), &mailmsg); 69 err = mailsession_get_message(m_pop3->sto_session, mail->getNumber(), &mailmsg);
68 err = mailmessage_fetch(mailmsg,&message,&length); 70 err = mailmessage_fetch(mailmsg,&message,&length);
69 msg_cache.writeBlock(message,length); 71 msg_cache.writeBlock(message,length);
70 } else { 72 } else {
71 QString msg=""; 73 QString msg="";
72 msg_cache.open(IO_ReadOnly); 74 msg_cache.open(QIODevice::ReadOnly);
73 message = new char[4096]; 75 message = new char[4096];
74 memset(message,0,4096); 76 memset(message,0,4096);
75 while (msg_cache.readBlock(message,4095)>0) { 77 while (msg_cache.readBlock(message,4095)>0) {
@@ -100,7 +102,7 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) {
100 return body; 102 return body;
101} 103}
102 104
103void POP3wrapper::listMessages(const QString &, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) 105void POP3wrapper::listMessages(const QString &, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb )
104{ 106{
105 login(); 107 login();
106 if (!m_pop3) 108 if (!m_pop3)
@@ -187,14 +189,14 @@ void POP3wrapper::logout()
187} 189}
188 190
189 191
190QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { 192Q3ValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() {
191 QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<FolderP>(); 193 Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<FolderP>();
192 FolderP inb=new Folder("INBOX","/"); 194 FolderP inb=new Folder("INBOX","/");
193 folders->append(inb); 195 folders->append(inb);
194 return folders; 196 return folders;
195} 197}
196 198
197void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target) 199void POP3wrapper::deleteMailList(const Q3ValueList<RecMailP>&target)
198{ 200{
199 login(); 201 login();
200 if (!m_pop3) 202 if (!m_pop3)
@@ -202,7 +204,7 @@ void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target)
202 int iii = 0; 204 int iii = 0;
203 int count = target.count(); 205 int count = target.count();
204 206
205 QProgressBar wid ( count ); 207 Q3ProgressBar wid ( count );
206 wid.setCaption( i18n("Deleting ...")); 208 wid.setCaption( i18n("Deleting ..."));
207 wid.show(); 209 wid.show();
208 while (iii < count ) { 210 while (iii < count ) {
@@ -246,7 +248,7 @@ int POP3wrapper::deleteAllMail(const FolderP&) {
246 248
247 249
248 250
249 QProgressBar wid ( result ); 251 Q3ProgressBar wid ( result );
250 wid.setCaption( i18n("Deleting ...")); 252 wid.setCaption( i18n("Deleting ..."));
251 wid.show(); 253 wid.show();
252 for (unsigned int i = 0; i < result; ++i) { 254 for (unsigned int i = 0; i < result; ++i) {