summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/abstractmail.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/libmailwrapper/abstractmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/abstractmail.cpp30
1 files changed, 16 insertions, 14 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
@@ -3,23 +3,25 @@
#include "imapwrapper.h"
#include "pop3wrapper.h"
#include "nntpwrapper.h"
#include "mhwrapper.h"
#include "mailtypes.h"
#include <qpe/global.h>
-#include <qprogressbar.h>
+#include <q3progressbar.h>
#include <qapplication.h>
#include <qmessagebox.h>
+//Added by qt3to4:
+#include <Q3ValueList>
#include <klocale.h>
#include <kdecore/kstandarddirs.h>
#include <qfile.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <stdlib.h>
#include <libetpan/mailmime_content.h>
#include <libetpan/mailmime.h>
using namespace Opie::Core;
AbstractMail* AbstractMail::getWrapper(IMAPaccount *a)
{
return new IMAPwrapper(a);
@@ -106,20 +108,20 @@ QString AbstractMail::convert_String(const char*text)
if (res) free(res);
return result;
}
/* cp & paste from launcher */
QString AbstractMail::gen_attachment_id()
{
QFile file( "/proc/sys/kernel/random/uuid" );
- if (!file.open(IO_ReadOnly ) )
+ if (!file.open(QIODevice::ReadOnly ) )
return QString::null;
- QTextStream stream(&file);
+ Q3TextStream stream(&file);
return "{" + stream.read().stripWhiteSpace() + "}";
}
int AbstractMail::createMbox(const QString&,const FolderP&,const QString& ,bool)
{
return 0;
}
@@ -133,26 +135,26 @@ QString AbstractMail::defaultLocalfolder()
}
QString AbstractMail::draftFolder()
{
return QString("Drafts");
}
/* temporary - will be removed when implemented in all classes */
-void AbstractMail::deleteMails(const QString &,const QValueList<Opie::Core::OSmartPointer<RecMail> > &)
+void AbstractMail::deleteMails(const QString &,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &)
{
}
-void AbstractMail::deleteMailList(const QValueList<RecMailP>&target)
+void AbstractMail::deleteMailList(const Q3ValueList<RecMailP>&target)
{
//qDebug("AbstractMail::deleteMailList:: Please reimplement! ");
// this is currently re-implemented in pop3wrapper and imapwrapper
int iii = 0;
int count = target.count();
- QProgressBar wid ( count );
+ Q3ProgressBar wid ( count );
wid.setCaption( i18n("Deleting ..."));
wid.show();
while (iii < count ) {
Global::statusMessage(i18n("Delete message %1 of %2").arg(iii).arg(count));
wid.setProgress( iii );
wid.raise();
qApp->processEvents();
RecMailP mail = (*target.at( iii ));
@@ -172,30 +174,30 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
lfName = acc->getAccountName();
// create local folder
if ( !targetMail->createMbox(lfName))
{
QMessageBox::critical(0,i18n("Error creating new Folder"),
i18n("Error while creating new folder\n%1\n\nCancelling action.").arg(lfName));
return;
}
- QValueList<RecMailP> t;
+ Q3ValueList<RecMailP> t;
listMessages(fromFolder->getName(),t,acc->getMaxMailSize() );
if ( t.count() == 0 ) {
qDebug("There are no new messages %s", fromFolder->getName().latin1());
Global::statusMessage(i18n("There are no new messages"));
return;
}
Global::statusMessage(i18n("%1 :Downloading mails..."). arg(acc->getAccountName()));
qDebug(i18n("%1 :Downloading mails..."). arg(acc->getAccountName()));
qApp->processEvents();
- QValueList<RecMailP> e;
+ Q3ValueList<RecMailP> e;
targetMail->listMessages(lfName,e,acc->getMaxMailSize() );
//qDebug("target has mails %d ", e.count());
- QValueList<RecMailP> n;
+ Q3ValueList<RecMailP> n;
int iii = 0;
int count = t.count();
while (iii < count ) {
RecMailP r = (*t.at( iii ));
bool found = false;
int jjj = 0;
int countE = e.count();
while (jjj < countE ) {
@@ -216,42 +218,42 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe
if ( n.count() == 0 ) {
Global::statusMessage(i18n("There are no new messages"));
return;
}
mvcpMailList( n,lfName,targetMail,!acc->getLeaveOnServer());
Global::statusMessage(i18n("Downloaded %1 messages").arg(n.count()));
#if 0
- QValueList<RecMailP> t;
+ Q3ValueList<RecMailP> t;
listMessages(fromFolder->getName(),t, maxSizeInKb);
mvcpMailList( t,targetFolder,targetWrapper,moveit);
#endif
}
void AbstractMail::mvcpAllMails(const FolderP&fromFolder,
const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int maxSizeInKb)
{
- QValueList<RecMailP> t;
+ Q3ValueList<RecMailP> t;
listMessages(fromFolder->getName(),t, maxSizeInKb);
mvcpMailList( t,targetFolder,targetWrapper,moveit);
}
-void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t,
+void AbstractMail::mvcpMailList(const Q3ValueList<RecMailP>& t,
const QString&targetFolder,AbstractMail*targetWrapper,bool moveit)
{
encodedString*st = 0;
int iii = 0;
int count = t.count();
if ( count == 0 )
return;
// wel, processevents is qite strange, we need a widget for getting
// Global::statusMessage(i18n("Copy2 message %1").arg(iii)); displaye
- QProgressBar wid ( count );
+ Q3ProgressBar wid ( count );
wid.setCaption( i18n("Copying..."));
wid.show();
while (iii < count ) {
Global::statusMessage(i18n("Copy message %1 of %2").arg(iii).arg(count));
wid.setProgress( iii );
wid.raise();
qApp->processEvents();
RecMailP r = (*t.at( iii ));