63 files changed, 612 insertions, 512 deletions
diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp index 985a762..9b1ea2f 100644 --- a/kmicromail/accountitem.cpp +++ b/kmicromail/accountitem.cpp @@ -11,10 +11,12 @@ /* OPIE */ //#include <qpe/qpeapplication.h> /* QT */ -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qmessagebox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <kiconloader.h> #include <klocale.h> #define GET_NEW_MAILS 101 @@ -53,26 +55,26 @@ AbstractMail *POP3viewItem::getWrapper() { return wrapper; } -void POP3viewItem::refresh(QValueList<Opie::Core::OSmartPointer<RecMail> > & ) +void POP3viewItem::refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > & ) { refresh(); } void POP3viewItem::refresh() { if (account->getOffline()) return; - QValueList<FolderP> *folders = wrapper->listFolders(); - QListViewItem *child = firstChild(); + Q3ValueList<FolderP> *folders = wrapper->listFolders(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); delete tmp; } - QValueList<FolderP>::ConstIterator it; - QListViewItem*item = 0; + Q3ValueList<FolderP>::ConstIterator it; + Q3ListViewItem*item = 0; for ( it = folders->begin(); it!=folders->end(); ++it) { item = new POP3folderItem( (*it), this , item ); item->setSelectable( (*it)->may_select()); @@ -85,11 +87,11 @@ RECBODYP POP3viewItem::fetchBody( const RecMailP &mail ) return wrapper->fetchBody( mail ); } -QPopupMenu * POP3viewItem::getContextMenu() +Q3PopupMenu * POP3viewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { if (!account->getOffline()) { @@ -107,12 +109,12 @@ QPopupMenu * POP3viewItem::getContextMenu() } void POP3viewItem::disconnect() { - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); delete tmp; } wrapper->logout(); @@ -156,9 +158,9 @@ void POP3viewItem::contextMenuSelected(int which) POP3folderItem::~POP3folderItem() {} -POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , QListViewItem*after ) +POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , Q3ListViewItem*after ) : AccountViewItem(folderInit,parent,after ) { pop3 = parent; if (folder->getDisplayName().lower()!="inbox") @@ -171,9 +173,9 @@ POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , } setText( 0, folder->getDisplayName() ); } -void POP3folderItem::refresh(QValueList<RecMailP>&target) +void POP3folderItem::refresh(Q3ValueList<RecMailP>&target) { if (folder->may_select()) pop3->getWrapper()->listMessages( folder->getName(),target ); } @@ -182,11 +184,11 @@ RECBODYP POP3folderItem::fetchBody(const RecMailP&aMail) { return pop3->getWrapper()->fetchBody(aMail); } -QPopupMenu * POP3folderItem::getContextMenu() +Q3PopupMenu * POP3folderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { m->insertItem(i18n("Get new messages"),GET_NEW_MAILS); m->insertItem(i18n("Refresh header list"),0); @@ -260,27 +262,27 @@ AbstractMail *NNTPviewItem::getWrapper() { return wrapper; } -void NNTPviewItem::refresh( QValueList<RecMailP> & ) +void NNTPviewItem::refresh( Q3ValueList<RecMailP> & ) { refresh(); } void NNTPviewItem::refresh() { if (account->getOffline()) return; - QValueList<FolderP> *folders = wrapper->listFolders(); + Q3ValueList<FolderP> *folders = wrapper->listFolders(); - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); delete tmp; } - QValueList<FolderP>::ConstIterator it; - QListViewItem*item = 0; + Q3ValueList<FolderP>::ConstIterator it; + Q3ListViewItem*item = 0; for ( it = folders->begin(); it!=folders->end(); ++it) { item = new NNTPfolderItem( (*it), this , item ); item->setSelectable( (*it)->may_select()); @@ -293,11 +295,11 @@ RECBODYP NNTPviewItem::fetchBody( const RecMailP &mail ) return wrapper->fetchBody( mail ); } -QPopupMenu * NNTPviewItem::getContextMenu() +Q3PopupMenu * NNTPviewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { if (!account->getOffline()) { @@ -325,12 +327,12 @@ void NNTPviewItem::subscribeGroups() } void NNTPviewItem::disconnect() { - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); delete tmp; } wrapper->logout(); @@ -367,9 +369,9 @@ void NNTPviewItem::contextMenuSelected(int which) NNTPfolderItem::~NNTPfolderItem() {} -NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent , QListViewItem*after ) +NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent , Q3ListViewItem*after ) : AccountViewItem( folderInit, parent,after ) { nntp = parent; if (folder->getDisplayName().lower()!="inbox") @@ -382,9 +384,9 @@ NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent } setText( 0, folder->getDisplayName() ); } -void NNTPfolderItem::refresh(QValueList<RecMailP>&target) +void NNTPfolderItem::refresh(Q3ValueList<RecMailP>&target) { if (folder->may_select()) nntp->getWrapper()->listMessages( folder->getName(),target ); } @@ -393,11 +395,11 @@ RECBODYP NNTPfolderItem::fetchBody(const RecMailP&aMail) { return nntp->getWrapper()->fetchBody(aMail); } -QPopupMenu * NNTPfolderItem::getContextMenu() +Q3PopupMenu * NNTPfolderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { m->insertItem(i18n("Refresh header list"),0); m->insertItem(i18n("Copy all postings"),1); @@ -452,9 +454,9 @@ AbstractMail *IMAPviewItem::getWrapper() { return wrapper; } -void IMAPviewItem::refresh(QValueList<RecMailP>&) +void IMAPviewItem::refresh(Q3ValueList<RecMailP>&) { refreshFolders(false); } @@ -469,13 +471,13 @@ void IMAPviewItem::refreshFolders(bool force) if (account->getOffline()) return; removeChilds(); currentFolders.clear(); - QValueList<FolderP> * folders = wrapper->listFolders(); + Q3ValueList<FolderP> * folders = wrapper->listFolders(); - QValueList<FolderP>::Iterator it; - QListViewItem*item = 0; - QListViewItem*titem = 0; + Q3ValueList<FolderP>::Iterator it; + Q3ListViewItem*item = 0; + Q3ListViewItem*titem = 0; QString fname,del,search; int pos; for ( it = folders->begin(); it!=folders->end(); ++it) @@ -512,11 +514,11 @@ void IMAPviewItem::refreshFolders(bool force) } delete folders; } -QPopupMenu * IMAPviewItem::getContextMenu() +Q3PopupMenu * IMAPviewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { if (!account->getOffline()) { @@ -614,9 +616,9 @@ bool IMAPviewItem::offline() { return account->getOffline(); } -IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent , QListViewItem*after ) +IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent , Q3ListViewItem*after ) : AccountViewItem( folderInit, parent , after ) { imap = parent; if (folder->getDisplayName().lower()!="inbox") @@ -629,9 +631,9 @@ IMAPfolderItem::IMAPfolderItem( const FolderP& folderInit, IMAPviewItem *parent } setText( 0, folder->getDisplayName() ); } -IMAPfolderItem::IMAPfolderItem(const FolderP &folderInit, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ) +IMAPfolderItem::IMAPfolderItem(const FolderP &folderInit, IMAPfolderItem *parent , Q3ListViewItem*after, IMAPviewItem *master ) : AccountViewItem(folderInit, parent,after ) { imap = master; if (folder->getDisplayName().lower()!="inbox") @@ -652,9 +654,9 @@ const QString& IMAPfolderItem::Delemiter()const { return folder->Separator(); } -void IMAPfolderItem::refresh(QValueList<RecMailP>&target) +void IMAPfolderItem::refresh(Q3ValueList<RecMailP>&target) { if (folder->may_select()) { imap->getWrapper()->listMessages( folder->getName(),target ); @@ -669,11 +671,11 @@ RECBODYP IMAPfolderItem::fetchBody(const RecMailP&aMail) { return imap->getWrapper()->fetchBody(aMail); } -QPopupMenu * IMAPfolderItem::getContextMenu() +Q3PopupMenu * IMAPfolderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { if (folder->may_select()) { @@ -720,9 +722,9 @@ void IMAPfolderItem::deleteFolder() if (yesno == 0) { if (imap->getWrapper()->deleteMbox(folder)) { - QListView*v=listView(); + Q3ListView*v=listView(); IMAPviewItem * box = imap; /* be carefull - after that this object is destroyd so don't use * any member of it after that call!!*/ imap->refreshFolders(true); @@ -799,9 +801,9 @@ AbstractMail *MHviewItem::getWrapper() { return wrapper; } -void MHviewItem::refresh( QValueList<RecMailP> & target) +void MHviewItem::refresh( Q3ValueList<RecMailP> & target) { refresh(false); getWrapper()->listMessages( "",target ); } @@ -810,10 +812,10 @@ void MHviewItem::refresh(bool force) { if (childCount()>0 && force==false) return; removeChilds(); currentFolders.clear(); - QValueList<FolderP> *folders = wrapper->listFolders(); - QValueList<FolderP>::ConstIterator it; + Q3ValueList<FolderP> *folders = wrapper->listFolders(); + Q3ValueList<FolderP>::ConstIterator it; MHfolderItem*item = 0; MHfolderItem*pmaster = 0; QString fname = ""; int pos; @@ -856,11 +858,11 @@ RECBODYP MHviewItem::fetchBody( const RecMailP &mail ) return wrapper->fetchBody( mail ); } -QPopupMenu * MHviewItem::getContextMenu() +Q3PopupMenu * MHviewItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { m->insertItem(i18n("Refresh folder list"),0); m->insertItem(i18n("Create new folder"),1); @@ -919,16 +921,16 @@ void MHviewItem::contextMenuSelected(int which) MHfolderItem::~MHfolderItem() {} -MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , QListViewItem*after ) +MHfolderItem::MHfolderItem( const FolderP &folderInit, MHviewItem *parent , Q3ListViewItem*after ) : AccountViewItem(folderInit, parent,after ) { mbox = parent; initName(); } -MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, QListViewItem*after, MHviewItem*master) +MHfolderItem::MHfolderItem(const FolderP& folderInit, MHfolderItem *parent, Q3ListViewItem*after, MHviewItem*master) : AccountViewItem(folderInit, parent,after ) { folder = folderInit; mbox = master; @@ -966,9 +968,9 @@ const FolderP&MHfolderItem::getFolder()const { return folder; } -void MHfolderItem::refresh(QValueList<RecMailP>&target) +void MHfolderItem::refresh(Q3ValueList<RecMailP>&target) { if (folder->may_select()) mbox->getWrapper()->listMessages( folder->getName(),target ); } @@ -988,9 +990,9 @@ void MHfolderItem::deleteFolder() if (yesno == 0) { if (mbox->getWrapper()->deleteMbox(folder)) { - QListView*v=listView(); + Q3ListView*v=listView(); MHviewItem * box = mbox; /* be carefull - after that this object is destroyd so don't use * any member of it after that call!!*/ mbox->refresh(true); @@ -1001,11 +1003,11 @@ void MHfolderItem::deleteFolder() } } } -QPopupMenu * MHfolderItem::getContextMenu() +Q3PopupMenu * MHfolderItem::getContextMenu() { - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { m->insertItem(i18n("Move/Copie all mails"),2); m->insertItem(i18n("Delete all mails"),0); @@ -1030,9 +1032,9 @@ void MHfolderItem::createFolder() { QString ndir = ndirdlg.Newdir(); if (mbox->getWrapper()->createMbox(ndir,folder)) { - QListView*v=listView(); + Q3ListView*v=listView(); MHviewItem * box = mbox; /* be carefull - after that this object is destroyd so don't use * any member of it after that call!!*/ mbox->refresh(true); @@ -1077,28 +1079,28 @@ bool MHfolderItem::isDraftfolder() const QString AccountViewItem::contextName="AccountViewItem"; AccountViewItem::AccountViewItem( AccountView *parent ) - : QListViewItem( parent ) + : Q3ListViewItem( parent ) { init(); m_Backlink = parent; } -AccountViewItem::AccountViewItem( QListViewItem *parent) - : QListViewItem( parent),folder(0) +AccountViewItem::AccountViewItem( Q3ListViewItem *parent) + : Q3ListViewItem( parent),folder(0) { init(); } -AccountViewItem::AccountViewItem( QListViewItem *parent , QListViewItem*after ) - :QListViewItem( parent,after ),folder(0) +AccountViewItem::AccountViewItem( Q3ListViewItem *parent , Q3ListViewItem*after ) + :Q3ListViewItem( parent,after ),folder(0) { init(); } -AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ) - :QListViewItem( parent,after ),folder(folderInit) +AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,Q3ListViewItem *parent , Q3ListViewItem*after ) + :Q3ListViewItem( parent,after ),folder(folderInit) { init(); } @@ -1139,12 +1141,12 @@ void AccountViewItem::deleteAllMail(AbstractMail*wrapper,const FolderP&folder) } void AccountViewItem::removeChilds() { - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); delete tmp; } } diff --git a/kmicromail/accountitem.h b/kmicromail/accountitem.h index 4c92bfc..bbfd05f 100644 --- a/kmicromail/accountitem.h +++ b/kmicromail/accountitem.h @@ -1,17 +1,20 @@ #ifndef __ACCOUNT_ITEM #define __ACCOUNT_ITEM -#include <qlistview.h> +#include <q3listview.h> #include <qlist.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3PopupMenu> #include <opie2/osmartpointer.h> #include <libmailwrapper/mailwrapper.h> class POP3wrapper; class RecMail; class RecBody; -class QPopupMenu; +class Q3PopupMenu; class Selectstore; class AccountView; class POP3account; class NNTPaccount; @@ -20,21 +23,21 @@ class AbstractMail; class Folder; #define RECBODYP Opie::Core::OSmartPointer<RecBody> -class AccountViewItem : public QListViewItem +class AccountViewItem : public Q3ListViewItem { public: AccountViewItem( AccountView *parent ); - AccountViewItem( QListViewItem *parent); - AccountViewItem( QListViewItem *parent , QListViewItem*after ); - AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,QListViewItem *parent , QListViewItem*after ); + AccountViewItem( Q3ListViewItem *parent); + AccountViewItem( Q3ListViewItem *parent , Q3ListViewItem*after ); + AccountViewItem( const Opie::Core::OSmartPointer<Folder>&folderInit,Q3ListViewItem *parent , Q3ListViewItem*after ); virtual ~AccountViewItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&)=0; virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&)=0; - virtual QPopupMenu * getContextMenu(){return 0;}; + virtual Q3PopupMenu * getContextMenu(){return 0;}; virtual void contextMenuSelected(int){} virtual AccountView*accountView(); virtual bool matchName(const QString&name)const; virtual bool isDraftfolder(); @@ -55,12 +58,12 @@ class POP3viewItem : public AccountViewItem public: POP3viewItem( POP3account *a, AccountView *parent ); virtual ~POP3viewItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: POP3account *account; @@ -73,13 +76,13 @@ protected: class POP3folderItem : public AccountViewItem { public: - POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , QListViewItem*after ); + POP3folderItem( const Opie::Core::OSmartPointer<Folder>&folder, POP3viewItem *parent , Q3ListViewItem*after ); virtual ~POP3folderItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: void downloadMails(); @@ -92,12 +95,12 @@ class NNTPviewItem : public AccountViewItem public: NNTPviewItem( NNTPaccount *a, AccountView *parent ); virtual ~NNTPviewItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: NNTPaccount *account; @@ -111,13 +114,13 @@ protected: class NNTPfolderItem : public AccountViewItem { public: - NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , QListViewItem*after ); + NNTPfolderItem(const Opie::Core::OSmartPointer<Folder>&folder, NNTPviewItem *parent , Q3ListViewItem*after ); virtual ~NNTPfolderItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: void downloadMails(); @@ -131,12 +134,12 @@ class IMAPviewItem : public AccountViewItem friend class IMAPfolderItem; public: IMAPviewItem( IMAPaccount *a, AccountView *parent ); virtual ~IMAPviewItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); const QStringList&subFolders(); virtual void refreshFolders(bool force=false); bool offline(); @@ -151,14 +154,14 @@ protected: class IMAPfolderItem : public AccountViewItem { public: - IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , QListViewItem*after ); - IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); + IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPviewItem *parent , Q3ListViewItem*after ); + IMAPfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, IMAPfolderItem *parent , Q3ListViewItem*after, IMAPviewItem *master ); virtual ~IMAPfolderItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); virtual const QString& Delemiter()const; protected: virtual void createNewFolder(); @@ -173,12 +176,12 @@ class MHviewItem : public AccountViewItem public: MHviewItem( const QString&aMboxPath, AccountView *parent ); virtual ~MHviewItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&target ); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer<RecMail> &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); QStringList subFolders(); virtual void refresh(bool force=false); @@ -193,14 +196,14 @@ protected: class MHfolderItem : public AccountViewItem { public: - MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHviewItem *parent , QListViewItem*after ); - MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); + MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHviewItem *parent , Q3ListViewItem*after ); + MHfolderItem( const Opie::Core::OSmartPointer<Folder>&folder, MHfolderItem *parent, Q3ListViewItem*after, MHviewItem*master); virtual ~MHfolderItem(); - virtual void refresh(QValueList<Opie::Core::OSmartPointer<RecMail> >&); + virtual void refresh(Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer<RecMail>&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); virtual const Opie::Core::OSmartPointer<Folder>&getFolder()const; virtual bool isDraftfolder(); diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp index d1d4f7e..eea1f65 100644 --- a/kmicromail/accountview.cpp +++ b/kmicromail/accountview.cpp @@ -12,27 +12,29 @@ #include <qpe/qpeapplication.h> /* QT */ #include <qmessagebox.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcheckbox.h> #include <qtimer.h> #include <qspinbox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <klocale.h> #include <kmessagebox.h> using namespace Opie::Core; -AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) - : QListView( parent, name, flags ) +AccountView::AccountView( QWidget *parent, const char *name, Qt::WFlags flags ) + : Q3ListView( parent, name, flags ) { //connect( this, SIGNAL( selectionChanged(QListViewItem*) ), // SLOT( refresh(QListViewItem*) ) ); - connect( this, SIGNAL( clicked(QListViewItem*) ), - SLOT( refresh(QListViewItem*) ) ); - connect( this, SIGNAL( returnPressed(QListViewItem*) ), - SLOT( refresh(QListViewItem*) ) ); - connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, - SLOT( slotHold(int,QListViewItem*,const QPoint&,int) ) ); + connect( this, SIGNAL( clicked(Q3ListViewItem*) ), + SLOT( refresh(Q3ListViewItem*) ) ); + connect( this, SIGNAL( returnPressed(Q3ListViewItem*) ), + SLOT( refresh(Q3ListViewItem*) ) ); + connect( this, SIGNAL( mouseButtonPressed(int,Q3ListViewItem*,const QPoint&,int) ),this, + SLOT( slotHold(int,Q3ListViewItem*,const QPoint&,int) ) ); setSorting(0); } AccountView::~AccountView() @@ -47,14 +49,14 @@ void AccountView::slotContextMenu(int id) if (!view) return; view->contextMenuSelected(id); } -void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) +void AccountView::slotHold(int button, Q3ListViewItem * item,const QPoint&,int) { if (button==1) {return;} if (!item) return; AccountViewItem *view = static_cast<AccountViewItem *>(item); - QPopupMenu*m = view->getContextMenu(); + Q3PopupMenu*m = view->getContextMenu(); if (!m) return; connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); m->setFocus(); m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); @@ -92,9 +94,9 @@ void AccountView::populate( QList<Account> list ) } } } -void AccountView::refresh(QListViewItem *item) +void AccountView::refresh(Q3ListViewItem *item) { if ( item ) { bool ask = true; @@ -144,9 +146,9 @@ void AccountView::refreshOutgoing() } void AccountView::refreshCurrentSelected() { if ( !m_currentItem ) return; - QValueList<RecMailP> headerlist; + Q3ValueList<RecMailP> headerlist; AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); view->refresh(headerlist); emit refreshMailview(headerlist); topLevelWidget()->setCaption( i18n ( "KOpieMail/Pi" ) ) ; @@ -165,9 +167,9 @@ void AccountView::refreshAll() } RecBodyP AccountView::fetchBody(const RecMailP&aMail) { - QListViewItem*item = selectedItem (); + Q3ListViewItem*item = selectedItem (); if (!item) return new RecBody(); AccountViewItem *view = static_cast<AccountViewItem *>(item); return view->fetchBody(aMail); } diff --git a/kmicromail/accountview.h b/kmicromail/accountview.h index 33f3479..14b0ff9 100644 --- a/kmicromail/accountview.h +++ b/kmicromail/accountview.h @@ -1,9 +1,11 @@ #ifndef ACCOUNTVIEW_H #define ACCOUNTVIEW_H -#include <qlistview.h> +#include <q3listview.h> #include <qlist.h> +//Added by qt3to4: +#include <Q3ValueList> #include <opie2/osmartpointer.h> #include <libmailwrapper/mailtypes.h> class Selectstore; @@ -12,37 +14,37 @@ class AbstractMail; class Account; class IMAPviewItem; class MHviewItem; -class AccountView : public QListView +class AccountView : public Q3ListView { Q_OBJECT public: - AccountView( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); + AccountView( QWidget *parent = 0, const char *name = 0, Qt::WFlags flags = 0 ); virtual ~AccountView(); virtual void populate( QList<Account> list ); virtual RecBodyP fetchBody(const Opie::Core::OSmartPointer<RecMail>&aMail); virtual void downloadMails(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); virtual void downloadMailsInbox(const Opie::Core::OSmartPointer<Folder>&fromFolder,AbstractMail*fromWrapper); virtual bool currentisDraft(); - QValueList<MHviewItem*> allAccounts() { return mhAccounts;} + Q3ValueList<MHviewItem*> allAccounts() { return mhAccounts;} public slots: virtual void refreshAll(); - virtual void refresh(QListViewItem *item); + virtual void refresh(Q3ListViewItem *item); virtual void refreshCurrent(); virtual void refreshCurrentSelected(); virtual void refreshOutgoing(); - virtual void slotHold(int, QListViewItem *,const QPoint&,int); + virtual void slotHold(int, Q3ListViewItem *,const QPoint&,int); virtual void slotContextMenu(int id); void setupFolderselect(Selectstore*sels); signals: - void refreshMailview(const QValueList<RecMailP>& ); + void refreshMailview(const Q3ValueList<RecMailP>& ); protected: - QListViewItem* m_currentItem; - QValueList<IMAPviewItem*> imapAccounts; - QValueList<MHviewItem*> mhAccounts; + Q3ListViewItem* m_currentItem; + Q3ValueList<IMAPviewItem*> imapAccounts; + Q3ValueList<MHviewItem*> mhAccounts; }; #endif diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index 4bc4441..81d7b52 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp @@ -37,16 +37,16 @@ #include <qcombobox.h> #include <qcheckbox.h> -#include <qiconset.h> +#include <qicon.h> #include <qtimer.h> #include <qmessagebox.h> #include <qpushbutton.h> -#include <qmultilineedit.h> +#include <q3multilineedit.h> #include <qlabel.h> #include <qtabwidget.h> -#include <qlistview.h> +#include <q3listview.h> //using namespace Opie::Core; //using namespace Opie::Ui; ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, bool modal ) @@ -124,9 +124,9 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); mMail = 0; warnAttach = true; - QIconSet icon; + QIcon icon; //icon = SmallIcon("fileexport"); icon = SmallIcon("filesave"); SaveButton->setIconSet (icon ) ; if ( QApplication::desktop()->width() < 320 ) { @@ -140,9 +140,9 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo QPEApplication::setStylusOperation( senderNameEdit, QPEApplication::RightOnHold ); QPEApplication::setStylusOperation( subjectLine, QPEApplication::RightOnHold ); #endif message->setFont ( KOPrefs::instance()->mComposeFont ); - message->setWordWrap (QMultiLineEdit::WidgetWidth); + message->setWordWrap (Q3MultiLineEdit::WidgetWidth); if ( smtpAccounts.count() > 0 ) { fillValues( smtpAccountBox->currentItem() ); } else { QMessageBox::information( 0, i18n( "Problem" ), @@ -533,10 +533,10 @@ void ComposeMail::reEditMail(const RecMailP¤t) replyLine->setText(data->Replyto()); setCharset(body->getCharset()); } -AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) - : QListViewItem( parent ) +AttachViewItem::AttachViewItem( Q3ListView *parent, Attachment *att ) + : Q3ListViewItem( parent ) { attachment = att; if ( !attachment->getPixmap().isNull() ) setPixmap( 0,attachment->getPixmap() ); diff --git a/kmicromail/composemail.h b/kmicromail/composemail.h index 966ac3e..9aef4e1 100644 --- a/kmicromail/composemail.h +++ b/kmicromail/composemail.h @@ -1,9 +1,9 @@ #ifndef COMPOSEMAIL_H #define COMPOSEMAIL_H #include <qlineedit.h> -#include <qlistview.h> +#include <q3listview.h> #include "composemailui.h" //#include "addresspickerui.h" #include <libmailwrapper/settings.h> @@ -79,12 +79,12 @@ protected: QString mEncoding; bool warnAttach; }; -class AttachViewItem : public QListViewItem +class AttachViewItem : public Q3ListViewItem { public: - AttachViewItem( QListView *parent, Attachment *att ); + AttachViewItem( Q3ListView *parent, Attachment *att ); Attachment *getAttachment() { return attachment; } private: Attachment *attachment; diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index 2c0f2d8..f274dc3 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp @@ -15,19 +15,19 @@ #include <qpushbutton.h> #include <qlineedit.h> #include <qlabel.h> #include <qtabwidget.h> -#include <qlistview.h> +#include <q3listview.h> #include <qspinbox.h> #include <klocale.h> #include <kfiledialog.h> #include <libmailwrapper/nntpwrapper.h> using namespace Opie::Core; -AccountListItem::AccountListItem( QListView *parent, Account *a) - : QListViewItem( parent ) +AccountListItem::AccountListItem( Q3ListView *parent, Account *a) + : Q3ListViewItem( parent ) { account = a; setText( 0, account->getAccountName() ); QString ttext = ""; @@ -50,9 +50,9 @@ AccountListItem::AccountListItem( QListView *parent, Account *a) } setText( 1, ttext); } -EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) +EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : EditAccountsUI( parent, name, modal, flags ) { settings = s; @@ -307,9 +307,9 @@ void EditAccounts::accept() /** * SelectMailType */ -SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags ) +SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : SelectMailTypeUI( parent, name, modal, flags ) { selected = selection; selected->replace( 0, selected->length(), typeBox->currentText() ); @@ -324,9 +324,9 @@ void SelectMailType::slotSelection( const QString &sel ) /** * IMAPconfig */ -IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) +IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : IMAPconfigUI( parent, name, modal, flags ) { data = account; @@ -407,9 +407,9 @@ void IMAPconfig::accept() /** * POP3config */ -POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) +POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : POP3configUI( parent, name, modal, flags ) { data = account; //fillValues(); @@ -488,18 +488,18 @@ void POP3config::accept() /** * SMTPconfig */ -SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) +SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : SMTPconfigUI( parent, name, modal, flags ) { data = account; connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); // fillValues(); - QIconSet icon; + QIcon icon; //icon = SmallIcon("fileexport"); icon = SmallIcon("fileopen"); SignaturButton->setText(""); SignaturButton->setIconSet (icon ) ; @@ -571,9 +571,9 @@ void SMTPconfig::accept() /** * NNTPconfig */ -NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) +NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : NNTPconfigUI( parent, name, modal, flags ) { data = account; @@ -592,10 +592,10 @@ void NNTPconfig::slotShowSub() save(); data->save(); ListViewGroups->clear(); for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { - QCheckListItem *item; - item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); + Q3CheckListItem *item; + item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox ); item->setOn( true ); } topLevelWidget()->setCaption( i18n("%1 groups subscribed").arg( subscribedGroups.count())); } @@ -605,11 +605,11 @@ void NNTPconfig::slotShowFilter() data->save(); ListViewGroups->clear(); int count = 0; for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { - QCheckListItem *item; + Q3CheckListItem *item; if ( GroupFilter->text().isEmpty() || (*it).find( GroupFilter->text() ) >= 0 ) { - item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); + item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox ); ++count; if ( subscribedGroups.contains( (*it) ) >= 1 ) { item->setOn( true ); } @@ -628,10 +628,10 @@ void NNTPconfig::slotGetNG() { ListViewGroups->clear(); for ( QStringList::Iterator it = allGroups.begin(); it != allGroups.end(); ++it ) { - QCheckListItem *item; - item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); + Q3CheckListItem *item; + item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox ); if ( subscribedGroups.contains( (*it) ) >= 1 ) { item->setOn( true ); } @@ -662,10 +662,10 @@ void NNTPconfig::fillValues() passLine->setText( data->getPassword() ); subscribedGroups = data->getGroups(); /* don't forget that - you will overwrite values if user clicks cancel! */ for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { - QCheckListItem *item; - item = new QCheckListItem( ListViewGroups, (*it), QCheckListItem::CheckBox ); + Q3CheckListItem *item; + item = new Q3CheckListItem( ListViewGroups, (*it), Q3CheckListItem::CheckBox ); item->setOn( true ); } } @@ -678,13 +678,13 @@ void NNTPconfig::save() data->setLogin( loginBox->isChecked() ); data->setUser( userLine->text() ); data->setPassword( passLine->text() ); - QListViewItemIterator list_it( ListViewGroups ); + Q3ListViewItemIterator list_it( ListViewGroups ); for ( ; list_it.current(); ++list_it ) { - if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { + if ( ( (Q3CheckListItem*)list_it.current() )->isOn() ) { if ( subscribedGroups.contains( list_it.current()->text(0) ) < 1 ) subscribedGroups.append( list_it.current()->text(0) ); } else { if ( subscribedGroups.contains( list_it.current()->text(0) ) >= 1 ) diff --git a/kmicromail/editaccounts.h b/kmicromail/editaccounts.h index 465780c..3d01d23 100644 --- a/kmicromail/editaccounts.h +++ b/kmicromail/editaccounts.h @@ -1,9 +1,9 @@ #ifndef EDITACCOUNTS_H #define EDITACCOUNTS_H #include <qstring.h> -#include <qlistview.h> +#include <q3listview.h> #include "editaccountsui.h" #include "selectmailtypeui.h" #include "imapconfigui.h" @@ -14,13 +14,13 @@ #include <libetpan/clist.h> #include <libmailwrapper/settings.h> -class AccountListItem : public QListViewItem +class AccountListItem : public Q3ListViewItem { public: - AccountListItem( QListView *parent, Account *a); + AccountListItem( Q3ListView *parent, Account *a); Account *getAccount() { return account; } private: Account *account; @@ -31,9 +31,9 @@ class EditAccounts : public EditAccountsUI { Q_OBJECT public: - EditAccounts( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + EditAccounts( Settings *s, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); public slots: void slotNewAccount( const QString &type ); void slotEditAccount( Account *account ); @@ -59,9 +59,9 @@ class SelectMailType : public SelectMailTypeUI { Q_OBJECT public: - SelectMailType( QString *selection = 0, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + SelectMailType( QString *selection = 0, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); private slots: void slotSelection( const QString &sel ); @@ -74,9 +74,9 @@ class IMAPconfig : public IMAPconfigUI { Q_OBJECT public: - IMAPconfig( IMAPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + IMAPconfig( IMAPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); public slots: void fillValues(); @@ -93,9 +93,9 @@ class POP3config : public POP3configUI { Q_OBJECT public: - POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + POP3config( POP3account *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); public slots: void fillValues(); @@ -112,9 +112,9 @@ class SMTPconfig : public SMTPconfigUI { Q_OBJECT public: - SMTPconfig( SMTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + SMTPconfig( SMTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); public slots: void fillValues(); @@ -132,9 +132,9 @@ class NNTPconfig : public NNTPconfigUI { Q_OBJECT public: - NNTPconfig( NNTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, WFlags flags = 0 ); + NNTPconfig( NNTPaccount *account, QWidget *parent = 0, const char *name = 0, bool modal = 0, Qt::WFlags flags = 0 ); public slots: void fillValues(); diff --git a/kmicromail/kmicromail.pro b/kmicromail/kmicromail.pro index 9f4d4bd..ce30bbf 100644 --- a/kmicromail/kmicromail.pro +++ b/kmicromail/kmicromail.pro @@ -40,9 +40,10 @@ SOURCES = main.cpp \ koprefs.cpp\ koprefsdialog.cpp\ nntpgroupsdlg.cpp -INTERFACES = editaccountsui.ui \ +#The following line was changed from INTERFACES to FORMS3 by qt3to4 +FORMS3 = editaccountsui.ui \ selectmailtypeui.ui \ imapconfigui.ui \ pop3configui.ui \ nntpconfigui.ui \ @@ -55,9 +56,9 @@ INTERFACES = editaccountsui.ui \ nntpgroupsui.ui INCLUDEPATH += ./qpe . .. ../libkdepim ../microkde ../microkde/kdecore ../libetpan/include ../microkde/kdeui -LIBS += -L../bin -lmicromailwrapper -lmicrolibetpan -lmicrokde -lssl -lcrypto -lmicrokdepim -lmicrokabc -lpthread +LIBS += -L../bin -lmicromailwrapper -lxmicrolibetpan -lxmicrokde -lssl -lcrypto -lxmicrokdepim -lxmicrokabc -lpthread DESTDIR= ../bin TARGET = ompi @@ -75,4 +76,9 @@ QMAKE_LINK += /NODEFAULTLIB:LIBC OBJECTS_DIR = obj/win MOC_DIR = moc/win } +#The following line was inserted by qt3to4 +QT += xml qt3support +#The following line was inserted by qt3to4 +CONFIG += uic3 + diff --git a/kmicromail/kmicromailE.pro b/kmicromail/kmicromailE.pro index a5a51f7..19fa398 100644 --- a/kmicromail/kmicromailE.pro +++ b/kmicromail/kmicromailE.pro @@ -54,9 +54,9 @@ INTERFACES = editaccountsui.ui \ nntpgroupsui.ui INCLUDEPATH += $(QPEDIR)/include . $(KDEPIMDIR) $(KDEPIMDIR)/libkdepim $(KDEPIMDIR)/qtcompat $(KDEPIMDIR)/microkde $(KDEPIMDIR)/microkde/kdecore $(KDEPIMDIR)/libetpan/include $(KDEPIMDIR)/microkde/kdeui -LIBS += -L$(QPEDIR)/lib -lmicromailwrapper -lqpe -lmicrolibetpan -lmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lmicrokdepim -lpthread +LIBS += -L$(QPEDIR)/lib -lmicromailwrapper -lqpe -lxmicrolibetpan -lxmicrokde -lmicroqtcompat -lssl -lcrypto -ljpeg -lxmicrokdepim -lpthread LIBS += $(QTOPIALIB) #LIBS += -lqtopia #next line for Zaurus only #LIBS += -luuid diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp index e4b61dc..e2eed9a 100644 --- a/kmicromail/koprefs.cpp +++ b/kmicromail/koprefs.cpp @@ -25,9 +25,9 @@ #ifndef _WIN32_ #include <unistd.h> #endif #include <qdir.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #include <qstring.h> #include <qregexp.h> #include <qfont.h> diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 017f1f7..e3102a4 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp @@ -22,26 +22,31 @@ */ #include <kdialog.h> #include <qlayout.h> #include <qlabel.h> -#include <qgroupbox.h> -#include <qbuttongroup.h> +#include <q3groupbox.h> +#include <q3buttongroup.h> #include <qlineedit.h> #include <qfont.h> #include <qslider.h> #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qcombobox.h> -#include <qvbox.h> -#include <qhbox.h> +#include <q3vbox.h> +#include <q3hbox.h> #include <qregexp.h> #include <qspinbox.h> #include <qdatetime.h> #include <qcheckbox.h> #include <qradiobutton.h> #include <qpushbutton.h> -#include <qstrlist.h> +#include <q3strlist.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3HBoxLayout> +#include <Q3GridLayout> +#include <QPixmap> +#include <Q3Frame> #include <kcolorbutton.h> #include <kdebug.h> #include <klocale.h> @@ -110,11 +115,11 @@ void KOPrefsDialog::setupGlobalTab() } void KOPrefsDialog::setupMainTab() { - QFrame *topFrame = addPage(i18n("General"),0,0); + Q3Frame *topFrame = addPage(i18n("General"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); @@ -135,11 +140,11 @@ void KOPrefsDialog::setupMainTab() } void KOPrefsDialog::setupMailTab() { - QFrame *topFrame = addPage(i18n("Mail"),0,0); + Q3Frame *topFrame = addPage(i18n("Mail"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,4,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), @@ -181,12 +186,12 @@ void KOPrefsDialog::setupMailTab() } void KOPrefsDialog::setupFontsTab() { - QFrame *topFrame = addPage(i18n("Fonts"),0,0); + Q3Frame *topFrame = addPage(i18n("Fonts"),0,0); // DesktopIcon("fonts",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,7,3); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3); topLayout->setSpacing(1); topLayout->setMargin(3); KPrefsDialogWidFont * tVFont; int i = 0; @@ -237,10 +242,10 @@ void KOPrefsDialog::usrWriteConfig() #if 0 void KOPrefsDialog::setupLocaleDateTab() { -QFrame *topFrame = addPage(i18n("Date Format"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,3,2); +Q3Frame *topFrame = addPage(i18n("Date Format"),0,0); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); int iii = 0; @@ -291,10 +296,10 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0); } void KOPrefsDialog::setupLocaleTab() { - QFrame *topFrame = addPage(i18n("Locale"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,4,2); + Q3Frame *topFrame = addPage(i18n("Locale"),0,0); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); int iii = 0; KPrefsWidRadios *syncPrefsGroup = @@ -330,9 +335,9 @@ void KOPrefsDialog::setupLocaleTab() topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); } else { QWidget * hb = new QWidget( topFrame ); - QHBoxLayout *hbLayout = new QHBoxLayout(hb); + Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb); sb = addWidBool(i18n("Week starts on Sunday"), &(KOPrefs::instance()->mWeekStartsOnSunday),hb); hbLayout->addWidget(sb->checkBox() ); @@ -360,11 +365,11 @@ void KOPrefsDialog::showSyncPage() void KOPrefsDialog::setupSyncAlgTab() { #if 0 QLabel * lab; - QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); + Q3Frame *topFrame = addPage(i18n("Sync Prefs"),0,0); mSetupSyncAlgTab = topFrame; - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); int iii = 0; @@ -402,10 +407,10 @@ void KOPrefsDialog::setupSyncAlgTab() void KOPrefsDialog::setupSyncTab() { #if 0 QLabel * lab; - QFrame *topFrame = addPage(i18n("Sync Network"),0,0); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3Frame *topFrame = addPage(i18n("Sync Network"),0,0); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); int iii = 0; @@ -450,12 +455,12 @@ void KOPrefsDialog::setupSyncTab() } void KOPrefsDialog::setupMainTab() { - QFrame *topFrame = addPage(i18n("General"),0,0); + Q3Frame *topFrame = addPage(i18n("General"),0,0); // DesktopIcon("identity",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); // KPrefsDialogWidBool *emailControlCenter = @@ -474,13 +479,13 @@ void KOPrefsDialog::setupMainTab() mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); topLayout->addWidget(mEmailLabel,1,0); topLayout->addWidget(mEmailEdit,1,1); KPrefsDialogWidBool *wb; - QHBox *dummy; + Q3HBox *dummy; if ( QApplication::desktop()->width() > 480 ) { - dummy = new QHBox(topFrame); + dummy = new Q3HBox(topFrame); } else { - dummy = new QVBox(topFrame); + dummy = new Q3VBox(topFrame); } topLayout->addMultiCellWidget(dummy, 2,2,0,1); addWidBool(i18n("Full menu bar(nr)"), @@ -490,23 +495,23 @@ void KOPrefsDialog::setupMainTab() addWidBool(i18n("Mini icons in toolbar(nr)"), &(KOPrefs::instance()->mToolBarMiniIcons),dummy); - dummy = new QHBox(topFrame); + dummy = new Q3HBox(topFrame); new QLabel(i18n("Days in What's Next:"),dummy); mWhatsNextSpin = new QSpinBox(1,14,1,dummy); topLayout->addMultiCellWidget(dummy,3,3,0,1); - dummy = new QHBox(topFrame); + dummy = new Q3HBox(topFrame); new QLabel(i18n("Days in Next-X-Days:"),dummy); mNextXDaysSpin = new QSpinBox(2,14,1,dummy); topLayout->addMultiCellWidget(dummy,4,4,0,1); - QHBox *prioBox = new QHBox(topFrame); + Q3HBox *prioBox = new Q3HBox(topFrame); // intervalBox->setSpacing(spacingHint()); topLayout->addMultiCellWidget(prioBox,5,5,0,1); QString messa = i18n("Show topmost todo prios in What's Next:"); @@ -528,9 +533,9 @@ void KOPrefsDialog::setupMainTab() // addWidBool(i18n("Enable automatic saving of calendar"), // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); - QHBox *intervalBox = new QHBox(topFrame); + Q3HBox *intervalBox = new Q3HBox(topFrame); // intervalBox->setSpacing(spacingHint()); topLayout->addMultiCellWidget(intervalBox,6,6,0,1); QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); @@ -619,16 +624,16 @@ void KOPrefsDialog::setupMainTab() void KOPrefsDialog::setupTimeTab() { - QFrame *topFrame = addPage(i18n("Time"),0,0); + Q3Frame *topFrame = addPage(i18n("Time"),0,0); // DesktopIcon("clock",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,4,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); - QHBox *dummy = new QHBox(topFrame); + Q3HBox *dummy = new Q3HBox(topFrame); KPrefsWidTime *dayBegins = addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), dummy); //topLayout->addWidget(dayBegins->label(),2,0); @@ -657,24 +662,24 @@ void KOPrefsDialog::setupTimeTab() mAlarmTimeCombo->insertStringList(alarmList); topLayout->addWidget(mAlarmTimeCombo,3,1); - QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, + Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal, i18n("Working Hours"), topFrame); topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); workingHoursGroup->layout()->setSpacing( 0 ); workingHoursGroup->layout()->setMargin( 4 ); - QHBox *workStartBox = new QHBox(workingHoursGroup); + Q3HBox *workStartBox = new Q3HBox(workingHoursGroup); // workStartBox->setMargin( 0 ); addWidTime(i18n("Daily starting hour:"), &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); - QHBox *workEndBox = new QHBox(workingHoursGroup); + Q3HBox *workEndBox = new Q3HBox(workingHoursGroup); //workEndBox->setMargin( 0 ); addWidTime(i18n("Daily ending hour:"), &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); - QVBox *excludeBox = new QVBox(workingHoursGroup); + Q3VBox *excludeBox = new Q3VBox(workingHoursGroup); //excludeBox->setMargin( 0 ); addWidBool(i18n("Exclude holidays"), &(KOPrefs::instance()->mExcludeHolidays),excludeBox); @@ -692,12 +697,12 @@ void KOPrefsDialog::setupTimeTab() void KOPrefsDialog::setupViewsTab() { - QFrame *topFrame = addPage(i18n("Views"),0,0); + Q3Frame *topFrame = addPage(i18n("Views"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,6,1); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); // QBoxLayout *dayBeginsLayout = new QHBoxLayout; @@ -784,9 +789,9 @@ void KOPrefsDialog::setupViewsTab() topFrame = addPage(i18n("ViewChange"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,6,1); + topLayout = new Q3GridLayout(topFrame,6,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); ii = 0; @@ -837,14 +842,14 @@ void KOPrefsDialog::setupViewsTab() topFrame = addPage(i18n("Month View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,5,1); + topLayout = new Q3GridLayout(topFrame,5,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); ii = 0; QLabel *lab; - QHBox *habo = new QHBox( topFrame ); + Q3HBox *habo = new Q3HBox( topFrame ); if ( QApplication::desktop()->width() < 320 ) { lab = new QLabel ( i18n("Show events that recur "), topFrame ); topLayout->addMultiCellWidget(lab,ii, ii,0,1); ii++; @@ -864,9 +869,9 @@ void KOPrefsDialog::setupViewsTab() topLayout->addMultiCellWidget(habo,ii, ii,0,1); ii++; - habo = new QHBox( topFrame ); + habo = new Q3HBox( topFrame ); if ( QApplication::desktop()->width() < 320 ) { lab = new QLabel (i18n("Show in every cell ") , topFrame ); topLayout->addMultiCellWidget(lab,ii, ii,0,1); ii++; @@ -932,9 +937,9 @@ void KOPrefsDialog::setupViewsTab() topFrame = addPage(i18n("Todo View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new Q3GridLayout(topFrame,4,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); ii = 0; @@ -964,17 +969,17 @@ void KOPrefsDialog::setupViewsTab() // Todo due today color KPrefsWidColor *todoDueTodayColor = addWidColor(i18n("Todo due today color:"), &(KOPrefs::instance()->mTodoDueTodayColor),wid); - QHBoxLayout *widLayout = new QHBoxLayout(wid); + Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid); widLayout->addWidget( todoDueTodayColor->label() ); widLayout->addWidget( todoDueTodayColor->button() ); topLayout->addWidget(wid,ii++,0); //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); // Todo overdue color wid = new QWidget( topFrame ); - widLayout = new QHBoxLayout(wid); + widLayout = new Q3HBoxLayout(wid); KPrefsWidColor *todoOverdueColor = addWidColor(i18n("Todo overdue color:"), &(KOPrefs::instance()->mTodoOverdueColor),wid); widLayout->addWidget(todoOverdueColor->label()); @@ -996,9 +1001,9 @@ void KOPrefsDialog::setupViewsTab() topFrame = addPage(i18n("Alarm"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,2,1); + topLayout = new Q3GridLayout(topFrame,2,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); int iii = 0; @@ -1009,30 +1014,30 @@ void KOPrefsDialog::setupViewsTab() lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame); topLayout->addWidget(lab ,iii++,0); #ifndef DESKTOP_VERSION - lab->setAlignment( AlignLeft|WordBreak|AlignTop); + lab->setAlignment( Qt::AlignLeft|Qt::TextWordWrap|Qt::AlignTop); #else - lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); + lab->setAlignment( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop); lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); #endif - QHBox* dummyBox = new QHBox(topFrame); + Q3HBox* dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Play beeps count:"),dummyBox); mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Beeps interval in sec:"),dummyBox); mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Default suspend time in min:"),dummyBox); mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); - dummyBox = new QHBox(topFrame); + dummyBox = new Q3HBox(topFrame); new QLabel(i18n("Auto suspend count:"),dummyBox); mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); topLayout->addWidget(dummyBox,iii++,0); @@ -1041,9 +1046,9 @@ void KOPrefsDialog::setupViewsTab() - QHBox* hbo = new QHBox ( topFrame ); + Q3HBox* hbo = new Q3HBox ( topFrame ); mDefaultAlarmFile = new QLineEdit(hbo); QPushButton * loadTemplate = new QPushButton(hbo); QPixmap icon; if ( QApplication::desktop()->width() < 321 ) @@ -1081,12 +1086,12 @@ void KOPrefsDialog::selectSoundFile() } void KOPrefsDialog::setupFontsTab() { - QFrame *topFrame = addPage(i18n("Fonts"),0,0); + Q3Frame *topFrame = addPage(i18n("Fonts"),0,0); // DesktopIcon("fonts",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,7,3); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3); topLayout->setSpacing(1); topLayout->setMargin(3); KPrefsDialogWidFont * tVFont; int i = 0; @@ -1151,9 +1156,9 @@ void KOPrefsDialog::setupFontsTab() i = 0; topFrame = addPage(i18n("View Fonts"),0, DesktopIcon("fonts",KIcon::SizeMedium)); - topLayout = new QGridLayout(topFrame,7,3); + topLayout = new Q3GridLayout(topFrame,7,3); topLayout->setSpacing(1); topLayout->setMargin(3); tVFont = @@ -1219,22 +1224,22 @@ void KOPrefsDialog::setupFontsTab() } void KOPrefsDialog::setupColorsTab() { - QFrame *topFrame = addPage(i18n("Colors"),0,0); + Q3Frame *topFrame = addPage(i18n("Colors"),0,0); // DesktopIcon("colorize",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,5,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); // topLayout->setSpacing(spacingHint()); // topLayout->setMargin(marginHint()); topLayout->setSpacing(2); topLayout->setMargin(3); int ii = 1; - QGroupBox *categoryGroup ; + Q3GroupBox *categoryGroup ; - categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), + categoryGroup = new Q3GroupBox(1,Qt::Vertical,i18n("Categories"), topFrame); topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); mCategoryCombo = new QComboBox(categoryGroup); @@ -1325,9 +1330,9 @@ void KOPrefsDialog::setupPrinterTab() { mPrinterTab = addPage(i18n("Printing"),0, DesktopIcon("fileprint",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); + Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); topLayout->setRowStretch(4,1); @@ -1335,12 +1340,12 @@ void KOPrefsDialog::setupPrinterTab() void KOPrefsDialog::setupGroupSchedulingTab() { #if 0 - QFrame *topFrame = addPage(i18n("Group Scheduling"),0, + Q3Frame *topFrame = addPage(i18n("Group Scheduling"),0, DesktopIcon("personal",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,6,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); #if 0 @@ -1361,9 +1366,9 @@ void KOPrefsDialog::setupGroupSchedulingTab() topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); - mAMails = new QListView(topFrame); + mAMails = new Q3ListView(topFrame); mAMails->addColumn(i18n("Email"),300); topLayout->addMultiCellWidget(mAMails,3,3,0,1); topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); @@ -1379,19 +1384,19 @@ void KOPrefsDialog::setupGroupSchedulingTab() //topLayout->setRowStretch(2,1); connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); - connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); + connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput())); #endif } void KOPrefsDialog::setupGroupAutomationTab() { return; - QFrame *topFrame = addPage(i18n("Group Automation"),0, + Q3Frame *topFrame = addPage(i18n("Group Automation"),0, DesktopIcon("personal",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,5,1); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,1); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); KPrefsWidRadios *autoRefreshGroup = @@ -1542,9 +1547,9 @@ void KOPrefsDialog::usrWriteConfig() KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); - QDictIterator<QColor> it(mCategoryDict); + Q3DictIterator<QColor> it(mCategoryDict); while (it.current()) { KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); ++it; } @@ -1682,16 +1687,16 @@ void KOPrefsDialog::updateTimezoneOffset( int index ) } void KOPrefsDialog::setupTimeZoneTab() { - QFrame *topFrame = addPage(i18n("Time Zone"),0,0); + Q3Frame *topFrame = addPage(i18n("Time Zone"),0,0); // DesktopIcon("clock",KIcon::SizeMedium)); - QGridLayout *topLayout = new QGridLayout(topFrame,5,2); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2); topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); - QHBox *timeZoneBox = new QHBox( topFrame ); + Q3HBox *timeZoneBox = new Q3HBox( topFrame ); topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); new QLabel( i18n("Timezone:"), timeZoneBox ); mTimeZoneCombo = new QComboBox( timeZoneBox ); diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h index 7fa9261..042af3f 100644 --- a/kmicromail/koprefsdialog.h +++ b/kmicromail/koprefsdialog.h @@ -22,12 +22,14 @@ */ #ifndef _KOPREFSDIALOG_H #define _KOPREFSDIALOG_H -#include <qframe.h> -#include <qdict.h> +#include <q3frame.h> +#include <q3dict.h> #include <qcolor.h> -#include <qlistview.h> +#include <q3listview.h> +//Added by qt3to4: +#include <QLabel> #include <kdialogbase.h> #include <libkdepim/kprefsdialog.h> @@ -118,9 +120,9 @@ protected: private: KPrefsWidBool *mEnableGroupScheduling; KPrefsWidBool *mEnableProjectView; - QFrame *mPrinterTab; + Q3Frame *mPrinterTab; QLineEdit *nameEdit; QLineEdit *emailEdit; @@ -145,9 +147,9 @@ protected: QComboBox *mAlarmTimeCombo; QComboBox *mCategoryCombo; KColorButton *mCategoryButton; - QDict<QColor> mCategoryDict; + Q3Dict<QColor> mCategoryDict; QSlider *mHourSizeSlider; QSpinBox *mNextXDaysSpin; diff --git a/kmicromail/libetpan/libetpan.pro b/kmicromail/libetpan/libetpan.pro index dfafa07..4b2654e 100644 --- a/kmicromail/libetpan/libetpan.pro +++ b/kmicromail/libetpan/libetpan.pro @@ -2,9 +2,9 @@ # Automatically generated by qmake (1.07a) Thu Jul 1 00:54:03 2004 ###################################################################### TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan OBJECTS_DIR = obj MOC_DIR = moc DESTDIR=../../bin diff --git a/kmicromail/libetpan/libetpanE.pro b/kmicromail/libetpan/libetpanE.pro index 7f37948..ea22692 100644 --- a/kmicromail/libetpan/libetpanE.pro +++ b/kmicromail/libetpan/libetpanE.pro @@ -2,9 +2,9 @@ # Automatically generated by qmake (1.07a) Thu Jul 1 00:54:03 2004 ###################################################################### TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR=$(QPEDIR)/lib 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 @@ -7,15 +7,17 @@ #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> @@ -110,12 +112,12 @@ QString AbstractMail::convert_String(const char*text) /* 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() + "}"; } @@ -137,18 +139,18 @@ 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)); @@ -176,9 +178,9 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe 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")); @@ -186,12 +188,12 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe } 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 )); @@ -220,23 +222,23 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe 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; @@ -245,9 +247,9 @@ void AbstractMail::mvcpMailList(const QValueList<RecMailP>& t, 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)); 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 @@ -6,8 +6,10 @@ #include "settings.h" #include <qobject.h> +//Added by qt3to4: +#include <Q3ValueList> #include <opie2/osmartpointer.h> #include "mailtypes.h" @@ -24,28 +26,28 @@ class AbstractMail:public QObject Q_OBJECT public: AbstractMail(){}; virtual ~AbstractMail(){} - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0; - virtual void listMessages(const QString & mailbox,QValueList<RecMailP>&target, int sizeInKb = 0 )=0; + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders()=0; + virtual void listMessages(const QString & mailbox,Q3ValueList<RecMailP>&target, int sizeInKb = 0 )=0; virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX")=0; virtual RecBodyP fetchBody(const RecMailP&mail)=0; virtual QString fetchTextPart(const RecMailP&mail,const RecPartP&part)=0; virtual encodedString* fetchDecodedPart(const RecMailP&mail,const RecPartP&part)=0; virtual encodedString* fetchRawPart(const RecMailP&mail,const RecPartP&part)=0; virtual encodedString* fetchRawBody(const RecMailP&mail)=0; virtual void deleteMail(const RecMailP&mail)=0; - virtual void deleteMailList(const QValueList<RecMailP>&target); + virtual void deleteMailList(const Q3ValueList<RecMailP>&target); virtual void answeredMail(const RecMailP&mail)=0; virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&)=0; - virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> >&target); + virtual void deleteMails(const QString & FolderName,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target); virtual int deleteMbox(const Opie::Core::OSmartPointer<Folder>&)=0; virtual void storeMessage(const char*msg,size_t length, const QString&folder)=0; void downloadNewMails(const FolderP&fromFolder,AbstractMail*targetWrapper ); virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int sizeInKb = 0); - virtual void mvcpMailList(const QValueList<RecMailP>& t, + virtual void mvcpMailList(const Q3ValueList<RecMailP>& t, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); virtual void cleanMimeCache(){}; 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 @@ -6,8 +6,10 @@ //#include <qt.h> #include <stdlib.h> #include <qfileinfo.h> +//Added by qt3to4: +#include <Q3CString> using namespace Opie::Core; const char* Generatemail::USER_AGENT="KOpieMail 33 1/3"; @@ -227,9 +229,9 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) { mailmime_fields *fields; mailmime_content *content; mailmime_parameter *param; int err; - QCString __str; + Q3CString __str; //qDebug(" Generatemail::buildTxtPart %s", str.latin1()); param = mailmime_parameter_new( strdup( "charset" ), strdup( mCharset.latin1() ) ); if ( param == NULL ) @@ -251,9 +253,9 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) { if ( txtPart == NULL ) goto err_free_fields; { //__str = str.utf8(); - __str = QCString (str.latin1()); + __str = Q3CString (str.latin1()); err = mailmime_set_body_text( txtPart, strdup(__str.data()), __str.length() ); } if ( err != MAILIMF_NO_ERROR ) goto err_free_txtPart; 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 @@ -5,8 +5,10 @@ #include <kconfig.h> #include <kglobal.h> #include <kstandarddirs.h> +//Added by qt3to4: +#include <Q3ValueList> using namespace Opie::Core; Genericwrapper::Genericwrapper() @@ -181,9 +183,9 @@ QString Genericwrapper::getencoding(mailmime_mechanism*aEnc) } return enc; } -void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rec,int current_count) +void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,Q3ValueList<int>recList,unsigned int current_rec,int current_count) { if (current_rec >= 10) { ; // odebug << "too deep recursion!" << oendl; } @@ -199,9 +201,9 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m switch (mime->mm_type) { case MAILMIME_SINGLE: { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; countlist.append(current_count); r = mailmessage_fetch_section(message,mime,&data,&len); part->setSize(len); part->setPositionlist(countlist); @@ -249,9 +251,9 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m case MAILMIME_MULTIPLE: { unsigned int ccount = 1; mailmime*cbody=0; - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; for (cur = clist_begin(mime->mm_data.mm_multipart.mm_mp_list) ; cur != NULL ; cur = clist_next(cur)) { cbody = (mailmime*)clist_content(cur); if (cbody->mm_type==MAILMIME_MULTIPLE) { RecPartP targetPart = new RecPart(); @@ -269,9 +271,9 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m } break; case MAILMIME_MESSAGE: { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; countlist.append(current_count); /* the own header is always at recursion 0 - we don't need that */ if (current_rec > 0) { part->setPositionlist(countlist); @@ -301,9 +303,9 @@ RecBodyP Genericwrapper::parseMail( mailmessage * msg ) mailmime * mime=0; RecBodyP body = new RecBody(); //memset(&fields, 0, sizeof(struct mailmime_single_fields)); err = mailmessage_get_bodystructure(msg,&mime); - QValueList<int>recList; + Q3ValueList<int>recList; traverseBody(body,msg,mime,recList); return body; } @@ -446,9 +448,9 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) } return res; } -void Genericwrapper::parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to, int maxSizeInKb) +void Genericwrapper::parseList(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to, int maxSizeInKb) { int r; mailmessage_list * env_list = 0; r = mailsession_get_messages_list(session,&env_list); 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 @@ -4,8 +4,10 @@ #include "abstractmail.h" #include <qmap.h> #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> #include <libetpan/clist.h> class RecMail; class RecBody; @@ -50,13 +52,13 @@ protected: QString parseMailbox( mailimf_mailbox *box ); QString parseGroup( mailimf_group *group ); QString parseAddressList( mailimf_address_list *list ); - void traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueList<int>recList,unsigned int current_rek=0,int current_count=1); + void traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,Q3ValueList<int>recList,unsigned int current_rek=0,int current_count=1); static void fillSingleBody(RecPartP&target,mailmessage*message,mailmime*mime); static void fillParameters(RecPartP&target,clist*parameters); static QString getencoding(mailmime_mechanism*aEnc); - virtual void parseList(QValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false, int maxSizeInKb = 0); + virtual void parseList(Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false, int maxSizeInKb = 0); QStringList parseInreplies(mailimf_in_reply_to * in_replies); QString msgTempName; unsigned int last_msg_id; 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 @@ -2,12 +2,14 @@ #include <stdlib.h> #include <libetpan/libetpan.h> #include <qpe/global.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3ValueList> #include "imapwrapper.h" #include "mailtypes.h" #include "logindialog.h" -#include <qprogressbar.h> +#include <q3progressbar.h> #include "genericwrapper.h" #include <kglobal.h> using namespace Opie::Core; @@ -238,9 +240,9 @@ void IMAPwrapper::logout() m_imap = 0; m_Lastmbox = ""; } -void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb) +void IMAPwrapper::listMessages(const QString&mailbox,Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target , int maxSizeInKb) { int tryAgain = 1; while ( tryAgain >= 0 ) { @@ -319,18 +321,18 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList<Opie::Core::OSma if (result) mailimap_fetch_list_free(result); } } -QValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() +Q3ValueList<Opie::Core::OSmartPointer<Folder> >* IMAPwrapper::listFolders() { const char *path, *mask; int err = MAILIMAP_NO_ERROR; clist *result = 0; clistcell *current = 0; clistcell*cur_flag = 0; mailimap_mbx_list_flags*bflags = 0; - QValueList<FolderP>* folders = new QValueList<FolderP>(); + Q3ValueList<FolderP>* folders = new Q3ValueList<FolderP>(); login(); if (!m_imap) { return folders; } @@ -612,9 +614,9 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) if (err == MAILIMAP_NO_ERROR && (current=clist_begin(result)) ) { mailimap_msg_att * msg_att; msg_att = (mailimap_msg_att*)current->data; mailimap_msg_att_item*item = (mailimap_msg_att_item*)msg_att->att_list->first->data; - QValueList<int> path; + Q3ValueList<int> path; body_desc = item->att_data.att_static->att_data.att_body; traverseBody(mail,body_desc,body,0,path); } else { qDebug("error fetching body %d (%d): %s", err, MAILIMAP_NO_ERROR, m_imap->imap_response ); @@ -663,9 +665,9 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) } return l; } -encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call) +encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call) { encodedString*res=new encodedString; int err; mailimap_fetch_type *fetchType; @@ -737,17 +739,17 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList<int /* current_recursion is for recursive calls. current_count means the position inside the internal loop! */ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body, - int current_recursion,QValueList<int>recList,int current_count) + int current_recursion,Q3ValueList<int>recList,int current_count) { if (!body || current_recursion>=10) { return; } switch (body->bd_type) { case MAILIMAP_BODY_1PART: { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; countlist.append(current_count); RecPartP currentPart = new RecPart(); mailimap_body_type_1part*part1 = body->bd_data.bd_body_1part; QString id(""); @@ -798,9 +800,9 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t } break; case MAILIMAP_BODY_MPART: { - QValueList<int>countlist = recList; + Q3ValueList<int>countlist = recList; clistcell*current=0; mailimap_body*current_body=0; unsigned int ccount = 1; mailimap_body_type_mpart*mailDescription = body->bd_data.bd_body_mpart; @@ -984,9 +986,9 @@ void IMAPwrapper::fillBodyFields(RecPartP&target_part,mailimap_body_fields*which } target_part->setEncoding(encoding); target_part->setSize(which->bd_size); } -void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target) +void IMAPwrapper::deleteMailList(const Q3ValueList<RecMailP>&target) { //#if 0 mailimap_flag_list*flist; mailimap_set *set; @@ -1004,9 +1006,9 @@ void IMAPwrapper::deleteMailList(const QValueList<RecMailP>&target) mMax = count; progress( i18n("Delete")); - 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)); @@ -1113,9 +1115,9 @@ void IMAPwrapper::answeredMail(const RecMailP&mail) return; } } -QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call,const QString&enc) +QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call,const QString&enc) { QString body(""); encodedString*res = fetchRawPart(mail,path,internal_call); encodedString*r = decode_String(res,enc); @@ -1298,9 +1300,9 @@ const QString&IMAPwrapper::getName()const encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail) { // dummy - QValueList<int> path; + Q3ValueList<int> path; return fetchRawPart(mail,path,false); } void IMAPwrapper::mvcpAllMails(const FolderP&fromFolder, 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 @@ -2,8 +2,10 @@ #ifndef __IMAPWRAPPER #define __IMAPWRAPPER #include <qlist.h> +//Added by qt3to4: +#include <Q3ValueList> #include "mailwrapper.h" #include "abstractmail.h" #include <libetpan/clist.h> @@ -23,14 +25,14 @@ class IMAPwrapper : public AbstractMail Q_OBJECT public: IMAPwrapper( IMAPaccount *a ); virtual ~IMAPwrapper(); - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); - virtual void listMessages(const QString & mailbox,QValueList<Opie::Core::OSmartPointer<RecMail> >&target , int sizeInKb = 0); + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); + virtual void listMessages(const QString & mailbox,Q3ValueList<Opie::Core::OSmartPointer<RecMail> >&target , int sizeInKb = 0); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); virtual void deleteMail(const RecMailP&mail); - void deleteMailList(const QValueList<RecMailP>&target); + void deleteMailList(const Q3ValueList<RecMailP>&target); virtual void answeredMail(const RecMailP&mail); virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&folder); virtual void storeMessage(const char*msg,size_t length, const QString&folder); virtual void mvcpAllMails(const Opie::Core::OSmartPointer<Folder>&fromFolder, @@ -58,18 +60,18 @@ protected: RecMail*parse_list_result(mailimap_msg_att*); void login(bool tryTLS = true); bool start_tls(bool force=true); - virtual QString fetchTextPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call=false,const QString&enc=""); - virtual encodedString*fetchRawPart(const RecMailP&mail,const QValueList<int>&path,bool internal_call); + virtual QString fetchTextPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call=false,const QString&enc=""); + virtual encodedString*fetchRawPart(const RecMailP&mail,const Q3ValueList<int>&path,bool internal_call); int selectMbox(const QString&mbox); void fillSinglePart(RecPartP&target_part,mailimap_body_type_1part*Description); void fillSingleTextPart(RecPartP&target_part,mailimap_body_type_text*which); void fillSingleBasicPart(RecPartP&target_part,mailimap_body_type_basic*which); void fillSingleMsgPart(RecPartP&target_part,mailimap_body_type_msg*which); void fillMultiPart(RecPartP&target_part,mailimap_body_type_mpart*which); - void traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,int current_recursion,QValueList<int>recList,int current_count=1); + void traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,int current_recursion,Q3ValueList<int>recList,int current_count=1); /* just helpers */ static void fillBodyFields(RecPartP&target_part,mailimap_body_fields*which); static QStringList address_list_to_stringlist(clist*list); 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 @@ -37,9 +37,10 @@ SOURCES = imapwrapper.cpp \ storemail.cpp \ ../qpe/qdialog_hacked.cpp \ ../qpe/global.cpp -INTERFACES = logindialogui.ui \ +#The following line was changed from INTERFACES to FORMS3 by qt3to4 +FORMS3 = logindialogui.ui \ sendmailprogressui.ui INCLUDEPATH += ../qpe .. ../../microkde ../../microkde/kdecore ../../libetpan/include LIBS += -lssl -lcrypto @@ -62,4 +63,9 @@ QMAKE_LINK += /NODEFAULTLIB:LIBC #QMAKE_LINK += /NODEFAULTLIB:uafxcw.lib OBJECTS_DIR = obj/win MOC_DIR = moc/win } +#The following line was inserted by qt3to4 +QT += xml qt3support +#The following line was inserted by qt3to4 +CONFIG += uic3 + 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 @@ -5,9 +5,9 @@ //using namespace Opie::Core; -LoginDialog::LoginDialog(const QString&user,const QString&pass, QWidget *parent, const char *name, bool modal, WFlags flags ) +LoginDialog::LoginDialog(const QString&user,const QString&pass, QWidget *parent, const char *name, bool modal, Qt::WFlags flags ) : LoginDialogUI( parent, name, modal, flags ) { userLine->setText( (user.isEmpty()?QString(""):user) ); passLine->setText( (pass.isEmpty()?QString(""):pass) ); 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 @@ -7,9 +7,9 @@ class LoginDialog : public LoginDialogUI { Q_OBJECT public: - LoginDialog(const QString&user,const QString&pass, QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags flags = 0 ); + LoginDialog(const QString&user,const QString&pass, QWidget *parent = 0, const char *name = 0, bool modal = false, Qt::WFlags flags = 0 ); QString getUser() { return _user; } QString getPassword() { return _pass; } protected slots: 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 @@ -2,8 +2,10 @@ //#include <opie2/odebug.h> #include <stdlib.h> +//Added by qt3to4: +#include <Q3ValueList> using namespace Opie::Core; RecMail::RecMail() :Opie::Core::ORefCount(),subject(""),date(""),from(""),mbox(""),msg_id(""),msg_number(0),msg_size(0),msg_flags(7) @@ -282,14 +284,14 @@ const QString RecPart::searchParamter(const QString&key)const } return value; } -void RecPart::setPositionlist(const QValueList<int>&poslist) +void RecPart::setPositionlist(const Q3ValueList<int>&poslist) { m_poslist = poslist; } -const QValueList<int>& RecPart::Positionlist()const +const Q3ValueList<int>& RecPart::Positionlist()const { return m_poslist; } @@ -322,15 +324,15 @@ const QString& RecBody::Bodytext()const { return m_BodyText; } -void RecBody::setParts(const QValueList<RecPartP>&parts) +void RecBody::setParts(const Q3ValueList<RecPartP>&parts) { m_PartsList.clear(); m_PartsList = parts; } -const QValueList<RecPartP>& RecBody::Parts()const +const Q3ValueList<RecPartP>& RecBody::Parts()const { return m_PartsList; } 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 @@ -13,9 +13,9 @@ #include <qbitarray.h> #include <qstring.h> #include <qstringlist.h> #include <qmap.h> -#include <qvaluelist.h> +#include <q3valuelist.h> class AbstractMail; /* a class to describe mails in a mailbox */ /* Attention! @@ -108,9 +108,9 @@ protected: QString m_type,m_subtype,m_identifier,m_encoding,m_description; unsigned int m_lines,m_size; part_plist_t m_Parameters; /* describes the position in the mail */ - QValueList<int> m_poslist; + Q3ValueList<int> m_poslist; public: RecPart(); RecPart(const RecPart&); @@ -135,10 +135,10 @@ public: void setParameters(const part_plist_t&list); const part_plist_t&Parameters()const; void addParameter(const QString&key,const QString&value); const QString searchParamter(const QString&key)const; - void setPositionlist(const QValueList<int>&poslist); - const QValueList<int>& Positionlist()const; + void setPositionlist(const Q3ValueList<int>&poslist); + const Q3ValueList<int>& Positionlist()const; }; typedef Opie::Core::OSmartPointer<RecPart> RecPartP; @@ -146,9 +146,9 @@ class RecBody:public Opie::Core::ORefCount { protected: QString m_BodyText; QString mCharset; - QValueList<RecPartP> m_PartsList; + Q3ValueList<RecPartP> m_PartsList; RecPartP m_description; public: RecBody(); @@ -161,10 +161,10 @@ public: void setDescription(const RecPartP&des); const RecPartP& Description()const; - void setParts(const QValueList<RecPartP>&parts); - const QValueList<RecPartP>& Parts()const; + void setParts(const Q3ValueList<RecPartP>&parts); + const Q3ValueList<RecPartP>& Parts()const; void addPart(const RecPartP&part); }; typedef Opie::Core::OSmartPointer<RecBody> RecBodyP; 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 @@ -4,8 +4,10 @@ #include <unistd.h> #include <fcntl.h> #include <string.h> #include <qdir.h> +//Added by qt3to4: +#include <Q3CString> #include "mailwrapper.h" //#include "logindialog.h" //#include "defines.h" @@ -80,10 +82,10 @@ QString IMAPFolder::decodeFolderName( const QString &name ) unsigned char c, i, bitcount; unsigned long ucs4, utf16, bitbuf; unsigned char base64[256], utf8[6]; unsigned long srcPtr = 0; - QCString dst = ""; - QCString src = name.ascii(); + Q3CString dst = ""; + Q3CString src = name.ascii(); /* initialize modified base64 decoding table */ memset(base64, UNDEFINED, sizeof(base64)); for (i = 0; i < sizeof(base64chars); ++i) { @@ -91,11 +93,11 @@ QString IMAPFolder::decodeFolderName( const QString &name ) } /* loop until end of string */ while (srcPtr < src.length ()) { - c = src[srcPtr++]; + c = src.at(srcPtr++); /* deal with literal characters and &- */ - if (c != '&' || src[srcPtr] == '-') { + if (c != '&' || src.at(srcPtr) == '-') { /* encode literally */ dst += c; /* skip over the '-' if this is an &- sequence */ if (c == '&') @@ -104,9 +106,9 @@ QString IMAPFolder::decodeFolderName( const QString &name ) /* convert modified UTF-7 -> UTF-16 -> UCS-4 -> UTF-8 -> HEX */ bitbuf = 0; bitcount = 0; ucs4 = 0; - while ((c = base64[(unsigned char) src[srcPtr]]) != UNDEFINED) { + while ((c = base64[(unsigned char) src.at(srcPtr)]) != UNDEFINED) { ++srcPtr; bitbuf = (bitbuf << 6) | c; bitcount += 6; /* enough bits for a UTF-16 character? */ @@ -148,9 +150,9 @@ QString IMAPFolder::decodeFolderName( const QString &name ) } } } /* skip over trailing '-' in modified UTF-7 encoding */ - if (src[srcPtr] == '-') + if (src.at(srcPtr) == '-') ++srcPtr; } } 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 @@ -5,8 +5,10 @@ #include <qbitarray.h> #include <qdatetime.h> #include <qfileinfo.h> +//Added by qt3to4: +#include <QPixmap> #include <kiconloader.h> #include "settings.h" @@ -60,9 +62,9 @@ public: * speed will be a little bit better? */ virtual ~Mail(){} void addAttachment( Attachment *att ) { attList.append( att ); } - const QList<Attachment>& getAttachments()const { return attList; } + const QList<Attachment*>& getAttachments()const { return attList; } void removeAttachment( Attachment *att ) { attList.remove( att ); } const QString&getName()const { return name; } void setName( QString s ) { name = s; } const QString&getMail()const{ return mail; } @@ -85,9 +87,9 @@ public: void setCharset( const QString&a ) { charset= a; } const QString& getCharset() const { return charset; } private: - QList<Attachment> attList; + QList<Attachment*> attList; QString name, mail, to, cc, bcc, reply, subject, message, charset; QStringList m_in_reply_to; }; 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 @@ -2,8 +2,10 @@ #include "mailtypes.h" #include "mailwrapper.h" #include <libetpan/libetpan.h> #include <qdir.h> +//Added by qt3to4: +#include <Q3ValueList> #include <stdlib.h> #include <klocale.h> @@ -22,9 +24,9 @@ MBOXwrapper::MBOXwrapper(const QString & mbox_dir,const QString&mbox_name) MBOXwrapper::~MBOXwrapper() { } -void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &target ) +void MBOXwrapper::listMessages(const QString & mailbox, Q3ValueList<RecMailP> &target ) { mailstorage*storage = mailstorage_new(NULL); QString p = MBOXPath+"/"; p+=mailbox; @@ -47,11 +49,11 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList<RecMailP> &ta mailstorage_free(storage); Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count())); } -QValueList<Opie::Core::OSmartPointer<Folder> >* MBOXwrapper::listFolders() +Q3ValueList<Opie::Core::OSmartPointer<Folder> >* MBOXwrapper::listFolders() { - QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); + Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >(); QDir dir(MBOXPath); if (!dir.exists()) return folders; dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable); QStringList entries = dir.entryList(); @@ -216,9 +218,9 @@ encodedString* MBOXwrapper::fetchRawBody(const RecMailP&mail) mailmessage_free(msg); return result; } -void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> &target) +void MBOXwrapper::deleteMails(const QString & mailbox,const Q3ValueList<RecMailP> &target) { QString p = MBOXPath+"/"; p+=mailbox; mailmbox_folder*f = 0; @@ -230,13 +232,13 @@ void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> deleteMails(f,target); mailmbox_done(f); } -void MBOXwrapper::deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target) +void MBOXwrapper::deleteMails(mailmbox_folder*f,const Q3ValueList<RecMailP> &target) { if (!f) return; int r; - QValueList<RecMailP>::ConstIterator it; + Q3ValueList<RecMailP>::ConstIterator it; for (it=target.begin(); it != target.end();++it) { r = mailmbox_delete_msg(f,(*it)->getNumber()); if (r!=MAILMBOX_NO_ERROR) { ; // << "error delete mail" << oendl; 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 @@ -2,8 +2,10 @@ #define __MBOX_WRAPPER_H #include "genericwrapper.h" #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> class encodedString; struct mailmbox_folder; @@ -14,10 +16,10 @@ class MBOXwrapper : public Genericwrapper public: MBOXwrapper(const QString & dir,const QString&name); virtual ~MBOXwrapper(); - virtual void listMessages(const QString & mailbox, QValueList<RecMailP>&target ); - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); + virtual void listMessages(const QString & mailbox, Q3ValueList<RecMailP>&target ); + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); virtual void deleteMail(const RecMailP&mail); virtual void answeredMail(const RecMailP&mail); @@ -31,16 +33,16 @@ public: virtual RecBodyP fetchBody( const RecMailP &mail ); static void mbox_progress( size_t current, size_t maximum ); virtual encodedString* fetchRawBody(const RecMailP&mail); - virtual void deleteMails(const QString & FolderName,const QValueList<RecMailP> &target); + virtual void deleteMails(const QString & FolderName,const Q3ValueList<RecMailP> &target); virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); virtual MAILLIB::ATYPE getType()const; virtual const QString&getName()const; virtual Account* getAccount() { return 0; }; protected: - static void deleteMails(mailmbox_folder*f,const QValueList<RecMailP> &target); + static void deleteMails(mailmbox_folder*f,const Q3ValueList<RecMailP> &target); QString MBOXPath; QString MBOXName; }; 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 @@ -4,8 +4,10 @@ #include "mailwrapper.h" #include <libetpan/libetpan.h> #include <qdir.h> #include <qmessagebox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <stdlib.h> #include <qpe/global.h> #include <klocale.h> #include <kglobal.h> @@ -63,9 +65,9 @@ MHwrapper::~MHwrapper() { clean_storage(); } -void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) +void MHwrapper::listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) { init_storage(); if (!m_storage) { return; @@ -79,11 +81,11 @@ void MHwrapper::listMessages(const QString & mailbox, QValueList<Opie::Core::OSm parseList(target,m_storage->sto_session,f, false, maxSizeInKb ); Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count())); } -QValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() +Q3ValueList<Opie::Core::OSmartPointer<Folder> >* MHwrapper::listFolders() { - QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); + Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >(); /* this is needed! */ if (m_storage) mailstorage_disconnect(m_storage); init_storage(); if (!m_storage) { @@ -254,17 +256,17 @@ encodedString* MHwrapper::fetchRawBody(const RecMailP&mail) if (msg) mailmessage_free(msg); return result; } -void MHwrapper::deleteMails(const QString & mailbox,const QValueList<RecMailP> &target) +void MHwrapper::deleteMails(const QString & mailbox,const Q3ValueList<RecMailP> &target) { QString f = buildPath(mailbox); int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); if (r!=MAIL_NO_ERROR) { qDebug("deleteMails: error selecting folder! "); return; } - QValueList<RecMailP>::ConstIterator it; + Q3ValueList<RecMailP>::ConstIterator it; for (it=target.begin(); it!=target.end();++it) { r = mailsession_remove_message(m_storage->sto_session,(*it)->getNumber()); if (r != MAIL_NO_ERROR) { qDebug("error deleting mail "); 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 @@ -5,8 +5,10 @@ #include "maildefines.h" #include "genericwrapper.h" #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> class encodedString; struct mailmbox_folder; class MHwrapper : public Genericwrapper @@ -15,10 +17,10 @@ class MHwrapper : public Genericwrapper public: MHwrapper(const QString & dir,const QString&name); virtual ~MHwrapper(); - virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); + virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); virtual void deleteMail(const RecMailP&mail); virtual void answeredMail(const RecMailP&mail); @@ -35,9 +37,9 @@ public: virtual RecBodyP fetchBody( const RecMailP &mail ); static void mbox_progress( size_t current, size_t maximum ); virtual encodedString* fetchRawBody(const RecMailP&mail); - virtual void deleteMails(const QString & FolderName,const QValueList<Opie::Core::OSmartPointer<RecMail> > &target); + virtual void deleteMails(const QString & FolderName,const Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target); virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); virtual MAILLIB::ATYPE getType()const; virtual const QString&getName()const; virtual Account* getAccount() { return 0; }; 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 @@ -3,8 +3,10 @@ #include "logindialog.h" #include "mailtypes.h" #include <qfile.h> +//Added by qt3to4: +#include <Q3ValueList> #include <stdlib.h> #include <libetpan/libetpan.h> @@ -59,16 +61,16 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { if (mail->getNumber()!=last_msg_id) { if (msg_cache.exists()) { msg_cache.remove(); } - msg_cache.open(IO_ReadWrite|IO_Truncate); + msg_cache.open(QIODevice::ReadWrite|QIODevice::Truncate); last_msg_id = mail->getNumber(); err = mailsession_get_message(m_nntp->sto_session, mail->getNumber(), &mailmsg); err = mailmessage_fetch(mailmsg,&message,&length); msg_cache.writeBlock(message,length); } else { QString msg=""; - msg_cache.open(IO_ReadOnly); + msg_cache.open(QIODevice::ReadOnly); message = new char[4096]; memset(message,0,4096); while (msg_cache.readBlock(message,4095)>0) { msg+=message; @@ -98,9 +100,9 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { return body; } -void NNTPwrapper::listMessages(const QString & which, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb) +void NNTPwrapper::listMessages(const QString & which, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb) { login(); if (!m_nntp) return; @@ -185,11 +187,11 @@ void NNTPwrapper::logout() mailstorage_free(m_nntp); m_nntp = 0; } -QValueList<Opie::Core::OSmartPointer<Folder> >* NNTPwrapper::listFolders() { +Q3ValueList<Opie::Core::OSmartPointer<Folder> >* NNTPwrapper::listFolders() { - QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<Opie::Core::OSmartPointer<Folder> >(); + Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<Opie::Core::OSmartPointer<Folder> >(); QStringList groups; if (account) { 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 @@ -4,8 +4,10 @@ #include "mailwrapper.h" #include "genericwrapper.h" #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> #include <libetpan/clist.h> class encodedString; struct mailstorage; @@ -20,11 +22,11 @@ public: NNTPwrapper( NNTPaccount *a ); virtual ~NNTPwrapper(); /* mailbox will be ignored */ - virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); + virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); /* should only get the subscribed one */ - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); /* mailbox will be ignored */ virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); QStringList listAllNewsgroups(const QString&mask = QString::null); virtual void deleteMail(const RecMailP&mail); 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 @@ -8,10 +8,12 @@ #include <klocale.h> #include <qpe/global.h> #include <qfile.h> -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3ValueList> /* we don't fetch messages larger than 5 MB */ #define HARD_MSG_SIZE_LIMIT 5242880 @@ -61,16 +63,16 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { if (mail->getNumber()!=last_msg_id) { if (msg_cache.exists()) { msg_cache.remove(); } - msg_cache.open(IO_ReadWrite|IO_Truncate); + msg_cache.open(QIODevice::ReadWrite|QIODevice::Truncate); last_msg_id = mail->getNumber(); err = mailsession_get_message(m_pop3->sto_session, mail->getNumber(), &mailmsg); err = mailmessage_fetch(mailmsg,&message,&length); msg_cache.writeBlock(message,length); } else { QString msg=""; - msg_cache.open(IO_ReadOnly); + msg_cache.open(QIODevice::ReadOnly); message = new char[4096]; memset(message,0,4096); while (msg_cache.readBlock(message,4095)>0) { msg+=message; @@ -99,9 +101,9 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { return body; } -void POP3wrapper::listMessages(const QString &, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) +void POP3wrapper::listMessages(const QString &, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb ) { login(); if (!m_pop3) return; @@ -186,24 +188,24 @@ void POP3wrapper::logout() m_pop3 = 0; } -QValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { - QValueList<Opie::Core::OSmartPointer<Folder> >* folders = new QValueList<FolderP>(); +Q3ValueList<Opie::Core::OSmartPointer<Folder> >* POP3wrapper::listFolders() { + Q3ValueList<Opie::Core::OSmartPointer<Folder> >* folders = new Q3ValueList<FolderP>(); FolderP inb=new Folder("INBOX","/"); folders->append(inb); return folders; } -void POP3wrapper::deleteMailList(const QValueList<RecMailP>&target) +void POP3wrapper::deleteMailList(const Q3ValueList<RecMailP>&target) { login(); if (!m_pop3) return; 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)); @@ -245,9 +247,9 @@ int POP3wrapper::deleteAllMail(const FolderP&) { } - QProgressBar wid ( result ); + Q3ProgressBar wid ( result ); wid.setCaption( i18n("Deleting ...")); wid.show(); for (unsigned int i = 0; i < result; ++i) { Global::statusMessage(i18n("Delete message %1 of %2").arg(i).arg(result)); 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 @@ -4,8 +4,10 @@ #include "mailwrapper.h" #include "genericwrapper.h" #include <qstring.h> +//Added by qt3to4: +#include <Q3ValueList> class encodedString; struct mailstorage; struct mailfolder; @@ -17,15 +19,15 @@ class POP3wrapper : public Genericwrapper public: POP3wrapper( POP3account *a ); virtual ~POP3wrapper(); /* mailbox will be ignored */ - virtual void listMessages(const QString & mailbox, QValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); - virtual QValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); + virtual void listMessages(const QString & mailbox, Q3ValueList<Opie::Core::OSmartPointer<RecMail> > &target, int maxSizeInKb = 0 ); + virtual Q3ValueList<Opie::Core::OSmartPointer<Folder> >* listFolders(); /* mailbox will be ignored */ virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); virtual void deleteMail(const RecMailP&mail); - virtual void deleteMailList(const QValueList<RecMailP>&target); + virtual void deleteMailList(const Q3ValueList<RecMailP>&target); virtual void answeredMail(const RecMailP&mail); virtual int deleteAllMail(const Opie::Core::OSmartPointer<Folder>&); virtual RecBodyP fetchBody( const RecMailP &mail ); 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,6 +1,6 @@ #include "sendmailprogress.h" -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qlabel.h> #include <klocale.h> progressMailSend::progressMailSend(QWidget*parent, const char * name) 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 @@ -1,9 +1,9 @@ #include <stdlib.h> #include <qdir.h> #include <qtextcodec.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qfile.h> //#include <opie2/odebug.h> #include <kconfig.h> @@ -375,13 +375,13 @@ QString SMTPaccount::getSignature() if ( ! fi.exists() ) return QString(); QFile file( signature ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return QString(); } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); QString text = ts.read(); file.close(); @@ -398,13 +398,13 @@ void SMTPaccount::setSignature( QString b ) qDebug("new sig %s ", signature.latin1()); save(); } QFile fileIn( signature ); - if (!fileIn.open( IO_WriteOnly ) ) { + if (!fileIn.open( QIODevice::WriteOnly ) ) { qDebug("OM: Cannot write signature file %s ", signature.latin1() ); return ; } - QTextStream tsIn( &fileIn ); + Q3TextStream tsIn( &fileIn ); tsIn.setCodec( QTextCodec::codecForName("utf8") ); tsIn << b ; 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 @@ -8,8 +8,10 @@ //#include <opie2/odebug.h> //#include <qt.h> #include <qapplication.h> #include <qmessagebox.h> +//Added by qt3to4: +#include <Q3ValueList> #include <stdlib.h> #ifndef DESKTOP_VERSION //#include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> @@ -433,10 +435,10 @@ bool SMTPwrapper::flushOutbox() { ; // odebug << "memory error" << oendl; return false; } QString oldPw, oldUser; - QValueList<RecMailP> mailsToSend; - QValueList<RecMailP> mailsToRemove; + Q3ValueList<RecMailP> mailsToSend; + Q3ValueList<RecMailP> mailsToRemove; QString mbox("Outgoing"); wrap->listMessages(mbox,mailsToSend); if (mailsToSend.count()==0) { delete wrap; diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp index 41cee52..d8eee7d 100644 --- a/kmicromail/mailistviewitem.cpp +++ b/kmicromail/mailistviewitem.cpp @@ -1,13 +1,13 @@ // CHANGED 2004-08-06 Lutz Rogowski #include "mailistviewitem.h" #include <libmailwrapper/abstractmail.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <kiconloader.h> #include "koprefs.h" //#include <qpe/resource.h> -MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * item ) +MailListViewItem::MailListViewItem(Q3ListView * parent, MailListViewItem * item ) :KListViewItem(parent,item),mail_data() { } diff --git a/kmicromail/mailistviewitem.h b/kmicromail/mailistviewitem.h index b409c9d..ecc01ba 100644 --- a/kmicromail/mailistviewitem.h +++ b/kmicromail/mailistviewitem.h @@ -8,9 +8,9 @@ class MailListViewItem:public KListViewItem { public: - MailListViewItem(QListView * parent, MailListViewItem * after ); + MailListViewItem(Q3ListView * parent, MailListViewItem * after ); virtual ~MailListViewItem(){} void storeData(const RecMailP&data); const RecMailP&data()const; diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp index fe4bc76..dc73455 100644 --- a/kmicromail/main.cpp +++ b/kmicromail/main.cpp @@ -2,8 +2,10 @@ #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> +//Added by qt3to4: +#include <Q3CString> #include <libkdepim/externalapphandler.h> #include <stdlib.h> #else #include <qapplication.h> @@ -22,8 +24,9 @@ #include <libkdepim/kpimglobalprefs.h> void dumpMissing(); //using namespace Opie::Core; int main( int argc, char **argv ) { + if(!getenv("QPEDIR")) putenv("QPEDIR=/usr/lib/kdepimpi"); #ifndef DESKTOP_VERSION QPEApplication a( argc, argv ); a.setKeepRunning (); @@ -50,9 +53,9 @@ int main( int argc, char **argv ) { QApplication::setFont( KOPrefs::instance()->mAppFont ); OpieMail mw; #ifndef DESKTOP_VERSION //qDebug("CONNECT "); - QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); + QObject::connect( &a, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )),&mw, SLOT(message( const Q3CString&, const QByteArray& ))); // QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); a.showMainWidget(&mw ); #else a.setMainWidget(&mw ); diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index d547dda..627d92e 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -1,11 +1,17 @@ // CHANGED 2004-08-06 Lutz Rogowski #include <qlabel.h> -#include <qvbox.h> -#include <qheader.h> +#include <q3vbox.h> +#include <q3header.h> #include <qtimer.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3GridLayout> +#include <Q3ValueList> +#include <QPixmap> +#include <Q3PopupMenu> //#include <kdialog.h> #include <kiconloader.h> #include <kapplication.h> @@ -26,22 +32,22 @@ extern QStatusBar* globalSstatusBarMainWindow; #include <libkdepim/kpimglobalprefs.h> #include "koprefs.h" -MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) - : QMainWindow( parent, name ) //, flags ) +MainWindow::MainWindow( QWidget *parent, const char *name, Qt::WFlags flags ) + : Q3MainWindow( parent, name ) //, flags ) { #ifdef DESKTOP_VERSION globalSstatusBarMainWindow = statusBar(); #endif setCaption( i18n( "KOpieMail/Pi" ) ); setToolBarsMovable( false ); //KABC::StdAddressBook::self(); - toolBar = new QToolBar( this ); + toolBar = new Q3ToolBar( this ); menuBar = new QPEMenuBar( toolBar ); - mailMenu = new QPopupMenu( menuBar ); + mailMenu = new Q3PopupMenu( menuBar ); menuBar->insertItem( i18n( "Mail" ), mailMenu ); - settingsMenu = new QPopupMenu( menuBar ); + settingsMenu = new Q3PopupMenu( menuBar ); menuBar->insertItem( i18n( "Settings" ), settingsMenu ); addToolBar( toolBar ); toolBar->setHorizontalStretchable( true ); @@ -113,9 +119,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 0, 0, this ); editAccounts->addTo( settingsMenu ); - codecMenu = new QPopupMenu( menuBar ); + codecMenu = new Q3PopupMenu( menuBar ); codecMenu->insertItem( "Western (iso-8859-1)",0,0); codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); codecMenu->insertItem( "Western (iso-8859-15)",2,2); codecMenu->insertItem( "Chinese (big-5)",3,3); @@ -124,9 +130,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) //disabled //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); //setCentralWidget( view ); - QVBox* wrapperBox = new QVBox( this ); + Q3VBox* wrapperBox = new Q3VBox( this ); setCentralWidget( wrapperBox ); // QWidget *view = new QWidget( wrapperBox ); KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox); @@ -138,9 +144,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) fromLE = 0; toLE = 0; if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) { QWidget* infoBox = new QWidget( splithor ); - QGridLayout *griLay = new QGridLayout( infoBox, 2,2); + Q3GridLayout *griLay = new Q3GridLayout( infoBox, 2,2); if ( KOPrefs::instance()->mShowInfoSub ) { griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; } @@ -167,20 +173,20 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) //layout->addWidget( folderView ); mailView = new KListView( split ); mailView->addColumn( i18n( " " ) ); - mailView->addColumn( i18n( "Subject" ),QListView::Manual ); - mailView->addColumn( i18n( "Sender" ),QListView::Manual ); - mailView->addColumn( i18n( "Size" ),QListView::Manual); - mailView->addColumn( i18n( "Date" ),QListView::Manual); + mailView->addColumn( i18n( "Subject" ),Q3ListView::Manual ); + mailView->addColumn( i18n( "Sender" ),Q3ListView::Manual ); + mailView->addColumn( i18n( "Size" ),Q3ListView::Manual); + mailView->addColumn( i18n( "Date" ),Q3ListView::Manual); if ( KOPrefs::instance()->mShowToField ) - mailView->addColumn( i18n( "To" ),QListView::Manual); + mailView->addColumn( i18n( "To" ),Q3ListView::Manual); mailView->setAllColumnsShowFocus(true); //mailView->setSorting(-1); mailView->setRootIsDecorated( false ); statusWidget = new StatusWidget( wrapperBox ); statusWidget->hide(); - mailView->setSelectionMode( QListView::Multi ); + mailView->setSelectionMode( Q3ListView::Multi ); mailView->setMultiSelection( true); mailView->setAlternateBackground(KPimGlobalPrefs::instance()->mAlternateColor ); //layout->addWidget( mailView ); //layout->setStretchFactor( folderView, 1 ); @@ -196,27 +202,27 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); if ( toLE ) QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); #endif - connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, - SLOT( mailLeftClicked(QListViewItem*) ) ); - connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, - SLOT( mailLeftClicked(QListViewItem*) ) ); - connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, - SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); - connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), - this,SLOT(refreshMailView(const QValueList<RecMailP>&))); - - connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, - SLOT( setInfoFields(QListViewItem*) ) ); + connect( mailView, SIGNAL( doubleClicked (Q3ListViewItem* )),this, + SLOT( mailLeftClicked(Q3ListViewItem*) ) ); + connect( mailView, SIGNAL( returnPressed (Q3ListViewItem* )),this, + SLOT( mailLeftClicked(Q3ListViewItem*) ) ); + connect( mailView, SIGNAL( mouseButtonPressed(int,Q3ListViewItem*,const QPoint&,int) ),this, + SLOT( mailHold(int,Q3ListViewItem*,const QPoint&,int) ) ); + connect(folderView, SIGNAL(refreshMailview(const Q3ValueList<RecMailP>&)), + this,SLOT(refreshMailView(const Q3ValueList<RecMailP>&))); + + connect( mailView, SIGNAL( currentChanged (Q3ListViewItem* )),this, + SLOT( setInfoFields(Q3ListViewItem*) ) ); connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); //mailView->setMultiSelection ( true ); //mailView->setSelectionMode( QListView::Extended ); - QValueList<int> list; + Q3ValueList<int> list; int fw = 100; if ( QApplication::desktop()->width() > 320 ) fw = 50; list.append( fw ); @@ -234,9 +240,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) closeMail->addTo(toolBar); closeMail->addTo(mailMenu); - QPopupMenu* helpMenu = new QPopupMenu( menuBar ); + Q3PopupMenu* helpMenu = new Q3PopupMenu( menuBar ); menuBar->insertItem( i18n( "Help" ), helpMenu ); QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); li->addTo(helpMenu); @@ -258,9 +264,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) MainWindow::~MainWindow() { } -void MainWindow::setInfoFields(QListViewItem* item ) +void MainWindow::setInfoFields(Q3ListViewItem* item ) { if ( item == 0) { if ( subLE ) subLE->setText(""); if ( fromLE ) fromLE->setText(""); @@ -344,9 +350,9 @@ void MainWindow::showEtpanLicence() { KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); } -void MainWindow::appMessage(const QCString &, const QByteArray &) +void MainWindow::appMessage(const Q3CString &, const QByteArray &) { qDebug("appMessage implemented by subclass"); } @@ -404,14 +410,14 @@ void MainWindow::slotShowFolders( bool ) { qDebug("not implemented: "); } -void MainWindow::refreshMailView(const QValueList<RecMailP>&) +void MainWindow::refreshMailView(const Q3ValueList<RecMailP>&) { qDebug("not implemented: "); } -void MainWindow::mailLeftClicked(QListViewItem * ) +void MainWindow::mailLeftClicked(Q3ListViewItem * ) { qDebug("not implemented: "); } @@ -424,9 +430,9 @@ void MainWindow::slotDeleteMail() { qDebug("not implemented: "); } -void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) +void MainWindow::mailHold(int, Q3ListViewItem *,const QPoint&,int ) { qDebug("not implemented: "); } diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h index f65f3b4..1ccadc2 100644 --- a/kmicromail/mainwindow.h +++ b/kmicromail/mainwindow.h @@ -2,14 +2,18 @@ // CHANGED 2004-08-06 Lutz Rogowski #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include <qmainwindow.h> +#include <q3mainwindow.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3ValueList> +#include <Q3PopupMenu> #include <klistview.h> #include <qaction.h> #include <qlineedit.h> -#include <qtoolbar.h> +#include <q3toolbar.h> #ifdef DESKTOP_VERSION #include <qmenubar.h> #define QPEMenuBar QMenuBar #else @@ -23,48 +27,48 @@ #include <opie2/osmartpointer.h> class RecMail; -class MainWindow : public QMainWindow +class MainWindow : public Q3MainWindow { Q_OBJECT public: - MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); + MainWindow( QWidget *parent = 0, const char *name = 0, Qt::WFlags flags = 0 ); virtual ~MainWindow(); public slots: virtual void slotAdjustColumns(); virtual void slotAdjustColumnsWide(); - virtual void appMessage(const QCString &msg, const QByteArray &data); + virtual void appMessage(const Q3CString &msg, const QByteArray &data); virtual void slotComposeMail(); protected slots: - virtual void setInfoFields(QListViewItem* ); + virtual void setInfoFields(Q3ListViewItem* ); virtual void slotSendQueued(); virtual void slotEditAccounts(); virtual void slotShowFolders( bool show ); - virtual void refreshMailView(const QValueList<RecMailP>&); + virtual void refreshMailView(const Q3ValueList<RecMailP>&); virtual void displayMail(); virtual void slotGetMail() = 0; virtual void slotGetAllMail() = 0; virtual void slotDeleteMail(); virtual void slotDeleteAllMail() = 0; virtual void slotSetCodec(int); - virtual void mailHold(int, QListViewItem *,const QPoint&,int); + virtual void mailHold(int, Q3ListViewItem *,const QPoint&,int); virtual void slotAdjustLayout(); virtual void slotEditSettings(); virtual void slotEditGlobalSettings(); - virtual void mailLeftClicked( QListViewItem * ); + virtual void mailLeftClicked( Q3ListViewItem * ); void showLicence(); void showAbout(); void showEtpanLicence(); protected: - QToolBar *toolBar; + Q3ToolBar *toolBar; StatusWidget *statusWidget; QPEMenuBar *menuBar; - QPopupMenu *mailMenu, *settingsMenu, *codecMenu; + Q3PopupMenu *mailMenu, *settingsMenu, *codecMenu; QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, *editSettings, *editAccounts, *syncFolders; AccountView *folderView; KListView *mailView; diff --git a/kmicromail/nntpgroups.cpp b/kmicromail/nntpgroups.cpp index c729f79..d2213d4 100644 --- a/kmicromail/nntpgroups.cpp +++ b/kmicromail/nntpgroups.cpp @@ -1,13 +1,13 @@ #include "nntpgroups.h" #include <libmailwrapper/settings.h> -#include <qlistview.h> +#include <q3listview.h> #include <qlineedit.h> using namespace Opie::Core; -NNTPGroups::NNTPGroups(NNTPaccount *account, QWidget* parent, const char* name, WFlags fl) +NNTPGroups::NNTPGroups(NNTPaccount *account, QWidget* parent, const char* name, Qt::WFlags fl) : NNTPGroupsUI(parent,name,fl),subscribedGroups() { m_Account = account; fillGroups(); @@ -26,10 +26,10 @@ void NNTPGroups::slotGetNG() QString filter = Groupfilteredit->text(); QStringList list = tmp.listAllNewsgroups(filter); subscribedGroupsNotListed = subscribedGroups; for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - QCheckListItem *item; - item = new QCheckListItem( GroupListView, (*it), QCheckListItem::CheckBox ); + Q3CheckListItem *item; + item = new Q3CheckListItem( GroupListView, (*it), Q3CheckListItem::CheckBox ); if ( subscribedGroups.contains( (*it) ) >= 1 ) { item->setOn( true ); subscribedGroupsNotListed.remove((*it)); } @@ -40,21 +40,21 @@ void NNTPGroups::fillGroups() { if (!m_Account) return; subscribedGroups = m_Account->getGroups(); for ( QStringList::Iterator it = subscribedGroups.begin(); it != subscribedGroups.end(); ++it ) { - QCheckListItem *item; - item = new QCheckListItem( GroupListView, (*it), QCheckListItem::CheckBox ); + Q3CheckListItem *item; + item = new Q3CheckListItem( GroupListView, (*it), Q3CheckListItem::CheckBox ); item->setOn( true ); } } void NNTPGroups::storeValues() { if (!m_Account) return; - QListViewItemIterator list_it( GroupListView ); + Q3ListViewItemIterator list_it( GroupListView ); subscribedGroups.clear(); for ( ; list_it.current(); ++list_it ) { - if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { + if ( ( (Q3CheckListItem*)list_it.current() )->isOn() ) { subscribedGroups.append( list_it.current()->text(0) ); } } subscribedGroups+=subscribedGroupsNotListed; diff --git a/kmicromail/nntpgroups.h b/kmicromail/nntpgroups.h index e5b7c35..80cc329 100644 --- a/kmicromail/nntpgroups.h +++ b/kmicromail/nntpgroups.h @@ -11,9 +11,9 @@ class QStringList; class NNTPGroups:public NNTPGroupsUI { Q_OBJECT public: - NNTPGroups(NNTPaccount *account, QWidget* parent = 0, const char* name = 0, WFlags fl = 0); + NNTPGroups(NNTPaccount *account, QWidget* parent = 0, const char* name = 0, Qt::WFlags fl = 0); virtual ~NNTPGroups(); /* must be called from external. * it will store the new subscription list into the account * but don't save them, this must be done by the calling class. diff --git a/kmicromail/nntpgroupsdlg.cpp b/kmicromail/nntpgroupsdlg.cpp index f564b10..bfe1d35 100644 --- a/kmicromail/nntpgroupsdlg.cpp +++ b/kmicromail/nntpgroupsdlg.cpp @@ -4,15 +4,17 @@ #include <libmailwrapper/settings.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3VBoxLayout> NNTPGroupsDlg::NNTPGroupsDlg(NNTPaccount *account,QWidget * parent, const char * name) : QDialog(parent,name,true,0) { setCaption(i18n("Subscribed newsgroups")); m_Account = account; - QVBoxLayout*dlglayout = new QVBoxLayout(this); + Q3VBoxLayout*dlglayout = new Q3VBoxLayout(this); dlglayout->setSpacing(2); dlglayout->setMargin(1); groupsWidget = new NNTPGroups(account,this); dlglayout->addWidget(groupsWidget); diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 75a75b9..f453be5 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -3,8 +3,13 @@ #define protected public #include <qwidget.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3CString> +#include <QPixmap> +#include <Q3PopupMenu> #undef protected #include "koprefsdialog.h" #include <kapplication.h> #include <libkdepim/externalapphandler.h> @@ -26,9 +31,9 @@ #include <qmessagebox.h> #include <qtimer.h> #include <qcursor.h> -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qregexp.h> #include <qpe/global.h> #ifdef DESKTOP_VERSION @@ -62,14 +67,14 @@ OpieMail::~OpieMail() if ( tb ) delete tb; } -void OpieMail::appMessage(const QCString &msg, const QByteArray &data) +void OpieMail::appMessage(const Q3CString &msg, const QByteArray &data) { } #include <stdlib.h> -void OpieMail::message(const QCString &msg, const QByteArray &data) +void OpieMail::message(const Q3CString &msg, const QByteArray &data) { // copied from old mail2 static int ii = 0; //qDebug("QCOP CALL ############################# %d ", ii); @@ -82,9 +87,9 @@ void OpieMail::message(const QCString &msg, const QByteArray &data) mPendingName = QString::null; if (msg == "writeMail(QString,QString)") { //qDebug("writeMail(QString,QString) "); - QDataStream stream(data,IO_ReadOnly); + QDataStream stream(data,QIODevice::ReadOnly); stream >> mPendingName >> mPendingEmail; // removing the whitespaces at beginning and end is needed! QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); } @@ -99,9 +104,9 @@ void OpieMail::message(const QCString &msg, const QByteArray &data) } else if (msg == "newMail(QString)") { //qDebug(" newMail(QString)"); - QDataStream stream(data,IO_ReadOnly); + QDataStream stream(data,QIODevice::ReadOnly); stream >> mPendingName; // the format is // NAME <EMAIL>:SUBJECT QTimer::singleShot ( 50, this, SLOT(slotComposeMail() ) ); @@ -278,9 +283,9 @@ void OpieMail::slotEditAccounts() } void OpieMail::replyMail() { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item) return; RecMailP mail = ((MailListViewItem*)item)->data(); RecBodyP body = folderView->fetchBody(mail); @@ -330,9 +335,9 @@ void OpieMail::closeViewMail(ViewMail * vm) } void OpieMail::slotDownloadMail( ) { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item ) { Global::statusMessage("Error: No item slected!"); return; } @@ -371,9 +376,9 @@ void OpieMail::slotDownloadMail( ) void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item ) { closeViewMail(vm); return; } @@ -391,9 +396,9 @@ void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) vm->setMail( mail ); } void OpieMail::displayNextMail(ViewMail * vm) { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item) return; ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); item = item->itemBelow(); if (!item) { @@ -407,9 +412,9 @@ void OpieMail::displayNextMail(ViewMail * vm) vm->setMail( mail ); } void OpieMail::displayMail() { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item) return; RecMailP mail = ((MailListViewItem*)item)->data(); RecBodyP body = folderView->fetchBody(mail); ViewMail readMail( this,"", Qt::WType_Modal ); @@ -431,24 +436,24 @@ void OpieMail::displayMail() folderView->refreshCurrent(); } else { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (item) ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); } } void OpieMail::slotGetAllMail() { - QListViewItem * item = folderView->firstChild(); + Q3ListViewItem * item = folderView->firstChild(); while ( item ){ ((AccountViewItem *)item)->contextMenuSelected( 101 ); item = item->nextSibling (); } } void OpieMail::slotGetMail() { - QListViewItem * item = folderView->currentItem(); + Q3ListViewItem * item = folderView->currentItem(); if ( ! item ) return; ((AccountViewItem *)item)->contextMenuSelected( 101 ); } void OpieMail::slotDeleteMail() @@ -463,9 +468,9 @@ void OpieMail::slotDeleteMail() } void OpieMail::slotDeleteAllMail() { - QValueList<RecMailP> t; + Q3ValueList<RecMailP> t; if ( QMessageBox::warning(this, i18n("Delete All Mails"), i18n("Do you really want to delete\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); while ( item ) { @@ -491,23 +496,23 @@ void OpieMail::clearSelection() } void OpieMail::selectAll() { - QListViewItem* item = mailView->firstChild (); + Q3ListViewItem* item = mailView->firstChild (); while ( item ) { mailView->setSelected ( item, true ); item = item->nextSibling(); } } -void OpieMail::mailHold(int button, QListViewItem *item,const QPoint&,int ) +void OpieMail::mailHold(int button, Q3ListViewItem *item,const QPoint&,int ) { if (!mailView->currentItem()) return; MAILLIB::ATYPE mailtype = ((MailListViewItem*)mailView->currentItem() )->wrapperType(); /* just the RIGHT button - or hold on pda */ if (button!=2) {return;} if (!item) return; - QPopupMenu *m = new QPopupMenu(0); + Q3PopupMenu *m = new Q3PopupMenu(0); if (m) { if (mailtype==MAILLIB::A_NNTP) { m->insertItem(i18n("Read this posting"),this,SLOT(displayMail())); @@ -552,14 +557,14 @@ void OpieMail::slotShowFolders( bool show ) //slotAdjustColumnsWide(); } } -void OpieMail::refreshMailView(const QValueList<RecMailP>&list) +void OpieMail::refreshMailView(const Q3ValueList<RecMailP>&list) { MailListViewItem*item = 0; mailView->clear(); - QValueList<RecMailP>::ConstIterator it; + Q3ValueList<RecMailP>::ConstIterator it; for (it = list.begin(); it != list.end();++it) { item = new MailListViewItem(mailView,item); item->storeData((*it)); @@ -567,9 +572,9 @@ void OpieMail::refreshMailView(const QValueList<RecMailP>&list) } mailView->setSorting ( 4, false ); } -void OpieMail::mailLeftClicked( QListViewItem *item ) +void OpieMail::mailLeftClicked( Q3ListViewItem *item ) { mailView->clearSelection(); /* just LEFT button - or tap with stylus on pda */ //if (button!=1) return; @@ -613,9 +618,9 @@ void OpieMail::slotMoveCopyMail() void OpieMail::slotMoveCopyAllMail() { if (!mailView->currentItem()) return; - QValueList<RecMailP> t; + Q3ValueList<RecMailP> t; // if ( QMessageBox::warning(this, i18n("Move/Copy all selected mails"), i18n("Do you really want to copy/move\nall selected mails?" ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes ) { MailListViewItem* item = (MailListViewItem*)mailView->firstChild (); while ( item ) { diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index bdd9058..ea64dc4 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h @@ -8,8 +8,11 @@ #include <opie2/osmartpointer.h> #include <libmailwrapper/mailtypes.h> #include <viewmail.h> #include <qstringlist.h> +//Added by qt3to4: +#include <Q3CString> +#include <Q3ValueList> class ComposeMail; class OpieMail : public MainWindow @@ -25,10 +28,10 @@ public slots: virtual void slotwriteMail(const QString&name,const QString&email); virtual void slotwriteMail2(const QString&nameemail); virtual void slotComposeMail(); virtual void slotExtAppHandler(); - virtual void appMessage(const QCString &msg, const QByteArray &data); - virtual void message(const QCString &msg, const QByteArray &data); + virtual void appMessage(const Q3CString &msg, const QByteArray &data); + virtual void message(const Q3CString &msg, const QByteArray &data); void insertAttendees(const QString&, const QStringList& namelist, const QStringList& emaillist, const QStringList& uidlist); protected slots: virtual void deleteAndDisplayNextMail(ViewMail * vm); virtual void displayNextMail(ViewMail * vm); @@ -42,12 +45,12 @@ protected slots: virtual void slotDeleteMail(); virtual void slotGetMail(); virtual void slotGetAllMail(); virtual void slotDeleteAllMail(); - virtual void mailHold(int, QListViewItem *,const QPoint&,int); + virtual void mailHold(int, Q3ListViewItem *,const QPoint&,int); virtual void slotShowFolders( bool show ); - virtual void refreshMailView(const QValueList<RecMailP>&); - virtual void mailLeftClicked( QListViewItem * ); + virtual void refreshMailView(const Q3ValueList<RecMailP>&); + virtual void mailLeftClicked( Q3ListViewItem * ); virtual void slotMoveCopyMail(); virtual void slotMoveCopyAllMail(); virtual void reEditMail(); void clearSelection(); @@ -58,11 +61,11 @@ private: void closeViewMail(ViewMail * vm); QString mPendingEmail; QString mPendingName; QByteArray mPendingData; - QCString mPendingMessage; + Q3CString mPendingMessage; Settings *settings; - QTextBrowser * tb; + Q3TextBrowser * tb; }; #endif diff --git a/kmicromail/qpe/qdialog.h b/kmicromail/qpe/qdialog.h index c63133d..3720182 100644 --- a/kmicromail/qpe/qdialog.h +++ b/kmicromail/qpe/qdialog.h @@ -13,9 +13,9 @@ class QDialog_hacked : public QDialog { //Q__OBJECT public: - QDialog_hacked ( QWidget * parent=0, const char * name=0, bool modal=true, WFlags f=0 ); + QDialog_hacked ( QWidget * parent=0, const char * name=0, bool modal=true, Qt::WFlags f=0 ); }; #define QDialog QDialog_hacked diff --git a/kmicromail/qpe/qdialog_hacked.cpp b/kmicromail/qpe/qdialog_hacked.cpp index 0a34cec..5d4d353 100644 --- a/kmicromail/qpe/qdialog_hacked.cpp +++ b/kmicromail/qpe/qdialog_hacked.cpp @@ -1,20 +1,20 @@ #include <qdialog.h> -#include <qhbox.h> +#include <q3hbox.h> #include <qpushbutton.h> #include <klocale.h> #ifdef QDialog #undef QDialog #endif - QDialog_hacked::QDialog_hacked ( QWidget * parent, const char * name, bool modal, WFlags f ) + QDialog_hacked::QDialog_hacked ( QWidget * parent, const char * name, bool modal, Qt::WFlags f ) : QDialog( parent,name,modal, f) { qDebug("New hacked QDialog for ompi desktop"); //QTimer::singleShot( 1, this,SLOT(addaddbuttons()) ); setOrientation ( Vertical ); - QHBox * hb = new QHBox ( this ); + Q3HBox * hb = new Q3HBox ( this ); QPushButton *ok = new QPushButton( i18n("OK"), hb ); QPushButton *cancel = new QPushButton( i18n("Cancel"), hb ); setExtension ( hb ); showExtension ( true ); diff --git a/kmicromail/selectsmtp.cpp b/kmicromail/selectsmtp.cpp index 10b6d79..ead723c 100644 --- a/kmicromail/selectsmtp.cpp +++ b/kmicromail/selectsmtp.cpp @@ -7,11 +7,11 @@ #include <qpushbutton.h> #include <qlineedit.h> #include <qlabel.h> #include <qtabwidget.h> -#include <qlistview.h> +#include <q3listview.h> #include <klocale.h> -selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, WFlags fl) +selectsmtp::selectsmtp(QWidget* parent, const char* name, bool modal, Qt::WFlags fl) : selectstoreui(parent,name,modal,fl) { //m_smtpList.setAutoDelete(false); m_smtpList = 0; diff --git a/kmicromail/selectsmtp.h b/kmicromail/selectsmtp.h index 9157ddf..d7accf6 100644 --- a/kmicromail/selectsmtp.h +++ b/kmicromail/selectsmtp.h @@ -10,9 +10,9 @@ class SMTPaccount; class selectsmtp : public selectstoreui { Q_OBJECT public: - selectsmtp(QWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0 ); + selectsmtp(QWidget* parent = 0, const char* name = 0, bool modal = TRUE, Qt::WFlags fl = 0 ); virtual ~selectsmtp(); void setSelectionlist(QList<SMTPaccount>*list); SMTPaccount*selected_smtp(); diff --git a/kmicromail/selectstore.h b/kmicromail/selectstore.h index 447a6ae..d312c1d 100644 --- a/kmicromail/selectstore.h +++ b/kmicromail/selectstore.h @@ -1,9 +1,9 @@ #ifndef _SELECTSTORE_H #define _SELECTSTORE_H #include "selectstoreui.h" -#include <qvaluelist.h> +#include <q3valuelist.h> #include <qmap.h> #include <qstringlist.h> class AbstractMail; diff --git a/kmicromail/settingsdialog.cpp b/kmicromail/settingsdialog.cpp index c593b48..889c490 100644 --- a/kmicromail/settingsdialog.cpp +++ b/kmicromail/settingsdialog.cpp @@ -1,8 +1,10 @@ #include <qcheckbox.h> #include <qspinbox.h> #include <qlayout.h> #include <qtabwidget.h> +//Added by qt3to4: +#include <Q3GridLayout> #include <kconfig.h> #include <kprefs.h> #include <klocale.h> @@ -11,15 +13,15 @@ #include "settingsdialog.h" -SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) +SettingsDialog::SettingsDialog( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) : SettingsDialogUI( parent, name, modal, fl ) { #if 0 QTabWidget *topFrame = TabWidget2; - QGridLayout *topLayout = new QGridLayout(topFrame,3,3); + Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,3); topLayout->setSpacing(2); topLayout->setMargin(3); KPrefsWidFont * tVFont; int i = 0; diff --git a/kmicromail/settingsdialog.h b/kmicromail/settingsdialog.h index 042b69f..b168226 100644 --- a/kmicromail/settingsdialog.h +++ b/kmicromail/settingsdialog.h @@ -10,9 +10,9 @@ class SettingsDialog : public SettingsDialogUI { Q_OBJECT public: - SettingsDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + SettingsDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WFlags fl = 0 ); ~SettingsDialog(); private: void readConfig(); diff --git a/kmicromail/statuswidget.cpp b/kmicromail/statuswidget.cpp index 19cf635..6da6f54 100644 --- a/kmicromail/statuswidget.cpp +++ b/kmicromail/statuswidget.cpp @@ -1,14 +1,14 @@ #include <qtimer.h> -#include <qprogressbar.h> +#include <q3progressbar.h> #include <qlabel.h> #include "statuswidget.h" // the current problem I see is "locking": used exclusive by one sender -StatusWidget::StatusWidget( QWidget* parent, const char* name,WFlags fl ) +StatusWidget::StatusWidget( QWidget* parent, const char* name,Qt::WFlags fl ) : StatusWidgetUI( parent, name, fl ) { setMaximumHeight( 15 ); // hide for now since nothing reports decent progress data yet. diff --git a/kmicromail/statuswidget.h b/kmicromail/statuswidget.h index 73f0d75..1d29daf 100644 --- a/kmicromail/statuswidget.h +++ b/kmicromail/statuswidget.h @@ -8,9 +8,9 @@ class StatusWidget : public StatusWidgetUI { Q_OBJECT public: - StatusWidget( QWidget* parent = 0, const char* name = 0,WFlags fl = 0 ); + StatusWidget( QWidget* parent = 0, const char* name = 0,Qt::WFlags fl = 0 ); ~StatusWidget(); public slots: diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index 685b4e4..c9dedb0 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp @@ -23,42 +23,45 @@ #include <qpe/qpeapplication.h> /* QT */ -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qmessagebox.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qaction.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qfile.h> #include <qlayout.h> +//Added by qt3to4: +#include <Q3ValueList> +#include <Q3VBoxLayout> //using namespace Opie::Ui; //using namespace Opie::Core; -AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, - const QString&fsize,int num,const QValueList<int>&path) - : QListViewItem(parent,after),_partNum(num) +AttachItem::AttachItem(Q3ListView * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, + const QString&fsize,int num,const Q3ValueList<int>&path) + : Q3ListViewItem(parent,after),_partNum(num) { _path=path; setText(0, mime); setText(1, desc); setText(2, file); setText(3, fsize); } -AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, - const QString&fsize,int num,const QValueList<int>&path) - : QListViewItem(parent,after),_partNum(num) +AttachItem::AttachItem(Q3ListViewItem * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, + const QString&fsize,int num,const Q3ValueList<int>&path) + : Q3ListViewItem(parent,after),_partNum(num) { _path=path; setText(0, mime); setText(1, desc); setText(2, file); setText(3, fsize); } -bool AttachItem::isParentof(const QValueList<int>&path) +bool AttachItem::isParentof(const Q3ValueList<int>&path) { /* if not set, then no parent */ if (path.count()==0||_path.count()==0) return false; /* the parent must have one digit less then a child */ @@ -69,11 +72,11 @@ bool AttachItem::isParentof(const QValueList<int>&path) } return true; } -AttachItem* ViewMail::searchParent(const QValueList<int>&path) +AttachItem* ViewMail::searchParent(const Q3ValueList<int>&path) { - QListViewItemIterator it( attachments ); + Q3ListViewItemIterator it( attachments ); for ( ; it.current(); ++it ) { AttachItem*ati = (AttachItem*)it.current(); if (ati->isParentof(path)) return ati; @@ -153,9 +156,9 @@ void ViewMail::setBody(const RecBodyP&body ) code is it will be destructed after finishing its small job. */ QTextOStream o(&fsize); if (w>0) o.precision(2); else o.precision(0); - o.setf(QTextStream::fixed); + o.setf(Q3TextStream::fixed); o << s << " " << q << "Byte"; } curItem=new AttachItem(attachments,curItem,type,"Mailbody","",fsize,-1,body->Description()->Positionlist()); @@ -194,9 +197,9 @@ void ViewMail::setBody(const RecBodyP&body ) break; } QTextOStream o(&fsize); if (w>0) o.precision(2); else o.precision(0); - o.setf(QTextStream::fixed); + o.setf(Q3TextStream::fixed); o << s << " " << q << "Byte"; desc = body->Parts()[i]->Description(); parentItem = searchParent(body->Parts()[i]->Positionlist()); if (parentItem) @@ -238,9 +241,9 @@ void ViewMail::slotShowHtml( bool state ) m_showHtml = state; setText(); } -void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) +void ViewMail::slotItemClicked( Q3ListViewItem * item , const QPoint & point, int ) { if (!item ) return; @@ -248,9 +251,9 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int { setText(); return; } - QPopupMenu *menu = new QPopupMenu(); + Q3PopupMenu *menu = new Q3PopupMenu(); int ret=0; if ( item->text( 0 ).left( 5 ) == "text/" || item->text(0)=="message/rfc822" ) { @@ -277,9 +280,9 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); if (content) { QFile output(str); - output.open(IO_WriteOnly); + output.open(QIODevice::WriteOnly); output.writeBlock(content->Content(),content->Length()); output.close(); delete content; } @@ -296,9 +299,9 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int #endif encodedString*content = m_recMail->Wrapper()->fetchDecodedPart( m_recMail, m_body->Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); if (content) { QFile output(tmpfile); - output.open(IO_WriteOnly); + output.open(QIODevice::WriteOnly); output.writeBlock(content->Content(),content->Length()); output.close(); delete content; MailImageDlg iview(""); @@ -351,9 +354,9 @@ void ViewMail::slotNextMail() emit showNextMail(this); nextMail->blockSignals( false ); } -ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) +ViewMail::ViewMail( QWidget *parent, const char *name, Qt::WFlags fl) : ViewMailBase(parent, name, fl), _inLoop(false) { m_gotBody = false; deleted = false; @@ -368,9 +371,9 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) connect( viewSource, SIGNAL( activated() ), SLOT( slotViewSource() ) ); connect( downloadMail, SIGNAL( activated() ), SIGNAL( signalDownloadMail() ) ); attachments->setEnabled(m_gotBody); - connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); + connect( attachments, SIGNAL( clicked(Q3ListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(Q3ListViewItem*,const QPoint&, int) ) ); attachments->setSorting(-1); } @@ -556,12 +559,12 @@ void ViewMail::slotDeleteMail( ) deleted = true; } } -MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, WFlags f) +MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, Qt::WFlags f) : QDialog(parent,name,modal) { - QVBoxLayout*dlglayout = new QVBoxLayout(this); + Q3VBoxLayout*dlglayout = new Q3VBoxLayout(this); dlglayout->setSpacing(2); dlglayout->setMargin(1); //m_imageview = new Opie::MM::OImageScrollView(this); //dlglayout->addWidget(m_imageview); diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h index bb5b685..6cf6efb 100644 --- a/kmicromail/viewmail.h +++ b/kmicromail/viewmail.h @@ -6,38 +6,38 @@ #include <qdialog.h> #include <qapplication.h> -#include <qlistview.h> +#include <q3listview.h> #include <qmap.h> #include <klocale.h> #include <qstringlist.h> -#include <qvaluelist.h> +#include <q3valuelist.h> //namespace Opie { namespace MM { class OImageScrollView; } } -class AttachItem : public QListViewItem +class AttachItem : public Q3ListViewItem { public: - AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, - const QString&fsize,int num,const QValueList<int>&path); - AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, - const QString&fsize,int num,const QValueList<int>&path); + AttachItem(Q3ListView * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, + const QString&fsize,int num,const Q3ValueList<int>&path); + AttachItem(Q3ListViewItem * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, + const QString&fsize,int num,const Q3ValueList<int>&path); int Partnumber() { return _partNum; } - bool isParentof(const QValueList<int>&path); + bool isParentof(const Q3ValueList<int>&path); private: int _partNum; /* needed for a better display of attachments */ - QValueList<int> _path; + Q3ValueList<int> _path; }; class ViewMail : public ViewMailBase { Q_OBJECT public: - ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0); + ViewMail( QWidget *parent = 0, const char *name = 0, Qt::WFlags fl = 0); ~ViewMail(); void hide(); void exec(); @@ -49,17 +49,17 @@ public: void deleteAndDisplayNextMail(ViewMail *); void signalDownloadMail(); protected: QString deHtml(const QString &string); - AttachItem* searchParent(const QValueList<int>&path); + AttachItem* searchParent(const Q3ValueList<int>&path); AttachItem* lastChild(AttachItem*parent); protected slots: void slotNextMail(); void slotReply(); void slotForward(); void setText(); - void slotItemClicked( QListViewItem * item , const QPoint & point, int c ); + void slotItemClicked( Q3ListViewItem * item , const QPoint & point, int c ); void slotDeleteMail( ); void slotShowHtml( bool ); void slotViewSource(); @@ -82,9 +82,9 @@ private: class MailImageDlg:public QDialog { Q_OBJECT public: - MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, WFlags f = 0); + MailImageDlg(const QString&,QWidget *parent = 0, const char *name = 0, bool modal = true, Qt::WFlags f = 0); ~MailImageDlg(); void setName(const QString&); protected: //Opie::MM::OImageScrollView*m_imageview; diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp index 3bb964e..371ee91 100644 --- a/kmicromail/viewmailbase.cpp +++ b/kmicromail/viewmailbase.cpp @@ -1,30 +1,33 @@ // CHANGED 2004-08-06 Lutz Rogowski -#include <qtextbrowser.h> -#include <qlistview.h> +#include <q3textbrowser.h> +#include <q3listview.h> #include <qaction.h> #include <qlabel.h> -#include <qvbox.h> +#include <q3vbox.h> #include <qapplication.h> -#include <qtoolbar.h> +#include <q3toolbar.h> #include <qmenubar.h> +//Added by qt3to4: +#include <QKeyEvent> +#include <Q3PopupMenu> #include <kiconloader.h> //#include <qpe/resource.h> #include <klocale.h> #include "viewmailbase.h" //#include "opendiag.h" -ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) - : QMainWindow(parent, name, fl) +ViewMailBase::ViewMailBase(QWidget *parent, const char *name, Qt::WFlags fl) + : Q3MainWindow(parent, name, fl) { setToolBarsMovable(false); - toolbar = new QToolBar(this); + toolbar = new Q3ToolBar(this); menubar = new QMenuBar( toolbar ); - mailmenu = new QPopupMenu( menubar ); + mailmenu = new Q3PopupMenu( menubar ); menubar->insertItem( i18n( "Mail" ), mailmenu ); toolbar->setHorizontalStretchable(true); addToolBar(toolbar); @@ -68,12 +71,12 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) spacer->setBackgroundMode(QWidget::PaletteButton); toolbar->setStretchableWidget(spacer); closeMail->addTo(toolbar); closeMail->addTo(mailmenu); - QVBox *view = new QVBox(this); + Q3VBox *view = new Q3VBox(this); setCentralWidget(view); - attachments = new QListView(view); + attachments = new Q3ListView(view); int fixh = 100; if ( QApplication::desktop()->width() > 320 ) fixh = 200; attachments->setFixedHeight(fixh); @@ -84,9 +87,9 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) attachments->addColumn(i18n("Size"), 80); attachments->setSorting(-1); attachments->hide(); - browser = new QTextBrowser(view); + browser = new Q3TextBrowser(view); // openDiag = new OpenDiag(view); // openDiag->hide(); diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h index 7c075eb..3f1dead 100644 --- a/kmicromail/viewmailbase.h +++ b/kmicromail/viewmailbase.h @@ -1,38 +1,41 @@ // CHANGED 2004-08-06 Lutz Rogowski #ifndef VIEWMAILBASE_H #define VIEWMAILBASE_H -#include <qmainwindow.h> +#include <q3mainwindow.h> +//Added by qt3to4: +#include <Q3PopupMenu> +#include <QKeyEvent> #ifndef DESKTOP_VERSION #include <qpe/qpemenubar.h> #define QMenuBar QPEMenuBar #endif class QAction; class OpenDiag; -class QListView; -class QToolBar; -class QTextBrowser; +class Q3ListView; +class Q3ToolBar; +class Q3TextBrowser; class QMenuBar; -class QPopupMenu; +class Q3PopupMenu; -class ViewMailBase : public QMainWindow +class ViewMailBase : public Q3MainWindow { Q_OBJECT public: - ViewMailBase(QWidget *parent = 0, const char *name = 0, WFlags fl = 0); + ViewMailBase(QWidget *parent = 0, const char *name = 0, Qt::WFlags fl = 0); protected: QAction *reply, *forward, *attachbutton, *deleteMail, *showHtml, *closeMail, *nextMail, *downloadMail, *viewSource; - QListView *attachments; - QToolBar *toolbar; - QTextBrowser *browser; + Q3ListView *attachments; + Q3ToolBar *toolbar; + Q3TextBrowser *browser; OpenDiag *openDiag; QMenuBar *menubar; - QPopupMenu *mailmenu; + Q3PopupMenu *mailmenu; protected slots: void slotChangeAttachview(bool state); virtual void keyPressEvent ( QKeyEvent * e ); |