author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kmicromail/libmailwrapper | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
25 files changed, 159 insertions, 115 deletions
diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp index 870985e..746d2ae 100644 --- a/kmicromail/libmailwrapper/abstractmail.cpp +++ b/kmicromail/libmailwrapper/abstractmail.cpp | |||
@@ -8,13 +8,15 @@ | |||
8 | #include <qpe/global.h> | 8 | #include <qpe/global.h> |
9 | 9 | ||
10 | 10 | ||
11 | #include <qprogressbar.h> | 11 | #include <q3progressbar.h> |
12 | #include <qapplication.h> | 12 | #include <qapplication.h> |
13 | #include <qmessagebox.h> | 13 | #include <qmessagebox.h> |
14 | //Added by qt3to4: | ||
15 | #include <Q3ValueList> | ||
14 | #include <klocale.h> | 16 | #include <klocale.h> |
15 | #include <kdecore/kstandarddirs.h> | 17 | #include <kdecore/kstandarddirs.h> |
16 | #include <qfile.h> | 18 | #include <qfile.h> |
17 | #include <qtextstream.h> | 19 | #include <q3textstream.h> |
18 | #include <stdlib.h> | 20 | #include <stdlib.h> |
19 | #include <libetpan/mailmime_content.h> | 21 | #include <libetpan/mailmime_content.h> |
20 | #include <libetpan/mailmime.h> | 22 | #include <libetpan/mailmime.h> |
@@ -111,10 +113,10 @@ QString AbstractMail::convert_String(const char*text) | |||
111 | QString AbstractMail::gen_attachment_id() | 113 | QString AbstractMail::gen_attachment_id() |
112 | { | 114 | { |
113 | QFile file( "/proc/sys/kernel/random/uuid" ); | 115 | QFile file( "/proc/sys/kernel/random/uuid" ); |
114 | if (!file.open(IO_ReadOnly ) ) | 116 | if (!file.open(QIODevice::ReadOnly ) ) |
115 | return QString::null; | 117 | return QString::null; |
116 | 118 | ||
117 | QTextStream stream(&file); | 119 | Q3TextStream stream(&file); |
118 | 120 | ||
119 | return "{" + stream.read().stripWhiteSpace() + "}"; | 121 | return "{" + stream.read().stripWhiteSpace() + "}"; |
120 | } | 122 | } |
@@ -138,16 +140,16 @@ QString AbstractMail::draftFolder() | |||
138 | } | 140 | } |
139 | 141 | ||
140 | /* temporary - will be removed when implemented in all classes */ | 142 | /* temporary - will be removed when implemented in all classes */ |
141 | void AbstractMail::deleteMails(const QString &,const QValueList<Opie::Core::OSmartPointer<RecMail> > &) | 143 | void AbstractMail::deleteMails(const QString &,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &) |
142 | { | 144 | { |
143 | } | 145 | } |
144 | void AbstractMail::deleteMailList(const QValueList<RecMailP>&target) | 146 | void AbstractMail::deleteMailList(const Q3ValueList<RecMailP>&target) |
145 | { | 147 | { |
146 | //qDebug("AbstractMail::deleteMailList:: Please reimplement! "); | 148 | //qDebug("AbstractMail::deleteMailList:: Please reimplement! "); |
147 | // this is currently re-implemented in pop3wrapper and imapwrapper | 149 | // this is currently re-implemented in pop3wrapper and imapwrapper |
148 | int iii = 0; | 150 | int iii = 0; |
149 | int count = target.count(); | 151 | int count = target.count(); |
150 | QProgressBar wid ( count ); | 152 | Q3ProgressBar wid ( count ); |
151 | wid.setCaption( i18n("Deleting ...")); | 153 | wid.setCaption( i18n("Deleting ...")); |
152 | wid.show(); | 154 | wid.show(); |
153 | while (iii < count ) { | 155 | while (iii < count ) { |
@@ -177,7 +179,7 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe | |||
177 | i18n("Error while creating new folder\n%1\n\nCancelling action.").arg(lfName)); | 179 | i18n("Error while creating new folder\n%1\n\nCancelling action.").arg(lfName)); |
178 | return; | 180 | return; |
179 | } | 181 | } |
180 | QValueList<RecMailP> t; | 182 | Q3ValueList<RecMailP> t; |
181 | listMessages(fromFolder->getName(),t,acc->getMaxMailSize() ); | 183 | listMessages(fromFolder->getName(),t,acc->getMaxMailSize() ); |
182 | if ( t.count() == 0 ) { | 184 | if ( t.count() == 0 ) { |
183 | qDebug("There are no new messages %s", fromFolder->getName().latin1()); | 185 | qDebug("There are no new messages %s", fromFolder->getName().latin1()); |
@@ -187,10 +189,10 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe | |||
187 | Global::statusMessage(i18n("%1 :Downloading mails..."). arg(acc->getAccountName())); | 189 | Global::statusMessage(i18n("%1 :Downloading mails..."). arg(acc->getAccountName())); |
188 | qDebug(i18n("%1 :Downloading mails..."). arg(acc->getAccountName())); | 190 | qDebug(i18n("%1 :Downloading mails..."). arg(acc->getAccountName())); |
189 | qApp->processEvents(); | 191 | qApp->processEvents(); |
190 | QValueList<RecMailP> e; | 192 | Q3ValueList<RecMailP> e; |
191 | targetMail->listMessages(lfName,e,acc->getMaxMailSize() ); | 193 | targetMail->listMessages(lfName,e,acc->getMaxMailSize() ); |
192 | //qDebug("target has mails %d ", e.count()); | 194 | //qDebug("target has mails %d ", e.count()); |
193 | QValueList<RecMailP> n; | 195 | Q3ValueList<RecMailP> n; |
194 | int iii = 0; | 196 | int iii = 0; |
195 | int count = t.count(); | 197 | int count = t.count(); |
196 | while (iii < count ) { | 198 | while (iii < count ) { |
@@ -221,7 +223,7 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe | |||
221 | Global::statusMessage(i18n("Downloaded %1 messages").arg(n.count())); | 223 | Global::statusMessage(i18n("Downloaded %1 messages").arg(n.count())); |
222 | 224 | ||
223 | #if 0 | 225 | #if 0 |
224 | QValueList<RecMailP> t; | 226 | Q3ValueList<RecMailP> t; |
225 | listMessages(fromFolder->getName(),t, maxSizeInKb); | 227 | listMessages(fromFolder->getName(),t, maxSizeInKb); |
226 | mvcpMailList( t,targetFolder,targetWrapper,moveit); | 228 | mvcpMailList( t,targetFolder,targetWrapper,moveit); |
227 | #endif | 229 | #endif |
@@ -230,12 +232,12 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe | |||
230 | void AbstractMail::mvcpAllMails(const FolderP&fromFolder, | 232 | void AbstractMail::mvcpAllMails(const FolderP&fromFolder, |
231 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int maxSizeInKb) | 233 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int maxSizeInKb) |
232 | { | 234 | { |
233 | QValueList<RecMailP> t; | 235 | Q3ValueList<RecMailP> t; |
234 | listMessages(fromFolder->getName(),t, maxSizeInKb); | 236 | listMessages(fromFolder->getName(),t, maxSizeInKb); |
235 | mvcpMailList( t,targetFolder,targetWrapper,moveit); | 237 | mvcpMailList( t,targetFolder,targetWrapper,moveit); |
236 | 238 | ||
237 | } | 239 | } |
238 | void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, | 240 | void AbstractMail::mvcpMailList(const Q3ValueList<RecMailP>& t, |
239 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) | 241 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) |
240 | { | 242 | { |
241 | encodedString*st = 0; | 243 | encodedString*st = 0; |
@@ -246,7 +248,7 @@ void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, | |||
246 | // wel, processevents is qite strange, we need a widget for getting | 248 | // wel, processevents is qite strange, we need a widget for getting |
247 | // Global::statusMessage(i18n("Copy2 message %1").arg(iii)); displaye | 249 | // Global::statusMessage(i18n("Copy2 message %1").arg(iii)); displaye |
248 | 250 | ||
249 | QProgressBar wid ( count ); | 251 | Q3ProgressBar wid ( count ); |
250 | wid.setCaption( i18n("Copying...")); | 252 | wid.setCaption( i18n("Copying...")); |
251 | wid.show(); | 253 | wid.show(); |
252 | while (iii < count ) { | 254 | while (iii < count ) { |
diff --git a/kmicromail/libmailwrapper/abstractmail.h b/kmicromail/libmailwrapper/abstractmail.h index 2069ca1..f606b1f 100644 --- a/kmicromail/libmailwrapper/abstractmail.h +++ b/kmicromail/libmailwrapper/abstractmail.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #include "settings.h" | 7 | #include "settings.h" |
8 | 8 | ||
9 | #include <qobject.h> | 9 | #include <qobject.h> |
10 | //Added by qt3to4: | ||
11 | #include <Q3ValueList> | ||
10 | #include <opie2/osmartpointer.h> | 12 | #include <opie2/osmartpointer.h> |
11 | #include "mailtypes.h" | 13 | #include "mailtypes.h" |
12 | 14 | ||
@@ -25,8 +27,8 @@ class AbstractMail:public QObject | |||
25 | public: | 27 | public: |
26 | AbstractMail(){}; | 28 | AbstractMail(){}; |
27 | virtual ~AbstractMail(){} | 29 | virtual ~AbstractMail(){} |
28 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0; | 30 | virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0; |
29 | virtual void listMessages(const QString & mailbox,QValueList<RecMailP>&target, int sizeInKb = 0 )=0; | 31 | virtual void listMessages(const QString & mailbox,Q3ValueList<RecMailP>&target, int sizeInKb = 0 )=0; |
30 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; | 32 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; |
31 | virtual RecBodyP fetchBody(const RecMailP&mail)=0; | 33 | virtual RecBodyP fetchBody(const RecMailP&mail)=0; |
32 | virtual QString fetchTextPart(const RecMailP&mail,const RecPartP&part)=0; | 34 | virtual QString fetchTextPart(const RecMailP&mail,const RecPartP&part)=0; |
@@ -35,16 +37,16 @@ public: | |||
35 | virtual encodedString* fetchRawBody(const RecMailP&mail)=0; | 37 | virtual encodedString* fetchRawBody(const RecMailP&mail)=0; |
36 | 38 | ||
37 | virtual void deleteMail(const RecMailP&mail)=0; | 39 | virtual void deleteMail(const RecMailP&mail)=0; |
38 | virtual void deleteMailList(const QValueList<RecMailP>&target); | 40 | virtual void deleteMailList(const Q3ValueList<RecMailP>&target); |
39 | virtual void answeredMail(const RecMailP&mail)=0; | 41 | virtual void answeredMail(const RecMailP&mail)=0; |
40 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&)=0; | 42 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&)=0; |
41 | virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> >&target); | 43 | virtual void deleteMails(const QString & FolderName,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target); |
42 | virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&)=0; | 44 | virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&)=0; |
43 | virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; | 45 | virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; |
44 | void downloadNewMails(const FolderP&fromFolder,AbstractMail*targetWrapper ); | 46 | void downloadNewMails(const FolderP&fromFolder,AbstractMail*targetWrapper ); |
45 | virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, | 47 | virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, |
46 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int sizeInKb = 0); | 48 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int sizeInKb = 0); |
47 | virtual void mvcpMailList(const QValueList<RecMailP>& t, | 49 | virtual void mvcpMailList(const Q3ValueList<RecMailP>& t, |
48 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 50 | const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
49 | virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); | 51 | virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); |
50 | 52 | ||
diff --git a/kmicromail/libmailwrapper/generatemail.cpp b/kmicromail/libmailwrapper/generatemail.cpp index 2d213fe..ddad21b 100644 --- a/kmicromail/libmailwrapper/generatemail.cpp +++ b/kmicromail/libmailwrapper/generatemail.cpp | |||
@@ -7,6 +7,8 @@ | |||
7 | 7 | ||
8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
9 | #include <qfileinfo.h> | 9 | #include <qfileinfo.h> |
10 | //Added by qt3to4: | ||
11 | #include <Q3CString> | ||
10 | 12 | ||
11 | using namespace Opie::Core; | 13 | using namespace Opie::Core; |
12 | const char* Generatemail::USER_AGENT="KOpieMail 33 1/3"; | 14 | const char* Generatemail::USER_AGENT="KOpieMail 33 1/3"; |
@@ -228,7 +230,7 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) { | |||
228 | mailmime_content *content; | 230 | mailmime_content *content; |
229 | mailmime_parameter *param; | 231 | mailmime_parameter *param; |
230 | int err; | 232 | int err; |
231 | QCString __str; | 233 | Q3CString __str; |
232 | //qDebug(" Generatemail::buildTxtPart %s", str.latin1()); | 234 | //qDebug(" Generatemail::buildTxtPart %s", str.latin1()); |
233 | param = mailmime_parameter_new( strdup( "charset" ), | 235 | param = mailmime_parameter_new( strdup( "charset" ), |
234 | strdup( mCharset.latin1() ) ); | 236 | strdup( mCharset.latin1() ) ); |
@@ -252,7 +254,7 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) { | |||
252 | goto err_free_fields; | 254 | goto err_free_fields; |
253 | { | 255 | { |
254 | //__str = str.utf8(); | 256 | //__str = str.utf8(); |
255 | __str = QCString (str.latin1()); | 257 | __str = Q3CString (str.latin1()); |
256 | err = mailmime_set_body_text( txtPart, strdup(__str.data()), __str.length() ); | 258 | err = mailmime_set_body_text( txtPart, strdup(__str.data()), __str.length() ); |
257 | } | 259 | } |
258 | if ( err != MAILIMF_NO_ERROR ) | 260 | if ( err != MAILIMF_NO_ERROR ) |
diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp index 0b6adf7..633ab42 100644 --- a/kmicromail/libmailwrapper/genericwrapper.cpp +++ b/kmicromail/libmailwrapper/genericwrapper.cpp | |||
@@ -6,6 +6,8 @@ | |||
6 | #include <kconfig.h> | 6 | #include <kconfig.h> |
7 | #include <kglobal.h> | 7 | #include <kglobal.h> |
8 | #include <kstandarddirs.h> | 8 | #include <kstandarddirs.h> |
9 | //Added by qt3to4: | ||
10 | #include <Q3ValueList> | ||
9 | 11 | ||
10 | 12 | ||
11 | using namespace Opie::Core; | 13 | using namespace Opie::Core; |
@@ -182,7 +184,7 @@ QString Genericwrapper::getencoding(mailmime_mechanism*aEnc) | |||
182 | return enc; | 184 | return enc; |
183 | } | 185 | } |
184 | 186 | ||
185 | void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rec,int current_count) | 187 | void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,Q3ValueList<int>recList,unsigned int current_rec,int current_count) |
186 | { | 188 | { |
187 | if (current_rec >= 10) { | 189 | if (current_rec >= 10) { |
188 | ; // odebug << "too deep recursion!" << oendl; | 190 | ; // odebug << "too deep recursion!" << oendl; |
@@ -200,7 +202,7 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m | |||
200 | switch (mime->mm_type) { | 202 | switch (mime->mm_type) { |
201 | case MAILMIME_SINGLE: | 203 | case MAILMIME_SINGLE: |
202 | { | 204 | { |
203 | QValueList<int>countlist = recList; | 205 | Q3ValueList<int>countlist = recList; |
204 | countlist.append(current_count); | 206 | countlist.append(current_count); |
205 | r = mailmessage_fetch_section(message,mime,&data,&len); | 207 | r = mailmessage_fetch_section(message,mime,&data,&len); |
206 | part->setSize(len); | 208 | part->setSize(len); |
@@ -250,7 +252,7 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m | |||
250 | { | 252 | { |
251 | unsigned int ccount = 1; | 253 | unsigned int ccount = 1; |
252 | mailmime*cbody=0; | 254 | mailmime*cbody=0; |
253 | QValueList<int>countlist = recList; | 255 | Q3ValueList<int>countlist = recList; |
254 | for (cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list) ; cur != NULL ; cur = clist_next(cur)) { | 256 | for (cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list) ; cur != NULL ; cur = clist_next(cur)) { |
255 | cbody = (mailmime*)clist_content(cur); | 257 | cbody = (mailmime*)clist_content(cur); |
256 | if (cbody->mm_type==MAILMIME_MULTIPLE) { | 258 | if (cbody->mm_type==MAILMIME_MULTIPLE) { |
@@ -270,7 +272,7 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m | |||
270 | break; | 272 | break; |
271 | case MAILMIME_MESSAGE: | 273 | case MAILMIME_MESSAGE: |
272 | { | 274 | { |
273 | QValueList<int>countlist = recList; | 275 | Q3ValueList<int>countlist = recList; |
274 | countlist.append(current_count); | 276 | countlist.append(current_count); |
275 | /* the own header is always at recursion 0 - we don't need that */ | 277 | /* the own header is always at recursion 0 - we don't need that */ |
276 | if (current_rec > 0) { | 278 | if (current_rec > 0) { |
@@ -302,7 +304,7 @@ RecBodyP Genericwrapper::parseMail( mailmessage * msg ) | |||
302 | RecBodyP body = new RecBody(); | 304 | RecBodyP body = new RecBody(); |
303 | //memset(&fields, 0, sizeof(struct mailmime_single_fields)); | 305 | //memset(&fields, 0, sizeof(struct mailmime_single_fields)); |
304 | err = mailmessage_get_bodystructure(msg,&mime); | 306 | err = mailmessage_get_bodystructure(msg,&mime); |
305 | QValueList<int>recList; | 307 | Q3ValueList<int>recList; |
306 | traverseBody(body,msg,mime,recList); | 308 | traverseBody(body,msg,mime,recList); |
307 | return body; | 309 | return body; |
308 | } | 310 | } |
@@ -447,7 +449,7 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) | |||
447 | return res; | 449 | return res; |
448 | } | 450 | } |
449 | 451 | ||
450 | void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to, int maxSizeInKb) | 452 | void Genericwrapper::parseList(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to, int maxSizeInKb) |
451 | { | 453 | { |
452 | int r; | 454 | int r; |
453 | mailmessage_list * env_list = 0; | 455 | mailmessage_list * env_list = 0; |
diff --git a/kmicromail/libmailwrapper/genericwrapper.h b/kmicromail/libmailwrapper/genericwrapper.h index c35a6da..a50161d 100644 --- a/kmicromail/libmailwrapper/genericwrapper.h +++ b/kmicromail/libmailwrapper/genericwrapper.h | |||
@@ -5,6 +5,8 @@ | |||
5 | #include "abstractmail.h" | 5 | #include "abstractmail.h" |
6 | #include <qmap.h> | 6 | #include <qmap.h> |
7 | #include <qstring.h> | 7 | #include <qstring.h> |
8 | //Added by qt3to4: | ||
9 | #include <Q3ValueList> | ||
8 | #include <libetpan/clist.h> | 10 | #include <libetpan/clist.h> |
9 | 11 | ||
10 | class RecMail; | 12 | class RecMail; |
@@ -51,11 +53,11 @@ protected: | |||
51 | QString parseGroup( mailimf_group *group ); | 53 | QString parseGroup( mailimf_group *group ); |
52 | QString parseAddressList( mailimf_address_list *list ); | 54 | QString parseAddressList( mailimf_address_list *list ); |
53 | 55 | ||
54 | void traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rek=0,int current_count=1); | 56 | void traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,Q3ValueList<int>recList,unsigned int current_rek=0,int current_count=1); |
55 | static void fillSingleBody(RecPartP&target,mailmessage*message,mailmime*mime); | 57 | static void fillSingleBody(RecPartP&target,mailmessage*message,mailmime*mime); |
56 | static void fillParameters(RecPartP&target,clist*parameters); | 58 | static void fillParameters(RecPartP&target,clist*parameters); |
57 | static QString getencoding(mailmime_mechanism*aEnc); | 59 | static QString getencoding(mailmime_mechanism*aEnc); |
58 | virtual void parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false, int maxSizeInKb = 0); | 60 | virtual void parseList(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false, int maxSizeInKb = 0); |
59 | QStringList parseInreplies(mailimf_in_reply_to * in_replies); | 61 | QStringList parseInreplies(mailimf_in_reply_to * in_replies); |
60 | 62 | ||
61 | QString msgTempName; | 63 | QString msgTempName; |
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp index 4f0c849..f73f4cc 100644 --- a/kmicromail/libmailwrapper/imapwrapper.cpp +++ b/kmicromail/libmailwrapper/imapwrapper.cpp | |||
@@ -3,10 +3,12 @@ | |||
3 | #include <libetpan/libetpan.h> | 3 | #include <libetpan/libetpan.h> |
4 | #include <qpe/global.h> | 4 | #include <qpe/global.h> |
5 | #include <qapplication.h> | 5 | #include <qapplication.h> |
6 | //Added by qt3to4: | ||
7 | #include <Q3ValueList> | ||
6 | #include "imapwrapper.h" | 8 | #include "imapwrapper.h" |
7 | #include "mailtypes.h" | 9 | #include "mailtypes.h" |
8 | #include "logindialog.h" | 10 | #include "logindialog.h" |
9 | #include <qprogressbar.h> | 11 | #include <q3progressbar.h> |
10 | #include "genericwrapper.h" | 12 | #include "genericwrapper.h" |
11 | #include <kglobal.h> | 13 | #include <kglobal.h> |
12 | 14 | ||
@@ -239,7 +241,7 @@ void IMAPwrapper::logout() | |||
239 | m_Lastmbox = ""; | 241 | m_Lastmbox = ""; |
240 | } | 242 | } |
241 | 243 | ||
242 | void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb) | 244 | void IMAPwrapper::listMessages(const QString&mailbox,Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb) |
243 | { | 245 | { |
244 | 246 | ||
245 | int tryAgain = 1; | 247 | int tryAgain = 1; |
@@ -320,7 +322,7 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma | |||
320 | } | 322 | } |
321 | } | 323 | } |
322 | 324 | ||
323 | QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() | 325 | Q3ValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() |
324 | { | 326 | { |
325 | const char *path, *mask; | 327 | const char *path, *mask; |
326 | int err = MAILIMAP_NO_ERROR; | 328 | int err = MAILIMAP_NO_ERROR; |
@@ -329,7 +331,7 @@ QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() | |||
329 | clistcell*cur_flag = 0; | 331 | clistcell*cur_flag = 0; |
330 | mailimap_mbx_list_flags*bflags = 0; | 332 | mailimap_mbx_list_flags*bflags = 0; |
331 | 333 | ||
332 | QValueList<FolderP>* folders = new QValueList<FolderP>(); | 334 | Q3ValueList<FolderP>* folders = new Q3ValueList<FolderP>(); |
333 | login(); | 335 | login(); |
334 | if (!m_imap) { | 336 | if (!m_imap) { |
335 | return folders; | 337 | return folders; |
@@ -613,7 +615,7 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) | |||
613 | mailimap_msg_att * msg_att; | 615 | mailimap_msg_att * msg_att; |
614 | msg_att = (mailimap_msg_att*)current->data; | 616 | msg_att = (mailimap_msg_att*)current->data; |
615 | mailimap_msg_att_item*item = (mailimap_msg_att_item*)msg_att->att_list->first->data; | 617 | mailimap_msg_att_item*item = (mailimap_msg_att_item*)msg_att->att_list->first->data; |
616 | QValueList<int> path; | 618 | Q3ValueList<int> path; |
617 | body_desc = item->att_data.att_static->att_data.att_body; | 619 | body_desc = item->att_data.att_static->att_data.att_body; |
618 | traverseBody(mail,body_desc,body,0,path); | 620 | traverseBody(mail,body_desc,body,0,path); |
619 | } else { | 621 | } else { |
@@ -664,7 +666,7 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) | |||
664 | return l; | 666 | return l; |
665 | } | 667 | } |
666 | 668 | ||
667 | encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call) | 669 | encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call) |
668 | { | 670 | { |
669 | encodedString*res=new encodedString; | 671 | encodedString*res=new encodedString; |
670 | int err; | 672 | int err; |
@@ -738,7 +740,7 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int | |||
738 | /* current_recursion is for recursive calls. | 740 | /* current_recursion is for recursive calls. |
739 | current_count means the position inside the internal loop! */ | 741 | current_count means the position inside the internal loop! */ |
740 | void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body, | 742 | void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body, |
741 | int current_recursion,QValueList<int>recList,int current_count) | 743 | int current_recursion,Q3ValueList<int>recList,int current_count) |
742 | { | 744 | { |
743 | if (!body || current_recursion>=10) { | 745 | if (!body || current_recursion>=10) { |
744 | return; | 746 | return; |
@@ -746,7 +748,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t | |||
746 | switch (body->bd_type) { | 748 | switch (body->bd_type) { |
747 | case MAILIMAP_BODY_1PART: | 749 | case MAILIMAP_BODY_1PART: |
748 | { | 750 | { |
749 | QValueList<int>countlist = recList; | 751 | Q3ValueList<int>countlist = recList; |
750 | countlist.append(current_count); | 752 | countlist.append(current_count); |
751 | RecPartP currentPart = new RecPart(); | 753 | RecPartP currentPart = new RecPart(); |
752 | mailimap_body_type_1part*part1 = body->bd_data.bd_body_1part; | 754 | mailimap_body_type_1part*part1 = body->bd_data.bd_body_1part; |
@@ -799,7 +801,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t | |||
799 | break; | 801 | break; |
800 | case MAILIMAP_BODY_MPART: | 802 | case MAILIMAP_BODY_MPART: |
801 | { | 803 | { |
802 | QValueList<int>countlist = recList; | 804 | Q3ValueList<int>countlist = recList; |
803 | clistcell*current=0; | 805 | clistcell*current=0; |
804 | mailimap_body*current_body=0; | 806 | mailimap_body*current_body=0; |
805 | unsigned int ccount = 1; | 807 | unsigned int ccount = 1; |
@@ -985,7 +987,7 @@ void IMAPwrapper::fillBodyFields(RecPartP&target_part,mailimap_body_fields*which | |||
985 | target_part->setEncoding(encoding); | 987 | target_part->setEncoding(encoding); |
986 | target_part->setSize(which->bd_size); | 988 | target_part->setSize(which->bd_size); |
987 | } | 989 | } |
988 | void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target) | 990 | void IMAPwrapper::deleteMailList(const Q3ValueList<RecMailP>&target) |
989 | { | 991 | { |
990 | //#if 0 | 992 | //#if 0 |
991 | mailimap_flag_list*flist; | 993 | mailimap_flag_list*flist; |
@@ -1005,7 +1007,7 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target) | |||
1005 | mMax = count; | 1007 | mMax = count; |
1006 | progress( i18n("Delete")); | 1008 | progress( i18n("Delete")); |
1007 | 1009 | ||
1008 | QProgressBar wid ( count ); | 1010 | Q3ProgressBar wid ( count ); |
1009 | wid.setCaption( i18n("Deleting ...")); | 1011 | wid.setCaption( i18n("Deleting ...")); |
1010 | wid.show(); | 1012 | wid.show(); |
1011 | while (iii < count ) { | 1013 | while (iii < count ) { |
@@ -1114,7 +1116,7 @@ void IMAPwrapper::answeredMail(const RecMailP&mail) | |||
1114 | } | 1116 | } |
1115 | } | 1117 | } |
1116 | 1118 | ||
1117 | QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call,const QString&enc) | 1119 | QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call,const QString&enc) |
1118 | { | 1120 | { |
1119 | QString body(""); | 1121 | QString body(""); |
1120 | encodedString*res = fetchRawPart(mail,path,internal_call); | 1122 | encodedString*res = fetchRawPart(mail,path,internal_call); |
@@ -1299,7 +1301,7 @@ const QString&IMAPwrapper::getName()const | |||
1299 | encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail) | 1301 | encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail) |
1300 | { | 1302 | { |
1301 | // dummy | 1303 | // dummy |
1302 | QValueList<int> path; | 1304 | Q3ValueList<int> path; |
1303 | return fetchRawPart(mail,path,false); | 1305 | return fetchRawPart(mail,path,false); |
1304 | } | 1306 | } |
1305 | 1307 | ||
diff --git a/kmicromail/libmailwrapper/imapwrapper.h b/kmicromail/libmailwrapper/imapwrapper.h index 31c60a8..d3d3ecd 100644 --- a/kmicromail/libmailwrapper/imapwrapper.h +++ b/kmicromail/libmailwrapper/imapwrapper.h | |||
@@ -3,6 +3,8 @@ | |||
3 | #define __IMAPWRAPPER | 3 | #define __IMAPWRAPPER |
4 | 4 | ||
5 | #include <qlist.h> | 5 | #include <qlist.h> |
6 | //Added by qt3to4: | ||
7 | #include <Q3ValueList> | ||
6 | #include "mailwrapper.h" | 8 | #include "mailwrapper.h" |
7 | #include "abstractmail.h" | 9 | #include "abstractmail.h" |
8 | #include <libetpan/clist.h> | 10 | #include <libetpan/clist.h> |
@@ -24,12 +26,12 @@ class IMAPwrapper : public AbstractMail | |||
24 | public: | 26 | public: |
25 | IMAPwrapper( IMAPaccount *a ); | 27 | IMAPwrapper( IMAPaccount *a ); |
26 | virtual ~IMAPwrapper(); | 28 | virtual ~IMAPwrapper(); |
27 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); | 29 | virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); |
28 | virtual void listMessages(const QString & mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> >&target , int sizeInKb = 0); | 30 | virtual void listMessages(const QString & mailbox,Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target , int sizeInKb = 0); |
29 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | 31 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); |
30 | 32 | ||
31 | virtual void deleteMail(const RecMailP&mail); | 33 | virtual void deleteMail(const RecMailP&mail); |
32 | void deleteMailList(const QValueList<RecMailP>&target); | 34 | void deleteMailList(const Q3ValueList<RecMailP>&target); |
33 | virtual void answeredMail(const RecMailP&mail); | 35 | virtual void answeredMail(const RecMailP&mail); |
34 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&folder); | 36 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&folder); |
35 | virtual void storeMessage(const char*msg,size_t length, const QString&folder); | 37 | virtual void storeMessage(const char*msg,size_t length, const QString&folder); |
@@ -59,8 +61,8 @@ protected: | |||
59 | void login(bool tryTLS = true); | 61 | void login(bool tryTLS = true); |
60 | bool start_tls(bool force=true); | 62 | bool start_tls(bool force=true); |
61 | 63 | ||
62 | virtual QString fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call=false,const QString&enc=""); | 64 | virtual QString fetchTextPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call=false,const QString&enc=""); |
63 | virtual encodedString*fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call); | 65 | virtual encodedString*fetchRawPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call); |
64 | int selectMbox(const QString&mbox); | 66 | int selectMbox(const QString&mbox); |
65 | 67 | ||
66 | void fillSinglePart(RecPartP&target_part,mailimap_body_type_1part*Description); | 68 | void fillSinglePart(RecPartP&target_part,mailimap_body_type_1part*Description); |
@@ -68,7 +70,7 @@ protected: | |||
68 | void fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_basic*which); | 70 | void fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_basic*which); |
69 | void fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg*which); | 71 | void fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg*which); |
70 | void fillMultiPart(RecPartP&target_part,mailimap_body_type_mpart*which); | 72 | void fillMultiPart(RecPartP&target_part,mailimap_body_type_mpart*which); |
71 | void traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,int current_recursion,QValueList<int>recList,int current_count=1); | 73 | void traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,int current_recursion,Q3ValueList<int>recList,int current_count=1); |
72 | 74 | ||
73 | /* just helpers */ | 75 | /* just helpers */ |
74 | static void fillBodyFields(RecPartP&target_part,mailimap_body_fields*which); | 76 | static void fillBodyFields(RecPartP&target_part,mailimap_body_fields*which); |
diff --git a/kmicromail/libmailwrapper/libmailwrapper.pro b/kmicromail/libmailwrapper/libmailwrapper.pro index 646630b..6b595ab 100644 --- a/kmicromail/libmailwrapper/libmailwrapper.pro +++ b/kmicromail/libmailwrapper/libmailwrapper.pro | |||
@@ -38,7 +38,8 @@ SOURCES = imapwrapper.cpp \ | |||
38 | ../qpe/qdialog_hacked.cpp \ | 38 | ../qpe/qdialog_hacked.cpp \ |
39 | ../qpe/global.cpp | 39 | ../qpe/global.cpp |
40 | 40 | ||
41 | INTERFACES = logindialogui.ui \ | 41 | #The following line was changed from INTERFACES to FORMS3 by qt3to4 |
42 | FORMS3 = logindialogui.ui \ | ||
42 | sendmailprogressui.ui | 43 | sendmailprogressui.ui |
43 | 44 | ||
44 | INCLUDEPATH += ../qpe .. ../../microkde ../../microkde/kdecore ../../libetpan/include | 45 | INCLUDEPATH += ../qpe .. ../../microkde ../../microkde/kdecore ../../libetpan/include |
@@ -63,3 +64,8 @@ QMAKE_LINK += /NODEFAULTLIB:LIBC | |||
63 | OBJECTS_DIR = obj/win | 64 | OBJECTS_DIR = obj/win |
64 | MOC_DIR = moc/win | 65 | MOC_DIR = moc/win |
65 | } | 66 | } |
67 | #The following line was inserted by qt3to4 | ||
68 | QT += xml qt3support | ||
69 | #The following line was inserted by qt3to4 | ||
70 | CONFIG += uic3 | ||
71 | |||
diff --git a/kmicromail/libmailwrapper/logindialog.cpp b/kmicromail/libmailwrapper/logindialog.cpp index 31b75d0..d1f4b5d 100644 --- a/kmicromail/libmailwrapper/logindialog.cpp +++ b/kmicromail/libmailwrapper/logindialog.cpp | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | //using namespace Opie::Core; | 7 | //using namespace Opie::Core; |
8 | 8 | ||
9 | LoginDialog::LoginDialog(const QString&user,const QString&pass, QWidget *parent, const char *name, bool modal, WFlags flags ) | 9 | LoginDialog::LoginDialog(const QString&user,const QString&pass, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) |
10 | : LoginDialogUI( parent, name, modal, flags ) | 10 | : LoginDialogUI( parent, name, modal, flags ) |
11 | { | 11 | { |
12 | userLine->setText( (user.isEmpty()?QString(""):user) ); | 12 | userLine->setText( (user.isEmpty()?QString(""):user) ); |
diff --git a/kmicromail/libmailwrapper/logindialog.h b/kmicromail/libmailwrapper/logindialog.h index f406f2c..a18daa5 100644 --- a/kmicromail/libmailwrapper/logindialog.h +++ b/kmicromail/libmailwrapper/logindialog.h | |||
@@ -8,7 +8,7 @@ class LoginDialog : public LoginDialogUI | |||
8 | Q_OBJECT | 8 | Q_OBJECT |
9 | 9 | ||
10 | public: | 10 | public: |
11 | LoginDialog(const QString&user,const QString&pass, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); | 11 | LoginDialog(const QString&user,const QString&pass, QWidget *parent = 0, const char *name = 0, bool modal = false, Qt::WFlags flags = 0 ); |
12 | QString getUser() { return _user; } | 12 | QString getUser() { return _user; } |
13 | QString getPassword() { return _pass; } | 13 | QString getPassword() { return _pass; } |
14 | 14 | ||
diff --git a/kmicromail/libmailwrapper/mailtypes.cpp b/kmicromail/libmailwrapper/mailtypes.cpp index 70a0ab5..84ccf9f 100644 --- a/kmicromail/libmailwrapper/mailtypes.cpp +++ b/kmicromail/libmailwrapper/mailtypes.cpp | |||
@@ -3,6 +3,8 @@ | |||
3 | //#include <opie2/odebug.h> | 3 | //#include <opie2/odebug.h> |
4 | 4 | ||
5 | #include <stdlib.h> | 5 | #include <stdlib.h> |
6 | //Added by qt3to4: | ||
7 | #include <Q3ValueList> | ||
6 | 8 | ||
7 | using namespace Opie::Core; | 9 | using namespace Opie::Core; |
8 | RecMail::RecMail() | 10 | RecMail::RecMail() |
@@ -283,12 +285,12 @@ const QString RecPart::searchParamter(const QString&key)const | |||
283 | return value; | 285 | return value; |
284 | } | 286 | } |
285 | 287 | ||
286 | void RecPart::setPositionlist(const QValueList<int>&poslist) | 288 | void RecPart::setPositionlist(const Q3ValueList<int>&poslist) |
287 | { | 289 | { |
288 | m_poslist = poslist; | 290 | m_poslist = poslist; |
289 | } | 291 | } |
290 | 292 | ||
291 | const QValueList<int>& RecPart::Positionlist()const | 293 | const Q3ValueList<int>& RecPart::Positionlist()const |
292 | { | 294 | { |
293 | return m_poslist; | 295 | return m_poslist; |
294 | } | 296 | } |
@@ -323,13 +325,13 @@ const QString& RecBody::Bodytext()const | |||
323 | return m_BodyText; | 325 | return m_BodyText; |
324 | } | 326 | } |
325 | 327 | ||
326 | void RecBody::setParts(const QValueList<RecPartP>&parts) | 328 | void RecBody::setParts(const Q3ValueList<RecPartP>&parts) |
327 | { | 329 | { |
328 | m_PartsList.clear(); | 330 | m_PartsList.clear(); |
329 | m_PartsList = parts; | 331 | m_PartsList = parts; |
330 | } | 332 | } |
331 | 333 | ||
332 | const QValueList<RecPartP>& RecBody::Parts()const | 334 | const Q3ValueList<RecPartP>& RecBody::Parts()const |
333 | { | 335 | { |
334 | return m_PartsList; | 336 | return m_PartsList; |
335 | } | 337 | } |
diff --git a/kmicromail/libmailwrapper/mailtypes.h b/kmicromail/libmailwrapper/mailtypes.h index 97f10d7..ac7f8da 100644 --- a/kmicromail/libmailwrapper/mailtypes.h +++ b/kmicromail/libmailwrapper/mailtypes.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <qstring.h> | 14 | #include <qstring.h> |
15 | #include <qstringlist.h> | 15 | #include <qstringlist.h> |
16 | #include <qmap.h> | 16 | #include <qmap.h> |
17 | #include <qvaluelist.h> | 17 | #include <q3valuelist.h> |
18 | 18 | ||
19 | class AbstractMail; | 19 | class AbstractMail; |
20 | /* a class to describe mails in a mailbox */ | 20 | /* a class to describe mails in a mailbox */ |
@@ -109,7 +109,7 @@ protected: | |||
109 | unsigned int m_lines,m_size; | 109 | unsigned int m_lines,m_size; |
110 | part_plist_t m_Parameters; | 110 | part_plist_t m_Parameters; |
111 | /* describes the position in the mail */ | 111 | /* describes the position in the mail */ |
112 | QValueList<int> m_poslist; | 112 | Q3ValueList<int> m_poslist; |
113 | 113 | ||
114 | public: | 114 | public: |
115 | RecPart(); | 115 | RecPart(); |
@@ -136,8 +136,8 @@ public: | |||
136 | const part_plist_t&Parameters()const; | 136 | const part_plist_t&Parameters()const; |
137 | void addParameter(const QString&key,const QString&value); | 137 | void addParameter(const QString&key,const QString&value); |
138 | const QString searchParamter(const QString&key)const; | 138 | const QString searchParamter(const QString&key)const; |
139 | void setPositionlist(const QValueList<int>&poslist); | 139 | void setPositionlist(const Q3ValueList<int>&poslist); |
140 | const QValueList<int>& Positionlist()const; | 140 | const Q3ValueList<int>& Positionlist()const; |
141 | }; | 141 | }; |
142 | 142 | ||
143 | typedef Opie::Core::OSmartPointer<RecPart> RecPartP; | 143 | typedef Opie::Core::OSmartPointer<RecPart> RecPartP; |
@@ -147,7 +147,7 @@ class RecBody:public Opie::Core::ORefCount | |||
147 | protected: | 147 | protected: |
148 | QString m_BodyText; | 148 | QString m_BodyText; |
149 | QString mCharset; | 149 | QString mCharset; |
150 | QValueList<RecPartP> m_PartsList; | 150 | Q3ValueList<RecPartP> m_PartsList; |
151 | RecPartP m_description; | 151 | RecPartP m_description; |
152 | 152 | ||
153 | public: | 153 | public: |
@@ -162,8 +162,8 @@ public: | |||
162 | void setDescription(const RecPartP&des); | 162 | void setDescription(const RecPartP&des); |
163 | const RecPartP& Description()const; | 163 | const RecPartP& Description()const; |
164 | 164 | ||
165 | void setParts(const QValueList<RecPartP>&parts); | 165 | void setParts(const Q3ValueList<RecPartP>&parts); |
166 | const QValueList<RecPartP>& Parts()const; | 166 | const Q3ValueList<RecPartP>& Parts()const; |
167 | void addPart(const RecPartP&part); | 167 | void addPart(const RecPartP&part); |
168 | }; | 168 | }; |
169 | 169 | ||
diff --git a/kmicromail/libmailwrapper/mailwrapper.cpp b/kmicromail/libmailwrapper/mailwrapper.cpp index 2ee1ab3..9c299e8 100644 --- a/kmicromail/libmailwrapper/mailwrapper.cpp +++ b/kmicromail/libmailwrapper/mailwrapper.cpp | |||
@@ -5,6 +5,8 @@ | |||
5 | #include <fcntl.h> | 5 | #include <fcntl.h> |
6 | #include <string.h> | 6 | #include <string.h> |
7 | #include <qdir.h> | 7 | #include <qdir.h> |
8 | //Added by qt3to4: | ||
9 | #include <Q3CString> | ||
8 | 10 | ||
9 | #include "mailwrapper.h" | 11 | #include "mailwrapper.h" |
10 | //#include "logindialog.h" | 12 | //#include "logindialog.h" |
@@ -81,8 +83,8 @@ QString IMAPFolder::decodeFolderName( const QString &name ) | |||
81 | unsigned long ucs4, utf16, bitbuf; | 83 | unsigned long ucs4, utf16, bitbuf; |
82 | unsigned char base64[256], utf8[6]; | 84 | unsigned char base64[256], utf8[6]; |
83 | unsigned long srcPtr = 0; | 85 | unsigned long srcPtr = 0; |
84 | QCString dst = ""; | 86 | Q3CString dst = ""; |
85 | QCString src = name.ascii(); | 87 | Q3CString src = name.ascii(); |
86 | 88 | ||
87 | /* initialize modified base64 decoding table */ | 89 | /* initialize modified base64 decoding table */ |
88 | memset(base64, UNDEFINED, sizeof(base64)); | 90 | memset(base64, UNDEFINED, sizeof(base64)); |
@@ -92,9 +94,9 @@ QString IMAPFolder::decodeFolderName( const QString &name ) | |||
92 | 94 | ||
93 | /* loop until end of string */ | 95 | /* loop until end of string */ |
94 | while (srcPtr < src.length ()) { | 96 | while (srcPtr < src.length ()) { |
95 | c = src[srcPtr++]; | 97 | c = src.at(srcPtr++); |
96 | /* deal with literal characters and &- */ | 98 | /* deal with literal characters and &- */ |
97 | if (c != '&' || src[srcPtr] == '-') { | 99 | if (c != '&' || src.at(srcPtr) == '-') { |
98 | /* encode literally */ | 100 | /* encode literally */ |
99 | dst += c; | 101 | dst += c; |
100 | /* skip over the '-' if this is an &- sequence */ | 102 | /* skip over the '-' if this is an &- sequence */ |
@@ -105,7 +107,7 @@ QString IMAPFolder::decodeFolderName( const QString &name ) | |||
105 | bitbuf = 0; | 107 | bitbuf = 0; |
106 | bitcount = 0; | 108 | bitcount = 0; |
107 | ucs4 = 0; | 109 | ucs4 = 0; |
108 | while ((c = base64[(unsigned char) src[srcPtr]]) != UNDEFINED) { | 110 | while ((c = base64[(unsigned char) src.at(srcPtr)]) != UNDEFINED) { |
109 | ++srcPtr; | 111 | ++srcPtr; |
110 | bitbuf = (bitbuf << 6) | c; | 112 | bitbuf = (bitbuf << 6) | c; |
111 | bitcount += 6; | 113 | bitcount += 6; |
@@ -149,7 +151,7 @@ QString IMAPFolder::decodeFolderName( const QString &name ) | |||
149 | } | 151 | } |
150 | } | 152 | } |
151 | /* skip over trailing '-' in modified UTF-7 encoding */ | 153 | /* skip over trailing '-' in modified UTF-7 encoding */ |
152 | if (src[srcPtr] == '-') | 154 | if (src.at(srcPtr) == '-') |
153 | ++srcPtr; | 155 | ++srcPtr; |
154 | } | 156 | } |
155 | } | 157 | } |
diff --git a/kmicromail/libmailwrapper/mailwrapper.h b/kmicromail/libmailwrapper/mailwrapper.h index 3e8b51f..bebabf4 100644 --- a/kmicromail/libmailwrapper/mailwrapper.h +++ b/kmicromail/libmailwrapper/mailwrapper.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #include <qbitarray.h> | 6 | #include <qbitarray.h> |
7 | #include <qdatetime.h> | 7 | #include <qdatetime.h> |
8 | #include <qfileinfo.h> | 8 | #include <qfileinfo.h> |
9 | //Added by qt3to4: | ||
10 | #include <QPixmap> | ||
9 | #include <kiconloader.h> | 11 | #include <kiconloader.h> |
10 | 12 | ||
11 | #include "settings.h" | 13 | #include "settings.h" |
@@ -61,7 +63,7 @@ public: | |||
61 | */ | 63 | */ |
62 | virtual ~Mail(){} | 64 | virtual ~Mail(){} |
63 | void addAttachment( Attachment *att ) { attList.append( att ); } | 65 | void addAttachment( Attachment *att ) { attList.append( att ); } |
64 | const QList<Attachment>& getAttachments()const { return attList; } | 66 | const QList<Attachment*>& getAttachments()const { return attList; } |
65 | void removeAttachment( Attachment *att ) { attList.remove( att ); } | 67 | void removeAttachment( Attachment *att ) { attList.remove( att ); } |
66 | const QString&getName()const { return name; } | 68 | const QString&getName()const { return name; } |
67 | void setName( QString s ) { name = s; } | 69 | void setName( QString s ) { name = s; } |
@@ -86,7 +88,7 @@ public: | |||
86 | const QString& getCharset() const { return charset; } | 88 | const QString& getCharset() const { return charset; } |
87 | 89 | ||
88 | private: | 90 | private: |
89 | QList<Attachment> attList; | 91 | QList<Attachment*> attList; |
90 | QString name, mail, to, cc, bcc, reply, subject, message, charset; | 92 | QString name, mail, to, cc, bcc, reply, subject, message, charset; |
91 | QStringList m_in_reply_to; | 93 | QStringList m_in_reply_to; |
92 | }; | 94 | }; |
diff --git a/kmicromail/libmailwrapper/mboxwrapper.cpp b/kmicromail/libmailwrapper/mboxwrapper.cpp index 87f8c8a..888cae2 100644 --- a/kmicromail/libmailwrapper/mboxwrapper.cpp +++ b/kmicromail/libmailwrapper/mboxwrapper.cpp | |||
@@ -3,6 +3,8 @@ | |||
3 | #include "mailwrapper.h" | 3 | #include "mailwrapper.h" |
4 | #include <libetpan/libetpan.h> | 4 | #include <libetpan/libetpan.h> |
5 | #include <qdir.h> | 5 | #include <qdir.h> |
6 | //Added by qt3to4: | ||
7 | #include <Q3ValueList> | ||
6 | #include <stdlib.h> | 8 | #include <stdlib.h> |
7 | #include <klocale.h> | 9 | #include <klocale.h> |
8 | 10 | ||
@@ -23,7 +25,7 @@ MBOXwrapper::~MBOXwrapper() | |||
23 | { | 25 | { |
24 | } | 26 | } |
25 | 27 | ||
26 | void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &target ) | 28 | void MBOXwrapper::listMessages(const QString & mailbox, Q3ValueList<RecMailP> &target ) |
27 | { | 29 | { |
28 | mailstorage*storage = mailstorage_new(NULL); | 30 | mailstorage*storage = mailstorage_new(NULL); |
29 | QString p = MBOXPath+"/"; | 31 | QString p = MBOXPath+"/"; |
@@ -48,9 +50,9 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &ta | |||
48 | Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count())); | 50 | Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count())); |
49 | } | 51 | } |
50 | 52 | ||
51 | QValueList<Opie::Core::OSmartPointer<Folder> >* MBOXwrapper::listFolders() | 53 | Q3ValueList<Opie::Core::OSmartPointer<Folder> >* MBOXwrapper::listFolders() |
52 | { | 54 | { |
53 | QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); | 55 | Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >(); |
54 | QDir dir(MBOXPath); | 56 | QDir dir(MBOXPath); |
55 | if (!dir.exists()) return folders; | 57 | if (!dir.exists()) return folders; |
56 | dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable); | 58 | dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable); |
@@ -217,7 +219,7 @@ encodedString* MBOXwrapper::fetchRawBody(const RecMailP&mail) | |||
217 | return result; | 219 | return result; |
218 | } | 220 | } |
219 | 221 | ||
220 | void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> &target) | 222 | void MBOXwrapper::deleteMails(const QString & mailbox,const Q3ValueList<RecMailP> &target) |
221 | { | 223 | { |
222 | QString p = MBOXPath+"/"; | 224 | QString p = MBOXPath+"/"; |
223 | p+=mailbox; | 225 | p+=mailbox; |
@@ -231,11 +233,11 @@ void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> | |||
231 | mailmbox_done(f); | 233 | mailmbox_done(f); |
232 | } | 234 | } |
233 | 235 | ||
234 | void MBOXwrapper::deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target) | 236 | void MBOXwrapper::deleteMails(mailmbox_folder*f,const Q3ValueList<RecMailP> &target) |
235 | { | 237 | { |
236 | if (!f) return; | 238 | if (!f) return; |
237 | int r; | 239 | int r; |
238 | QValueList<RecMailP>::ConstIterator it; | 240 | Q3ValueList<RecMailP>::ConstIterator it; |
239 | for (it=target.begin(); it != target.end();++it) { | 241 | for (it=target.begin(); it != target.end();++it) { |
240 | r = mailmbox_delete_msg(f,(*it)->getNumber()); | 242 | r = mailmbox_delete_msg(f,(*it)->getNumber()); |
241 | if (r!=MAILMBOX_NO_ERROR) { | 243 | if (r!=MAILMBOX_NO_ERROR) { |
diff --git a/kmicromail/libmailwrapper/mboxwrapper.h b/kmicromail/libmailwrapper/mboxwrapper.h index d03940f..e658a71 100644 --- a/kmicromail/libmailwrapper/mboxwrapper.h +++ b/kmicromail/libmailwrapper/mboxwrapper.h | |||
@@ -3,6 +3,8 @@ | |||
3 | 3 | ||
4 | #include "genericwrapper.h" | 4 | #include "genericwrapper.h" |
5 | #include <qstring.h> | 5 | #include <qstring.h> |
6 | //Added by qt3to4: | ||
7 | #include <Q3ValueList> | ||
6 | 8 | ||
7 | class encodedString; | 9 | class encodedString; |
8 | struct mailmbox_folder; | 10 | struct mailmbox_folder; |
@@ -15,8 +17,8 @@ public: | |||
15 | MBOXwrapper(const QString & dir,const QString&name); | 17 | MBOXwrapper(const QString & dir,const QString&name); |
16 | virtual ~MBOXwrapper(); | 18 | virtual ~MBOXwrapper(); |
17 | 19 | ||
18 | virtual void listMessages(const QString & mailbox, QValueList<RecMailP>&target ); | 20 | virtual void listMessages(const QString & mailbox, Q3ValueList<RecMailP>&target ); |
19 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); | 21 | virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); |
20 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | 22 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); |
21 | 23 | ||
22 | virtual void deleteMail(const RecMailP&mail); | 24 | virtual void deleteMail(const RecMailP&mail); |
@@ -32,14 +34,14 @@ public: | |||
32 | static void mbox_progress( size_t current, size_t maximum ); | 34 | static void mbox_progress( size_t current, size_t maximum ); |
33 | 35 | ||
34 | virtual encodedString* fetchRawBody(const RecMailP&mail); | 36 | virtual encodedString* fetchRawBody(const RecMailP&mail); |
35 | virtual void deleteMails(const QString & FolderName,const QValueList<RecMailP> &target); | 37 | virtual void deleteMails(const QString & FolderName,const Q3ValueList<RecMailP> &target); |
36 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); | 38 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); |
37 | virtual MAILLIB::ATYPE getType()const; | 39 | virtual MAILLIB::ATYPE getType()const; |
38 | virtual const QString&getName()const; | 40 | virtual const QString&getName()const; |
39 | virtual Account* getAccount() { return 0; }; | 41 | virtual Account* getAccount() { return 0; }; |
40 | 42 | ||
41 | protected: | 43 | protected: |
42 | static void deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target); | 44 | static void deleteMails(mailmbox_folder*f,const Q3ValueList<RecMailP> &target); |
43 | QString MBOXPath; | 45 | QString MBOXPath; |
44 | QString MBOXName; | 46 | QString MBOXName; |
45 | }; | 47 | }; |
diff --git a/kmicromail/libmailwrapper/mhwrapper.cpp b/kmicromail/libmailwrapper/mhwrapper.cpp index 787e85d..4cd7a94 100644 --- a/kmicromail/libmailwrapper/mhwrapper.cpp +++ b/kmicromail/libmailwrapper/mhwrapper.cpp | |||
@@ -5,6 +5,8 @@ | |||
5 | #include <libetpan/libetpan.h> | 5 | #include <libetpan/libetpan.h> |
6 | #include <qdir.h> | 6 | #include <qdir.h> |
7 | #include <qmessagebox.h> | 7 | #include <qmessagebox.h> |
8 | //Added by qt3to4: | ||
9 | #include <Q3ValueList> | ||
8 | #include <stdlib.h> | 10 | #include <stdlib.h> |
9 | #include <qpe/global.h> | 11 | #include <qpe/global.h> |
10 | #include <klocale.h> | 12 | #include <klocale.h> |
@@ -64,7 +66,7 @@ MHwrapper::~MHwrapper() | |||
64 | clean_storage(); | 66 | clean_storage(); |
65 | } | 67 | } |
66 | 68 | ||
67 | void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) | 69 | void MHwrapper::listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) |
68 | { | 70 | { |
69 | init_storage(); | 71 | init_storage(); |
70 | if (!m_storage) { | 72 | if (!m_storage) { |
@@ -80,9 +82,9 @@ void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSm | |||
80 | Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count())); | 82 | Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count())); |
81 | } | 83 | } |
82 | 84 | ||
83 | QValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() | 85 | Q3ValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() |
84 | { | 86 | { |
85 | QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); | 87 | Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >(); |
86 | /* this is needed! */ | 88 | /* this is needed! */ |
87 | if (m_storage) mailstorage_disconnect(m_storage); | 89 | if (m_storage) mailstorage_disconnect(m_storage); |
88 | init_storage(); | 90 | init_storage(); |
@@ -255,7 +257,7 @@ encodedString* MHwrapper::fetchRawBody(const RecMailP&mail) | |||
255 | return result; | 257 | return result; |
256 | } | 258 | } |
257 | 259 | ||
258 | void MHwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> &target) | 260 | void MHwrapper::deleteMails(const QString & mailbox,const Q3ValueList<RecMailP> &target) |
259 | { | 261 | { |
260 | QString f = buildPath(mailbox); | 262 | QString f = buildPath(mailbox); |
261 | int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); | 263 | int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); |
@@ -263,7 +265,7 @@ void MHwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> & | |||
263 | qDebug("deleteMails: error selecting folder! "); | 265 | qDebug("deleteMails: error selecting folder! "); |
264 | return; | 266 | return; |
265 | } | 267 | } |
266 | QValueList<RecMailP>::ConstIterator it; | 268 | Q3ValueList<RecMailP>::ConstIterator it; |
267 | for (it=target.begin(); it!=target.end();++it) { | 269 | for (it=target.begin(); it!=target.end();++it) { |
268 | r = mailsession_remove_message(m_storage->sto_session,(*it)->getNumber()); | 270 | r = mailsession_remove_message(m_storage->sto_session,(*it)->getNumber()); |
269 | if (r != MAIL_NO_ERROR) { | 271 | if (r != MAIL_NO_ERROR) { |
diff --git a/kmicromail/libmailwrapper/mhwrapper.h b/kmicromail/libmailwrapper/mhwrapper.h index 36a443a..6151ff1 100644 --- a/kmicromail/libmailwrapper/mhwrapper.h +++ b/kmicromail/libmailwrapper/mhwrapper.h | |||
@@ -6,6 +6,8 @@ | |||
6 | 6 | ||
7 | #include "genericwrapper.h" | 7 | #include "genericwrapper.h" |
8 | #include <qstring.h> | 8 | #include <qstring.h> |
9 | //Added by qt3to4: | ||
10 | #include <Q3ValueList> | ||
9 | 11 | ||
10 | class encodedString; | 12 | class encodedString; |
11 | struct mailmbox_folder; | 13 | struct mailmbox_folder; |
@@ -16,8 +18,8 @@ public: | |||
16 | MHwrapper(const QString & dir,const QString&name); | 18 | MHwrapper(const QString & dir,const QString&name); |
17 | virtual ~MHwrapper(); | 19 | virtual ~MHwrapper(); |
18 | 20 | ||
19 | virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); | 21 | virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); |
20 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); | 22 | virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); |
21 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | 23 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); |
22 | 24 | ||
23 | virtual void deleteMail(const RecMailP&mail); | 25 | virtual void deleteMail(const RecMailP&mail); |
@@ -36,7 +38,7 @@ public: | |||
36 | static void mbox_progress( size_t current, size_t maximum ); | 38 | static void mbox_progress( size_t current, size_t maximum ); |
37 | 39 | ||
38 | virtual encodedString* fetchRawBody(const RecMailP&mail); | 40 | virtual encodedString* fetchRawBody(const RecMailP&mail); |
39 | virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> > &target); | 41 | virtual void deleteMails(const QString & FolderName,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target); |
40 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); | 42 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); |
41 | virtual MAILLIB::ATYPE getType()const; | 43 | virtual MAILLIB::ATYPE getType()const; |
42 | virtual const QString&getName()const; | 44 | virtual const QString&getName()const; |
diff --git a/kmicromail/libmailwrapper/nntpwrapper.cpp b/kmicromail/libmailwrapper/nntpwrapper.cpp index 93cd2b5..b328ecd 100644 --- a/kmicromail/libmailwrapper/nntpwrapper.cpp +++ b/kmicromail/libmailwrapper/nntpwrapper.cpp | |||
@@ -4,6 +4,8 @@ | |||
4 | #include "mailtypes.h" | 4 | #include "mailtypes.h" |
5 | 5 | ||
6 | #include <qfile.h> | 6 | #include <qfile.h> |
7 | //Added by qt3to4: | ||
8 | #include <Q3ValueList> | ||
7 | 9 | ||
8 | #include <stdlib.h> | 10 | #include <stdlib.h> |
9 | 11 | ||
@@ -60,14 +62,14 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { | |||
60 | if (msg_cache.exists()) { | 62 | if (msg_cache.exists()) { |
61 | msg_cache.remove(); | 63 | msg_cache.remove(); |
62 | } | 64 | } |
63 | msg_cache.open(IO_ReadWrite|IO_Truncate); | 65 | msg_cache.open(QIODevice::ReadWrite|QIODevice::Truncate); |
64 | last_msg_id = mail->getNumber(); | 66 | last_msg_id = mail->getNumber(); |
65 | err = mailsession_get_message(m_nntp->sto_session, mail->getNumber(), &mailmsg); | 67 | err = mailsession_get_message(m_nntp->sto_session, mail->getNumber(), &mailmsg); |
66 | err = mailmessage_fetch(mailmsg,&message,&length); | 68 | err = mailmessage_fetch(mailmsg,&message,&length); |
67 | msg_cache.writeBlock(message,length); | 69 | msg_cache.writeBlock(message,length); |
68 | } else { | 70 | } else { |
69 | QString msg=""; | 71 | QString msg=""; |
70 | msg_cache.open(IO_ReadOnly); | 72 | msg_cache.open(QIODevice::ReadOnly); |
71 | message = new char[4096]; | 73 | message = new char[4096]; |
72 | memset(message,0,4096); | 74 | memset(message,0,4096); |
73 | while (msg_cache.readBlock(message,4095)>0) { | 75 | while (msg_cache.readBlock(message,4095)>0) { |
@@ -99,7 +101,7 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { | |||
99 | } | 101 | } |
100 | 102 | ||
101 | 103 | ||
102 | void NNTPwrapper::listMessages(const QString & which, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb) | 104 | void NNTPwrapper::listMessages(const QString & which, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb) |
103 | { | 105 | { |
104 | login(); | 106 | login(); |
105 | if (!m_nntp) | 107 | if (!m_nntp) |
@@ -186,9 +188,9 @@ void NNTPwrapper::logout() | |||
186 | m_nntp = 0; | 188 | m_nntp = 0; |
187 | } | 189 | } |
188 | 190 | ||
189 | QValueList<Opie::Core::OSmartPointer<Folder> >* NNTPwrapper::listFolders() { | 191 | Q3ValueList<Opie::Core::OSmartPointer<Folder> >* NNTPwrapper::listFolders() { |
190 | 192 | ||
191 | QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); | 193 | Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >(); |
192 | QStringList groups; | 194 | QStringList groups; |
193 | if (account) { | 195 | if (account) { |
194 | groups = account->getGroups(); | 196 | groups = account->getGroups(); |
diff --git a/kmicromail/libmailwrapper/nntpwrapper.h b/kmicromail/libmailwrapper/nntpwrapper.h index 8c54f12..7c8e671 100644 --- a/kmicromail/libmailwrapper/nntpwrapper.h +++ b/kmicromail/libmailwrapper/nntpwrapper.h | |||
@@ -5,6 +5,8 @@ | |||
5 | #include "mailwrapper.h" | 5 | #include "mailwrapper.h" |
6 | #include "genericwrapper.h" | 6 | #include "genericwrapper.h" |
7 | #include <qstring.h> | 7 | #include <qstring.h> |
8 | //Added by qt3to4: | ||
9 | #include <Q3ValueList> | ||
8 | #include <libetpan/clist.h> | 10 | #include <libetpan/clist.h> |
9 | 11 | ||
10 | class encodedString; | 12 | class encodedString; |
@@ -21,9 +23,9 @@ public: | |||
21 | virtual ~NNTPwrapper(); | 23 | virtual ~NNTPwrapper(); |
22 | 24 | ||
23 | /* mailbox will be ignored */ | 25 | /* mailbox will be ignored */ |
24 | virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); | 26 | virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); |
25 | /* should only get the subscribed one */ | 27 | /* should only get the subscribed one */ |
26 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); | 28 | virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); |
27 | /* mailbox will be ignored */ | 29 | /* mailbox will be ignored */ |
28 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | 30 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); |
29 | QStringList listAllNewsgroups(const QString&mask = QString::null); | 31 | QStringList listAllNewsgroups(const QString&mask = QString::null); |
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 | ||
103 | void POP3wrapper::listMessages(const QString &, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) | 105 | void 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 | ||
190 | QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { | 192 | Q3ValueList<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 | ||
197 | void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target) | 199 | void 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) { |
diff --git a/kmicromail/libmailwrapper/pop3wrapper.h b/kmicromail/libmailwrapper/pop3wrapper.h index ebc2fc7..a077877 100644 --- a/kmicromail/libmailwrapper/pop3wrapper.h +++ b/kmicromail/libmailwrapper/pop3wrapper.h | |||
@@ -5,6 +5,8 @@ | |||
5 | #include "mailwrapper.h" | 5 | #include "mailwrapper.h" |
6 | #include "genericwrapper.h" | 6 | #include "genericwrapper.h" |
7 | #include <qstring.h> | 7 | #include <qstring.h> |
8 | //Added by qt3to4: | ||
9 | #include <Q3ValueList> | ||
8 | 10 | ||
9 | class encodedString; | 11 | class encodedString; |
10 | struct mailstorage; | 12 | struct mailstorage; |
@@ -18,13 +20,13 @@ public: | |||
18 | POP3wrapper( POP3account *a ); | 20 | POP3wrapper( POP3account *a ); |
19 | virtual ~POP3wrapper(); | 21 | virtual ~POP3wrapper(); |
20 | /* mailbox will be ignored */ | 22 | /* mailbox will be ignored */ |
21 | virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); | 23 | virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); |
22 | virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); | 24 | virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); |
23 | /* mailbox will be ignored */ | 25 | /* mailbox will be ignored */ |
24 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); | 26 | virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); |
25 | 27 | ||
26 | virtual void deleteMail(const RecMailP&mail); | 28 | virtual void deleteMail(const RecMailP&mail); |
27 | virtual void deleteMailList(const QValueList<RecMailP>&target); | 29 | virtual void deleteMailList(const Q3ValueList<RecMailP>&target); |
28 | virtual void answeredMail(const RecMailP&mail); | 30 | virtual void answeredMail(const RecMailP&mail); |
29 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); | 31 | virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); |
30 | 32 | ||
diff --git a/kmicromail/libmailwrapper/sendmailprogress.cpp b/kmicromail/libmailwrapper/sendmailprogress.cpp index 20dfe9b..6cd6409 100644 --- a/kmicromail/libmailwrapper/sendmailprogress.cpp +++ b/kmicromail/libmailwrapper/sendmailprogress.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "sendmailprogress.h" | 1 | #include "sendmailprogress.h" |
2 | #include <qprogressbar.h> | 2 | #include <q3progressbar.h> |
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <klocale.h> | 4 | #include <klocale.h> |
5 | 5 | ||
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp index 9436d43..fc01528 100644 --- a/kmicromail/libmailwrapper/settings.cpp +++ b/kmicromail/libmailwrapper/settings.cpp | |||
@@ -2,7 +2,7 @@ | |||
2 | #include <qdir.h> | 2 | #include <qdir.h> |
3 | 3 | ||
4 | #include <qtextcodec.h> | 4 | #include <qtextcodec.h> |
5 | #include <qtextstream.h> | 5 | #include <q3textstream.h> |
6 | #include <qfile.h> | 6 | #include <qfile.h> |
7 | 7 | ||
8 | //#include <opie2/odebug.h> | 8 | //#include <opie2/odebug.h> |
@@ -376,11 +376,11 @@ QString SMTPaccount::getSignature() | |||
376 | return QString(); | 376 | return QString(); |
377 | 377 | ||
378 | QFile file( signature ); | 378 | QFile file( signature ); |
379 | if (!file.open( IO_ReadOnly ) ) { | 379 | if (!file.open( QIODevice::ReadOnly ) ) { |
380 | return QString(); | 380 | return QString(); |
381 | 381 | ||
382 | } | 382 | } |
383 | QTextStream ts( &file ); | 383 | Q3TextStream ts( &file ); |
384 | ts.setCodec( QTextCodec::codecForName("utf8") ); | 384 | ts.setCodec( QTextCodec::codecForName("utf8") ); |
385 | QString text = ts.read(); | 385 | QString text = ts.read(); |
386 | file.close(); | 386 | file.close(); |
@@ -399,11 +399,11 @@ void SMTPaccount::setSignature( QString b ) | |||
399 | save(); | 399 | save(); |
400 | } | 400 | } |
401 | QFile fileIn( signature ); | 401 | QFile fileIn( signature ); |
402 | if (!fileIn.open( IO_WriteOnly ) ) { | 402 | if (!fileIn.open( QIODevice::WriteOnly ) ) { |
403 | qDebug("OM: Cannot write signature file %s ", signature.latin1() ); | 403 | qDebug("OM: Cannot write signature file %s ", signature.latin1() ); |
404 | return ; | 404 | return ; |
405 | } | 405 | } |
406 | QTextStream tsIn( &fileIn ); | 406 | Q3TextStream tsIn( &fileIn ); |
407 | tsIn.setCodec( QTextCodec::codecForName("utf8") ); | 407 | tsIn.setCodec( QTextCodec::codecForName("utf8") ); |
408 | tsIn << b ; | 408 | tsIn << b ; |
409 | fileIn.close(); | 409 | fileIn.close(); |
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp index 7c813cc..2df55ff 100644 --- a/kmicromail/libmailwrapper/smtpwrapper.cpp +++ b/kmicromail/libmailwrapper/smtpwrapper.cpp | |||
@@ -9,6 +9,8 @@ | |||
9 | //#include <qt.h> | 9 | //#include <qt.h> |
10 | #include <qapplication.h> | 10 | #include <qapplication.h> |
11 | #include <qmessagebox.h> | 11 | #include <qmessagebox.h> |
12 | //Added by qt3to4: | ||
13 | #include <Q3ValueList> | ||
12 | #include <stdlib.h> | 14 | #include <stdlib.h> |
13 | #ifndef DESKTOP_VERSION | 15 | #ifndef DESKTOP_VERSION |
14 | //#include <qpe/config.h> | 16 | //#include <qpe/config.h> |
@@ -434,8 +436,8 @@ bool SMTPwrapper::flushOutbox() { | |||
434 | return false; | 436 | return false; |
435 | } | 437 | } |
436 | QString oldPw, oldUser; | 438 | QString oldPw, oldUser; |
437 | QValueList<RecMailP> mailsToSend; | 439 | Q3ValueList<RecMailP> mailsToSend; |
438 | QValueList<RecMailP> mailsToRemove; | 440 | Q3ValueList<RecMailP> mailsToRemove; |
439 | QString mbox("Outgoing"); | 441 | QString mbox("Outgoing"); |
440 | wrap->listMessages(mbox,mailsToSend); | 442 | wrap->listMessages(mbox,mailsToSend); |
441 | if (mailsToSend.count()==0) { | 443 | if (mailsToSend.count()==0) { |