From a08aff328d4393031d5ba7d622c2b05705a89d73 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 04 Jul 2007 11:23:42 +0000 Subject: initial public commit of qt4 port --- (limited to 'kmicromail') diff --git a/kmicromail/accountitem.cpp b/kmicromail/accountitem.cpp index 985a762..9b1ea2f 100644 --- a/kmicromail/accountitem.cpp +++ b/kmicromail/accountitem.cpp @@ -12,8 +12,10 @@ //#include /* QT */ -#include +#include #include +//Added by qt3to4: +#include #include #include @@ -54,7 +56,7 @@ AbstractMail *POP3viewItem::getWrapper() return wrapper; } -void POP3viewItem::refresh(QValueList > & ) +void POP3viewItem::refresh(Q3ValueList > & ) { refresh(); } @@ -62,16 +64,16 @@ void POP3viewItem::refresh(QValueList > & ) void POP3viewItem::refresh() { if (account->getOffline()) return; - QValueList *folders = wrapper->listFolders(); - QListViewItem *child = firstChild(); + Q3ValueList *folders = wrapper->listFolders(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); delete tmp; } - QValueList::ConstIterator it; - QListViewItem*item = 0; + Q3ValueList::ConstIterator it; + Q3ListViewItem*item = 0; for ( it = folders->begin(); it!=folders->end(); ++it) { item = new POP3folderItem( (*it), this , item ); @@ -86,9 +88,9 @@ 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()) @@ -108,10 +110,10 @@ 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; } @@ -157,7 +159,7 @@ 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; @@ -172,7 +174,7 @@ POP3folderItem::POP3folderItem( const FolderP&folderInit, POP3viewItem *parent , setText( 0, folder->getDisplayName() ); } -void POP3folderItem::refresh(QValueList&target) +void POP3folderItem::refresh(Q3ValueList&target) { if (folder->may_select()) pop3->getWrapper()->listMessages( folder->getName(),target ); @@ -183,9 +185,9 @@ 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); @@ -261,7 +263,7 @@ AbstractMail *NNTPviewItem::getWrapper() return wrapper; } -void NNTPviewItem::refresh( QValueList & ) +void NNTPviewItem::refresh( Q3ValueList & ) { refresh(); } @@ -269,17 +271,17 @@ void NNTPviewItem::refresh( QValueList & ) void NNTPviewItem::refresh() { if (account->getOffline()) return; - QValueList *folders = wrapper->listFolders(); + Q3ValueList *folders = wrapper->listFolders(); - QListViewItem *child = firstChild(); + Q3ListViewItem *child = firstChild(); while ( child ) { - QListViewItem *tmp = child; + Q3ListViewItem *tmp = child; child = child->nextSibling(); delete tmp; } - QValueList::ConstIterator it; - QListViewItem*item = 0; + Q3ValueList::ConstIterator it; + Q3ListViewItem*item = 0; for ( it = folders->begin(); it!=folders->end(); ++it) { item = new NNTPfolderItem( (*it), this , item ); @@ -294,9 +296,9 @@ 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()) @@ -326,10 +328,10 @@ 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; } @@ -368,7 +370,7 @@ 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; @@ -383,7 +385,7 @@ NNTPfolderItem::NNTPfolderItem( const FolderP &folderInit, NNTPviewItem *parent setText( 0, folder->getDisplayName() ); } -void NNTPfolderItem::refresh(QValueList&target) +void NNTPfolderItem::refresh(Q3ValueList&target) { if (folder->may_select()) nntp->getWrapper()->listMessages( folder->getName(),target ); @@ -394,9 +396,9 @@ 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); @@ -453,7 +455,7 @@ AbstractMail *IMAPviewItem::getWrapper() return wrapper; } -void IMAPviewItem::refresh(QValueList&) +void IMAPviewItem::refresh(Q3ValueList&) { refreshFolders(false); } @@ -470,11 +472,11 @@ void IMAPviewItem::refreshFolders(bool force) removeChilds(); currentFolders.clear(); - QValueList * folders = wrapper->listFolders(); + Q3ValueList * folders = wrapper->listFolders(); - QValueList::Iterator it; - QListViewItem*item = 0; - QListViewItem*titem = 0; + Q3ValueList::Iterator it; + Q3ListViewItem*item = 0; + Q3ListViewItem*titem = 0; QString fname,del,search; int pos; @@ -513,9 +515,9 @@ 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()) @@ -615,7 +617,7 @@ 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; @@ -630,7 +632,7 @@ 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; @@ -653,7 +655,7 @@ const QString& IMAPfolderItem::Delemiter()const return folder->Separator(); } -void IMAPfolderItem::refresh(QValueList&target) +void IMAPfolderItem::refresh(Q3ValueList&target) { if (folder->may_select()) { @@ -670,9 +672,9 @@ 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()) @@ -721,7 +723,7 @@ void IMAPfolderItem::deleteFolder() { 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!!*/ @@ -800,7 +802,7 @@ AbstractMail *MHviewItem::getWrapper() return wrapper; } -void MHviewItem::refresh( QValueList & target) +void MHviewItem::refresh( Q3ValueList & target) { refresh(false); getWrapper()->listMessages( "",target ); @@ -811,8 +813,8 @@ void MHviewItem::refresh(bool force) if (childCount()>0 && force==false) return; removeChilds(); currentFolders.clear(); - QValueList *folders = wrapper->listFolders(); - QValueList::ConstIterator it; + Q3ValueList *folders = wrapper->listFolders(); + Q3ValueList::ConstIterator it; MHfolderItem*item = 0; MHfolderItem*pmaster = 0; QString fname = ""; @@ -857,9 +859,9 @@ 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); @@ -920,14 +922,14 @@ 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; @@ -967,7 +969,7 @@ const FolderP&MHfolderItem::getFolder()const return folder; } -void MHfolderItem::refresh(QValueList&target) +void MHfolderItem::refresh(Q3ValueList&target) { if (folder->may_select()) mbox->getWrapper()->listMessages( folder->getName(),target ); @@ -989,7 +991,7 @@ void MHfolderItem::deleteFolder() { 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!!*/ @@ -1002,9 +1004,9 @@ 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); @@ -1031,7 +1033,7 @@ 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!!*/ @@ -1078,26 +1080,26 @@ 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&folderInit,QListViewItem *parent , QListViewItem*after ) - :QListViewItem( parent,after ),folder(folderInit) +AccountViewItem::AccountViewItem( const Opie::Core::OSmartPointer&folderInit,Q3ListViewItem *parent , Q3ListViewItem*after ) + :Q3ListViewItem( parent,after ),folder(folderInit) { init(); } @@ -1140,10 +1142,10 @@ 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 @@ -2,15 +2,18 @@ #define __ACCOUNT_ITEM -#include +#include #include +//Added by qt3to4: +#include +#include #include #include class POP3wrapper; class RecMail; class RecBody; -class QPopupMenu; +class Q3PopupMenu; class Selectstore; class AccountView; class POP3account; @@ -21,19 +24,19 @@ class Folder; #define RECBODYP Opie::Core::OSmartPointer -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&folderInit,QListViewItem *parent , QListViewItem*after ); + AccountViewItem( Q3ListViewItem *parent); + AccountViewItem( Q3ListViewItem *parent , Q3ListViewItem*after ); + AccountViewItem( const Opie::Core::OSmartPointer&folderInit,Q3ListViewItem *parent , Q3ListViewItem*after ); virtual ~AccountViewItem(); - virtual void refresh(QValueList >&)=0; + virtual void refresh(Q3ValueList >&)=0; virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer&)=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; @@ -56,10 +59,10 @@ class POP3viewItem : public AccountViewItem public: POP3viewItem( POP3account *a, AccountView *parent ); virtual ~POP3viewItem(); - virtual void refresh(QValueList >&target ); + virtual void refresh(Q3ValueList >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: @@ -74,11 +77,11 @@ class POP3folderItem : public AccountViewItem { public: - POP3folderItem( const Opie::Core::OSmartPointer&folder, POP3viewItem *parent , QListViewItem*after ); + POP3folderItem( const Opie::Core::OSmartPointer&folder, POP3viewItem *parent , Q3ListViewItem*after ); virtual ~POP3folderItem(); - virtual void refresh(QValueList >&); + virtual void refresh(Q3ValueList >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: @@ -93,10 +96,10 @@ class NNTPviewItem : public AccountViewItem public: NNTPviewItem( NNTPaccount *a, AccountView *parent ); virtual ~NNTPviewItem(); - virtual void refresh(QValueList >&target ); + virtual void refresh(Q3ValueList >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: @@ -112,11 +115,11 @@ class NNTPfolderItem : public AccountViewItem { public: - NNTPfolderItem(const Opie::Core::OSmartPointer&folder, NNTPviewItem *parent , QListViewItem*after ); + NNTPfolderItem(const Opie::Core::OSmartPointer&folder, NNTPviewItem *parent , Q3ListViewItem*after ); virtual ~NNTPfolderItem(); - virtual void refresh(QValueList >&); + virtual void refresh(Q3ValueList >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); protected: @@ -132,10 +135,10 @@ class IMAPviewItem : public AccountViewItem public: IMAPviewItem( IMAPaccount *a, AccountView *parent ); virtual ~IMAPviewItem(); - virtual void refresh(QValueList >&); + virtual void refresh(Q3ValueList >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer&); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); const QStringList&subFolders(); virtual void refreshFolders(bool force=false); @@ -152,12 +155,12 @@ class IMAPfolderItem : public AccountViewItem { public: - IMAPfolderItem( const Opie::Core::OSmartPointer&folder, IMAPviewItem *parent , QListViewItem*after ); - IMAPfolderItem( const Opie::Core::OSmartPointer&folder, IMAPfolderItem *parent , QListViewItem*after, IMAPviewItem *master ); + IMAPfolderItem( const Opie::Core::OSmartPointer&folder, IMAPviewItem *parent , Q3ListViewItem*after ); + IMAPfolderItem( const Opie::Core::OSmartPointer&folder, IMAPfolderItem *parent , Q3ListViewItem*after, IMAPviewItem *master ); virtual ~IMAPfolderItem(); - virtual void refresh(QValueList >&); + virtual void refresh(Q3ValueList >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); virtual const QString& Delemiter()const; protected: @@ -174,10 +177,10 @@ class MHviewItem : public AccountViewItem public: MHviewItem( const QString&aMboxPath, AccountView *parent ); virtual ~MHviewItem(); - virtual void refresh(QValueList >&target ); + virtual void refresh(Q3ValueList >&target ); virtual RECBODYP fetchBody( const Opie::Core::OSmartPointer &mail ); AbstractMail *getWrapper(); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); QStringList subFolders(); virtual void refresh(bool force=false); @@ -194,12 +197,12 @@ class MHfolderItem : public AccountViewItem { public: - MHfolderItem( const Opie::Core::OSmartPointer&folder, MHviewItem *parent , QListViewItem*after ); - MHfolderItem( const Opie::Core::OSmartPointer&folder, MHfolderItem *parent, QListViewItem*after, MHviewItem*master); + MHfolderItem( const Opie::Core::OSmartPointer&folder, MHviewItem *parent , Q3ListViewItem*after ); + MHfolderItem( const Opie::Core::OSmartPointer&folder, MHfolderItem *parent, Q3ListViewItem*after, MHviewItem*master); virtual ~MHfolderItem(); - virtual void refresh(QValueList >&); + virtual void refresh(Q3ValueList >&); virtual RECBODYP fetchBody(const Opie::Core::OSmartPointer&); - virtual QPopupMenu * getContextMenu(); + virtual Q3PopupMenu * getContextMenu(); virtual void contextMenuSelected(int); virtual const Opie::Core::OSmartPointer&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 @@ -13,25 +13,27 @@ /* QT */ #include -#include +#include #include #include #include +//Added by qt3to4: +#include #include #include 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); } @@ -48,12 +50,12 @@ void AccountView::slotContextMenu(int id) 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(item); - QPopupMenu*m = view->getContextMenu(); + Q3PopupMenu*m = view->getContextMenu(); if (!m) return; connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); m->setFocus(); @@ -93,7 +95,7 @@ void AccountView::populate( QList list ) } } -void AccountView::refresh(QListViewItem *item) +void AccountView::refresh(Q3ListViewItem *item) { if ( item ) { @@ -145,7 +147,7 @@ void AccountView::refreshOutgoing() void AccountView::refreshCurrentSelected() { if ( !m_currentItem ) return; - QValueList headerlist; + Q3ValueList headerlist; AccountViewItem *view = static_cast(m_currentItem); view->refresh(headerlist); emit refreshMailview(headerlist); @@ -166,7 +168,7 @@ void AccountView::refreshAll() RecBodyP AccountView::fetchBody(const RecMailP&aMail) { - QListViewItem*item = selectedItem (); + Q3ListViewItem*item = selectedItem (); if (!item) return new RecBody(); AccountViewItem *view = static_cast(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,8 +1,10 @@ #ifndef ACCOUNTVIEW_H #define ACCOUNTVIEW_H -#include +#include #include +//Added by qt3to4: +#include #include #include @@ -13,36 +15,36 @@ 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 list ); virtual RecBodyP fetchBody(const Opie::Core::OSmartPointer&aMail); virtual void downloadMails(const Opie::Core::OSmartPointer&fromFolder,AbstractMail*fromWrapper); virtual void downloadMailsInbox(const Opie::Core::OSmartPointer&fromFolder,AbstractMail*fromWrapper); virtual bool currentisDraft(); - QValueList allAccounts() { return mhAccounts;} + Q3ValueList 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& ); + void refreshMailview(const Q3ValueList& ); protected: - QListViewItem* m_currentItem; - QValueList imapAccounts; - QValueList mhAccounts; + Q3ListViewItem* m_currentItem; + Q3ValueList imapAccounts; + Q3ValueList mhAccounts; }; #endif diff --git a/kmicromail/composemail.cpp b/kmicromail/composemail.cpp index 4bc4441..81d7b52 100644 --- a/kmicromail/composemail.cpp +++ b/kmicromail/composemail.cpp @@ -38,14 +38,14 @@ #include #include -#include +#include #include #include #include -#include +#include #include #include -#include +#include //using namespace Opie::Core; //using namespace Opie::Ui; @@ -125,7 +125,7 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo connect( SaveButton, SIGNAL( clicked() ), SLOT( saveAsDraft()) ); mMail = 0; warnAttach = true; - QIconSet icon; + QIcon icon; //icon = SmallIcon("fileexport"); icon = SmallIcon("filesave"); SaveButton->setIconSet (icon ) ; @@ -141,7 +141,7 @@ ComposeMail::ComposeMail( Settings *sett, QWidget *parent, const char *name, boo 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 { @@ -534,8 +534,8 @@ void ComposeMail::reEditMail(const RecMailP¤t) 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() ) diff --git a/kmicromail/composemail.h b/kmicromail/composemail.h index 966ac3e..9aef4e1 100644 --- a/kmicromail/composemail.h +++ b/kmicromail/composemail.h @@ -2,7 +2,7 @@ #define COMPOSEMAIL_H #include -#include +#include #include "composemailui.h" //#include "addresspickerui.h" @@ -80,10 +80,10 @@ protected: 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: diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index 2c0f2d8..f274dc3 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -25,8 +25,8 @@ 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() ); @@ -51,7 +51,7 @@ 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; @@ -308,7 +308,7 @@ 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; @@ -325,7 +325,7 @@ 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; @@ -408,7 +408,7 @@ 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; @@ -489,7 +489,7 @@ 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; @@ -498,7 +498,7 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); // fillValues(); - QIconSet icon; + QIcon icon; //icon = SmallIcon("fileexport"); icon = SmallIcon("fileopen"); SignaturButton->setText(""); @@ -572,7 +572,7 @@ 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; @@ -593,8 +593,8 @@ void NNTPconfig::slotShowSub() 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())); @@ -606,9 +606,9 @@ void NNTPconfig::slotShowFilter() 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 ); @@ -629,8 +629,8 @@ 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 ); @@ -663,8 +663,8 @@ void NNTPconfig::fillValues() 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 ); } } @@ -679,11 +679,11 @@ void NNTPconfig::save() 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 { diff --git a/kmicromail/editaccounts.h b/kmicromail/editaccounts.h index 465780c..3d01d23 100644 --- a/kmicromail/editaccounts.h +++ b/kmicromail/editaccounts.h @@ -2,7 +2,7 @@ #define EDITACCOUNTS_H #include -#include +#include #include "editaccountsui.h" #include "selectmailtypeui.h" @@ -15,11 +15,11 @@ #include -class AccountListItem : public QListViewItem +class AccountListItem : public Q3ListViewItem { public: - AccountListItem( QListView *parent, Account *a); + AccountListItem( Q3ListView *parent, Account *a); Account *getAccount() { return account; } private: @@ -32,7 +32,7 @@ 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 ); @@ -60,7 +60,7 @@ 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 ); @@ -75,7 +75,7 @@ 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(); @@ -94,7 +94,7 @@ 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(); @@ -113,7 +113,7 @@ 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(); @@ -133,7 +133,7 @@ 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 @@ -41,7 +41,8 @@ SOURCES = main.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 \ @@ -56,7 +57,7 @@ INTERFACES = editaccountsui.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 @@ -76,3 +77,8 @@ 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 @@ -55,7 +55,7 @@ INTERFACES = editaccountsui.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 diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp index e4b61dc..e2eed9a 100644 --- a/kmicromail/koprefs.cpp +++ b/kmicromail/koprefs.cpp @@ -26,7 +26,7 @@ #include #endif #include -#include +#include #include #include #include diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 017f1f7..e3102a4 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp @@ -23,24 +23,29 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include -#include +#include #include -#include -#include +#include +#include #include #include #include #include #include #include -#include +#include #include +//Added by qt3to4: +#include +#include +#include +#include #include #include @@ -111,9 +116,9 @@ 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()); @@ -136,9 +141,9 @@ 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()); @@ -182,10 +187,10 @@ 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; @@ -238,8 +243,8 @@ 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; @@ -292,8 +297,8 @@ 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; @@ -331,7 +336,7 @@ void KOPrefsDialog::setupLocaleTab() } 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); @@ -361,9 +366,9 @@ 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; @@ -403,8 +408,8 @@ 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); @@ -451,10 +456,10 @@ 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()); @@ -475,11 +480,11 @@ void KOPrefsDialog::setupMainTab() 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); @@ -491,7 +496,7 @@ void KOPrefsDialog::setupMainTab() &(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); @@ -499,13 +504,13 @@ void KOPrefsDialog::setupMainTab() - 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:"); @@ -529,7 +534,7 @@ 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); @@ -620,14 +625,14 @@ 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); @@ -658,22 +663,22 @@ void KOPrefsDialog::setupTimeTab() 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); @@ -693,10 +698,10 @@ 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()); @@ -785,7 +790,7 @@ 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; @@ -838,12 +843,12 @@ 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); @@ -865,7 +870,7 @@ void KOPrefsDialog::setupViewsTab() 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); @@ -933,7 +938,7 @@ 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; @@ -965,7 +970,7 @@ void KOPrefsDialog::setupViewsTab() 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); @@ -973,7 +978,7 @@ void KOPrefsDialog::setupViewsTab() // 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); @@ -997,7 +1002,7 @@ 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; @@ -1010,28 +1015,28 @@ void KOPrefsDialog::setupViewsTab() 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); @@ -1042,7 +1047,7 @@ void KOPrefsDialog::setupViewsTab() - QHBox* hbo = new QHBox ( topFrame ); + Q3HBox* hbo = new Q3HBox ( topFrame ); mDefaultAlarmFile = new QLineEdit(hbo); QPushButton * loadTemplate = new QPushButton(hbo); QPixmap icon; @@ -1082,10 +1087,10 @@ 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; @@ -1152,7 +1157,7 @@ void KOPrefsDialog::setupFontsTab() 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); @@ -1220,10 +1225,10 @@ 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()); @@ -1231,9 +1236,9 @@ void KOPrefsDialog::setupColorsTab() 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); @@ -1326,7 +1331,7 @@ 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()); @@ -1336,10 +1341,10 @@ 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()); @@ -1362,7 +1367,7 @@ 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); @@ -1380,17 +1385,17 @@ void KOPrefsDialog::setupGroupSchedulingTab() 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()); @@ -1543,7 +1548,7 @@ void KOPrefsDialog::usrWriteConfig() //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value(); - QDictIterator it(mCategoryDict); + Q3DictIterator it(mCategoryDict); while (it.current()) { KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); ++it; @@ -1683,14 +1688,14 @@ 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 ); diff --git a/kmicromail/koprefsdialog.h b/kmicromail/koprefsdialog.h index 7fa9261..042af3f 100644 --- a/kmicromail/koprefsdialog.h +++ b/kmicromail/koprefsdialog.h @@ -23,10 +23,12 @@ #ifndef _KOPREFSDIALOG_H #define _KOPREFSDIALOG_H -#include -#include +#include +#include #include -#include +#include +//Added by qt3to4: +#include #include @@ -119,7 +121,7 @@ protected: KPrefsWidBool *mEnableGroupScheduling; KPrefsWidBool *mEnableProjectView; - QFrame *mPrinterTab; + Q3Frame *mPrinterTab; QLineEdit *nameEdit; QLineEdit *emailEdit; @@ -146,7 +148,7 @@ protected: QComboBox *mCategoryCombo; KColorButton *mCategoryButton; - QDict mCategoryDict; + Q3Dict mCategoryDict; QSlider *mHourSizeSlider; 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 @@ -3,7 +3,7 @@ ###################################################################### TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan OBJECTS_DIR = obj MOC_DIR = moc 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 @@ -3,7 +3,7 @@ ###################################################################### TEMPLATE = lib -TARGET = microlibetpan +TARGET = xmicrolibetpan OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) diff --git a/kmicromail/libmailwrapper/abstractmail.cpp b/kmicromail/libmailwrapper/abstractmail.cpp index 870985e..746d2ae 100644 --- a/kmicromail/libmailwrapper/abstractmail.cpp +++ b/kmicromail/libmailwrapper/abstractmail.cpp @@ -8,13 +8,15 @@ #include -#include +#include #include #include +//Added by qt3to4: +#include #include #include #include -#include +#include #include #include #include @@ -111,10 +113,10 @@ QString AbstractMail::convert_String(const char*text) 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() + "}"; } @@ -138,16 +140,16 @@ QString AbstractMail::draftFolder() } /* temporary - will be removed when implemented in all classes */ -void AbstractMail::deleteMails(const QString &,const QValueList > &) +void AbstractMail::deleteMails(const QString &,const Q3ValueList > &) { } -void AbstractMail::deleteMailList(const QValueList&target) +void AbstractMail::deleteMailList(const Q3ValueList&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 ) { @@ -177,7 +179,7 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe i18n("Error while creating new folder\n%1\n\nCancelling action.").arg(lfName)); return; } - QValueList t; + Q3ValueList t; listMessages(fromFolder->getName(),t,acc->getMaxMailSize() ); if ( t.count() == 0 ) { qDebug("There are no new messages %s", fromFolder->getName().latin1()); @@ -187,10 +189,10 @@ 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 e; + Q3ValueList e; targetMail->listMessages(lfName,e,acc->getMaxMailSize() ); //qDebug("target has mails %d ", e.count()); - QValueList n; + Q3ValueList n; int iii = 0; int count = t.count(); while (iii < count ) { @@ -221,7 +223,7 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe Global::statusMessage(i18n("Downloaded %1 messages").arg(n.count())); #if 0 - QValueList t; + Q3ValueList t; listMessages(fromFolder->getName(),t, maxSizeInKb); mvcpMailList( t,targetFolder,targetWrapper,moveit); #endif @@ -230,12 +232,12 @@ void AbstractMail::downloadNewMails(const FolderP&fromFolder, AbstractMail*targe void AbstractMail::mvcpAllMails(const FolderP&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int maxSizeInKb) { - QValueList t; + Q3ValueList t; listMessages(fromFolder->getName(),t, maxSizeInKb); mvcpMailList( t,targetFolder,targetWrapper,moveit); } -void AbstractMail::mvcpMailList(const QValueList& t, +void AbstractMail::mvcpMailList(const Q3ValueList& t, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit) { encodedString*st = 0; @@ -246,7 +248,7 @@ void AbstractMail::mvcpMailList(const QValueList& t, // 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 ) { diff --git a/kmicromail/libmailwrapper/abstractmail.h b/kmicromail/libmailwrapper/abstractmail.h index 2069ca1..f606b1f 100644 --- a/kmicromail/libmailwrapper/abstractmail.h +++ b/kmicromail/libmailwrapper/abstractmail.h @@ -7,6 +7,8 @@ #include "settings.h" #include +//Added by qt3to4: +#include #include #include "mailtypes.h" @@ -25,8 +27,8 @@ class AbstractMail:public QObject public: AbstractMail(){}; virtual ~AbstractMail(){} - virtual QValueList >* listFolders()=0; - virtual void listMessages(const QString & mailbox,QValueList&target, int sizeInKb = 0 )=0; + virtual Q3ValueList >* listFolders()=0; + virtual void listMessages(const QString & mailbox,Q3ValueList&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; @@ -35,16 +37,16 @@ public: virtual encodedString* fetchRawBody(const RecMailP&mail)=0; virtual void deleteMail(const RecMailP&mail)=0; - virtual void deleteMailList(const QValueList&target); + virtual void deleteMailList(const Q3ValueList&target); virtual void answeredMail(const RecMailP&mail)=0; virtual int deleteAllMail(const Opie::Core::OSmartPointer&)=0; - virtual void deleteMails(const QString & FolderName,const QValueList >&target); + virtual void deleteMails(const QString & FolderName,const Q3ValueList >&target); virtual int deleteMbox(const Opie::Core::OSmartPointer&)=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&fromFolder, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit, int sizeInKb = 0); - virtual void mvcpMailList(const QValueList& t, + virtual void mvcpMailList(const Q3ValueList& t, const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); virtual void mvcpMail(const RecMailP&mail,const QString&targetFolder,AbstractMail*targetWrapper,bool moveit); diff --git a/kmicromail/libmailwrapper/generatemail.cpp b/kmicromail/libmailwrapper/generatemail.cpp index 2d213fe..ddad21b 100644 --- a/kmicromail/libmailwrapper/generatemail.cpp +++ b/kmicromail/libmailwrapper/generatemail.cpp @@ -7,6 +7,8 @@ #include #include +//Added by qt3to4: +#include using namespace Opie::Core; const char* Generatemail::USER_AGENT="KOpieMail 33 1/3"; @@ -228,7 +230,7 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) { 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() ) ); @@ -252,7 +254,7 @@ mailmime *Generatemail::buildTxtPart(const QString&str ) { 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 ) diff --git a/kmicromail/libmailwrapper/genericwrapper.cpp b/kmicromail/libmailwrapper/genericwrapper.cpp index 0b6adf7..633ab42 100644 --- a/kmicromail/libmailwrapper/genericwrapper.cpp +++ b/kmicromail/libmailwrapper/genericwrapper.cpp @@ -6,6 +6,8 @@ #include #include #include +//Added by qt3to4: +#include using namespace Opie::Core; @@ -182,7 +184,7 @@ QString Genericwrapper::getencoding(mailmime_mechanism*aEnc) return enc; } -void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueListrecList,unsigned int current_rec,int current_count) +void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,Q3ValueListrecList,unsigned int current_rec,int current_count) { if (current_rec >= 10) { ; // odebug << "too deep recursion!" << oendl; @@ -200,7 +202,7 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m switch (mime->mm_type) { case MAILMIME_SINGLE: { - QValueListcountlist = recList; + Q3ValueListcountlist = recList; countlist.append(current_count); r = mailmessage_fetch_section(message,mime,&data,&len); part->setSize(len); @@ -250,7 +252,7 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m { unsigned int ccount = 1; mailmime*cbody=0; - QValueListcountlist = recList; + Q3ValueListcountlist = 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) { @@ -270,7 +272,7 @@ void Genericwrapper::traverseBody(RecBodyP&target,mailmessage*message,mailmime*m break; case MAILMIME_MESSAGE: { - QValueListcountlist = recList; + Q3ValueListcountlist = recList; countlist.append(current_count); /* the own header is always at recursion 0 - we don't need that */ if (current_rec > 0) { @@ -302,7 +304,7 @@ RecBodyP Genericwrapper::parseMail( mailmessage * msg ) RecBodyP body = new RecBody(); //memset(&fields, 0, sizeof(struct mailmime_single_fields)); err = mailmessage_get_bodystructure(msg,&mime); - QValueListrecList; + Q3ValueListrecList; traverseBody(body,msg,mime,recList); return body; } @@ -447,7 +449,7 @@ QStringList Genericwrapper::parseInreplies(mailimf_in_reply_to * in_replies) return res; } -void Genericwrapper::parseList(QValueList > &target,mailsession*session,const QString&mailbox,bool mbox_as_to, int maxSizeInKb) +void Genericwrapper::parseList(Q3ValueList > &target,mailsession*session,const QString&mailbox,bool mbox_as_to, int maxSizeInKb) { int r; mailmessage_list * env_list = 0; diff --git a/kmicromail/libmailwrapper/genericwrapper.h b/kmicromail/libmailwrapper/genericwrapper.h index c35a6da..a50161d 100644 --- a/kmicromail/libmailwrapper/genericwrapper.h +++ b/kmicromail/libmailwrapper/genericwrapper.h @@ -5,6 +5,8 @@ #include "abstractmail.h" #include #include +//Added by qt3to4: +#include #include class RecMail; @@ -51,11 +53,11 @@ protected: QString parseGroup( mailimf_group *group ); QString parseAddressList( mailimf_address_list *list ); - void traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,QValueListrecList,unsigned int current_rek=0,int current_count=1); + void traverseBody(RecBodyP&target,mailmessage*message,mailmime*mime,Q3ValueListrecList,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 > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false, int maxSizeInKb = 0); + virtual void parseList(Q3ValueList > &target,mailsession*session,const QString&mailbox,bool mbox_as_to=false, int maxSizeInKb = 0); QStringList parseInreplies(mailimf_in_reply_to * in_replies); QString msgTempName; diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp index 4f0c849..f73f4cc 100644 --- a/kmicromail/libmailwrapper/imapwrapper.cpp +++ b/kmicromail/libmailwrapper/imapwrapper.cpp @@ -3,10 +3,12 @@ #include #include #include +//Added by qt3to4: +#include #include "imapwrapper.h" #include "mailtypes.h" #include "logindialog.h" -#include +#include #include "genericwrapper.h" #include @@ -239,7 +241,7 @@ void IMAPwrapper::logout() m_Lastmbox = ""; } -void IMAPwrapper::listMessages(const QString&mailbox,QValueList > &target , int maxSizeInKb) +void IMAPwrapper::listMessages(const QString&mailbox,Q3ValueList > &target , int maxSizeInKb) { int tryAgain = 1; @@ -320,7 +322,7 @@ void IMAPwrapper::listMessages(const QString&mailbox,QValueList >* IMAPwrapper::listFolders() +Q3ValueList >* IMAPwrapper::listFolders() { const char *path, *mask; int err = MAILIMAP_NO_ERROR; @@ -329,7 +331,7 @@ QValueList >* IMAPwrapper::listFolders() clistcell*cur_flag = 0; mailimap_mbx_list_flags*bflags = 0; - QValueList* folders = new QValueList(); + Q3ValueList* folders = new Q3ValueList(); login(); if (!m_imap) { return folders; @@ -613,7 +615,7 @@ RecBodyP IMAPwrapper::fetchBody(const RecMailP&mail) 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 path; + Q3ValueList path; body_desc = item->att_data.att_static->att_data.att_body; traverseBody(mail,body_desc,body,0,path); } else { @@ -664,7 +666,7 @@ QStringList IMAPwrapper::address_list_to_stringlist(clist*list) return l; } -encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueList&path,bool internal_call) +encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const Q3ValueList&path,bool internal_call) { encodedString*res=new encodedString; int err; @@ -738,7 +740,7 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMailP&mail,const QValueListrecList,int current_count) + int current_recursion,Q3ValueListrecList,int current_count) { if (!body || current_recursion>=10) { return; @@ -746,7 +748,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t switch (body->bd_type) { case MAILIMAP_BODY_1PART: { - QValueListcountlist = recList; + Q3ValueListcountlist = recList; countlist.append(current_count); RecPartP currentPart = new RecPart(); mailimap_body_type_1part*part1 = body->bd_data.bd_body_1part; @@ -799,7 +801,7 @@ void IMAPwrapper::traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&t break; case MAILIMAP_BODY_MPART: { - QValueListcountlist = recList; + Q3ValueListcountlist = recList; clistcell*current=0; mailimap_body*current_body=0; unsigned int ccount = 1; @@ -985,7 +987,7 @@ 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&target) +void IMAPwrapper::deleteMailList(const Q3ValueList&target) { //#if 0 mailimap_flag_list*flist; @@ -1005,7 +1007,7 @@ void IMAPwrapper::deleteMailList(const QValueList&target) mMax = count; progress( i18n("Delete")); - QProgressBar wid ( count ); + Q3ProgressBar wid ( count ); wid.setCaption( i18n("Deleting ...")); wid.show(); while (iii < count ) { @@ -1114,7 +1116,7 @@ void IMAPwrapper::answeredMail(const RecMailP&mail) } } -QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const QValueList&path,bool internal_call,const QString&enc) +QString IMAPwrapper::fetchTextPart(const RecMailP&mail,const Q3ValueList&path,bool internal_call,const QString&enc) { QString body(""); encodedString*res = fetchRawPart(mail,path,internal_call); @@ -1299,7 +1301,7 @@ const QString&IMAPwrapper::getName()const encodedString* IMAPwrapper::fetchRawBody(const RecMailP&mail) { // dummy - QValueList path; + Q3ValueList path; return fetchRawPart(mail,path,false); } diff --git a/kmicromail/libmailwrapper/imapwrapper.h b/kmicromail/libmailwrapper/imapwrapper.h index 31c60a8..d3d3ecd 100644 --- a/kmicromail/libmailwrapper/imapwrapper.h +++ b/kmicromail/libmailwrapper/imapwrapper.h @@ -3,6 +3,8 @@ #define __IMAPWRAPPER #include +//Added by qt3to4: +#include #include "mailwrapper.h" #include "abstractmail.h" #include @@ -24,12 +26,12 @@ class IMAPwrapper : public AbstractMail public: IMAPwrapper( IMAPaccount *a ); virtual ~IMAPwrapper(); - virtual QValueList >* listFolders(); - virtual void listMessages(const QString & mailbox,QValueList >&target , int sizeInKb = 0); + virtual Q3ValueList >* listFolders(); + virtual void listMessages(const QString & mailbox,Q3ValueList >&target , int sizeInKb = 0); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); virtual void deleteMail(const RecMailP&mail); - void deleteMailList(const QValueList&target); + void deleteMailList(const Q3ValueList&target); virtual void answeredMail(const RecMailP&mail); virtual int deleteAllMail(const Opie::Core::OSmartPointer&folder); virtual void storeMessage(const char*msg,size_t length, const QString&folder); @@ -59,8 +61,8 @@ protected: void login(bool tryTLS = true); bool start_tls(bool force=true); - virtual QString fetchTextPart(const RecMailP&mail,const QValueList&path,bool internal_call=false,const QString&enc=""); - virtual encodedString*fetchRawPart(const RecMailP&mail,const QValueList&path,bool internal_call); + virtual QString fetchTextPart(const RecMailP&mail,const Q3ValueList&path,bool internal_call=false,const QString&enc=""); + virtual encodedString*fetchRawPart(const RecMailP&mail,const Q3ValueList&path,bool internal_call); int selectMbox(const QString&mbox); void fillSinglePart(RecPartP&target_part,mailimap_body_type_1part*Description); @@ -68,7 +70,7 @@ protected: 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,QValueListrecList,int current_count=1); + void traverseBody(const RecMailP&mail,mailimap_body*body,RecBodyP&target_body,int current_recursion,Q3ValueListrecList,int current_count=1); /* just helpers */ static void fillBodyFields(RecPartP&target_part,mailimap_body_fields*which); diff --git a/kmicromail/libmailwrapper/libmailwrapper.pro b/kmicromail/libmailwrapper/libmailwrapper.pro index 646630b..6b595ab 100644 --- a/kmicromail/libmailwrapper/libmailwrapper.pro +++ b/kmicromail/libmailwrapper/libmailwrapper.pro @@ -38,7 +38,8 @@ SOURCES = imapwrapper.cpp \ ../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 @@ -63,3 +64,8 @@ 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/libmailwrapper/logindialog.cpp b/kmicromail/libmailwrapper/logindialog.cpp index 31b75d0..d1f4b5d 100644 --- a/kmicromail/libmailwrapper/logindialog.cpp +++ b/kmicromail/libmailwrapper/logindialog.cpp @@ -6,7 +6,7 @@ //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) ); diff --git a/kmicromail/libmailwrapper/logindialog.h b/kmicromail/libmailwrapper/logindialog.h index f406f2c..a18daa5 100644 --- a/kmicromail/libmailwrapper/logindialog.h +++ b/kmicromail/libmailwrapper/logindialog.h @@ -8,7 +8,7 @@ class LoginDialog : public LoginDialogUI 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; } diff --git a/kmicromail/libmailwrapper/mailtypes.cpp b/kmicromail/libmailwrapper/mailtypes.cpp index 70a0ab5..84ccf9f 100644 --- a/kmicromail/libmailwrapper/mailtypes.cpp +++ b/kmicromail/libmailwrapper/mailtypes.cpp @@ -3,6 +3,8 @@ //#include #include +//Added by qt3to4: +#include using namespace Opie::Core; RecMail::RecMail() @@ -283,12 +285,12 @@ const QString RecPart::searchParamter(const QString&key)const return value; } -void RecPart::setPositionlist(const QValueList&poslist) +void RecPart::setPositionlist(const Q3ValueList&poslist) { m_poslist = poslist; } -const QValueList& RecPart::Positionlist()const +const Q3ValueList& RecPart::Positionlist()const { return m_poslist; } @@ -323,13 +325,13 @@ const QString& RecBody::Bodytext()const return m_BodyText; } -void RecBody::setParts(const QValueList&parts) +void RecBody::setParts(const Q3ValueList&parts) { m_PartsList.clear(); m_PartsList = parts; } -const QValueList& RecBody::Parts()const +const Q3ValueList& 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 @@ -14,7 +14,7 @@ #include #include #include -#include +#include class AbstractMail; /* a class to describe mails in a mailbox */ @@ -109,7 +109,7 @@ protected: unsigned int m_lines,m_size; part_plist_t m_Parameters; /* describes the position in the mail */ - QValueList m_poslist; + Q3ValueList m_poslist; public: RecPart(); @@ -136,8 +136,8 @@ public: 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&poslist); - const QValueList& Positionlist()const; + void setPositionlist(const Q3ValueList&poslist); + const Q3ValueList& Positionlist()const; }; typedef Opie::Core::OSmartPointer RecPartP; @@ -147,7 +147,7 @@ class RecBody:public Opie::Core::ORefCount protected: QString m_BodyText; QString mCharset; - QValueList m_PartsList; + Q3ValueList m_PartsList; RecPartP m_description; public: @@ -162,8 +162,8 @@ public: void setDescription(const RecPartP&des); const RecPartP& Description()const; - void setParts(const QValueList&parts); - const QValueList& Parts()const; + void setParts(const Q3ValueList&parts); + const Q3ValueList& Parts()const; void addPart(const RecPartP&part); }; diff --git a/kmicromail/libmailwrapper/mailwrapper.cpp b/kmicromail/libmailwrapper/mailwrapper.cpp index 2ee1ab3..9c299e8 100644 --- a/kmicromail/libmailwrapper/mailwrapper.cpp +++ b/kmicromail/libmailwrapper/mailwrapper.cpp @@ -5,6 +5,8 @@ #include #include #include +//Added by qt3to4: +#include #include "mailwrapper.h" //#include "logindialog.h" @@ -81,8 +83,8 @@ QString IMAPFolder::decodeFolderName( const QString &name ) 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)); @@ -92,9 +94,9 @@ 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 */ @@ -105,7 +107,7 @@ QString IMAPFolder::decodeFolderName( const QString &name ) 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; @@ -149,7 +151,7 @@ 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 @@ -6,6 +6,8 @@ #include #include #include +//Added by qt3to4: +#include #include #include "settings.h" @@ -61,7 +63,7 @@ public: */ virtual ~Mail(){} void addAttachment( Attachment *att ) { attList.append( att ); } - const QList& getAttachments()const { return attList; } + const QList& getAttachments()const { return attList; } void removeAttachment( Attachment *att ) { attList.remove( att ); } const QString&getName()const { return name; } void setName( QString s ) { name = s; } @@ -86,7 +88,7 @@ public: const QString& getCharset() const { return charset; } private: - QList attList; + QList 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 @@ -3,6 +3,8 @@ #include "mailwrapper.h" #include #include +//Added by qt3to4: +#include #include #include @@ -23,7 +25,7 @@ MBOXwrapper::~MBOXwrapper() { } -void MBOXwrapper::listMessages(const QString & mailbox, QValueList &target ) +void MBOXwrapper::listMessages(const QString & mailbox, Q3ValueList &target ) { mailstorage*storage = mailstorage_new(NULL); QString p = MBOXPath+"/"; @@ -48,9 +50,9 @@ void MBOXwrapper::listMessages(const QString & mailbox, QValueList &ta Global::statusMessage(i18n("Mailbox has %1 mail(s)").arg(target.count())); } -QValueList >* MBOXwrapper::listFolders() +Q3ValueList >* MBOXwrapper::listFolders() { - QValueList >* folders = new QValueList >(); + Q3ValueList >* folders = new Q3ValueList >(); QDir dir(MBOXPath); if (!dir.exists()) return folders; dir.setFilter(QDir::Files|QDir::Writable|QDir::Readable); @@ -217,7 +219,7 @@ encodedString* MBOXwrapper::fetchRawBody(const RecMailP&mail) return result; } -void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList &target) +void MBOXwrapper::deleteMails(const QString & mailbox,const Q3ValueList &target) { QString p = MBOXPath+"/"; p+=mailbox; @@ -231,11 +233,11 @@ void MBOXwrapper::deleteMails(const QString & mailbox,const QValueList mailmbox_done(f); } -void MBOXwrapper::deleteMails(mailmbox_folder*f,const QValueList &target) +void MBOXwrapper::deleteMails(mailmbox_folder*f,const Q3ValueList &target) { if (!f) return; int r; - QValueList::ConstIterator it; + Q3ValueList::ConstIterator it; for (it=target.begin(); it != target.end();++it) { r = mailmbox_delete_msg(f,(*it)->getNumber()); if (r!=MAILMBOX_NO_ERROR) { diff --git a/kmicromail/libmailwrapper/mboxwrapper.h b/kmicromail/libmailwrapper/mboxwrapper.h index d03940f..e658a71 100644 --- a/kmicromail/libmailwrapper/mboxwrapper.h +++ b/kmicromail/libmailwrapper/mboxwrapper.h @@ -3,6 +3,8 @@ #include "genericwrapper.h" #include +//Added by qt3to4: +#include class encodedString; struct mailmbox_folder; @@ -15,8 +17,8 @@ public: MBOXwrapper(const QString & dir,const QString&name); virtual ~MBOXwrapper(); - virtual void listMessages(const QString & mailbox, QValueList&target ); - virtual QValueList >* listFolders(); + virtual void listMessages(const QString & mailbox, Q3ValueList&target ); + virtual Q3ValueList >* listFolders(); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); virtual void deleteMail(const RecMailP&mail); @@ -32,14 +34,14 @@ public: static void mbox_progress( size_t current, size_t maximum ); virtual encodedString* fetchRawBody(const RecMailP&mail); - virtual void deleteMails(const QString & FolderName,const QValueList &target); + virtual void deleteMails(const QString & FolderName,const Q3ValueList &target); virtual int deleteAllMail(const Opie::Core::OSmartPointer&); virtual MAILLIB::ATYPE getType()const; virtual const QString&getName()const; virtual Account* getAccount() { return 0; }; protected: - static void deleteMails(mailmbox_folder*f,const QValueList &target); + static void deleteMails(mailmbox_folder*f,const Q3ValueList &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 @@ -5,6 +5,8 @@ #include #include #include +//Added by qt3to4: +#include #include #include #include @@ -64,7 +66,7 @@ MHwrapper::~MHwrapper() clean_storage(); } -void MHwrapper::listMessages(const QString & mailbox, QValueList > &target, int maxSizeInKb ) +void MHwrapper::listMessages(const QString & mailbox, Q3ValueList > &target, int maxSizeInKb ) { init_storage(); if (!m_storage) { @@ -80,9 +82,9 @@ void MHwrapper::listMessages(const QString & mailbox, QValueList >* MHwrapper::listFolders() +Q3ValueList >* MHwrapper::listFolders() { - QValueList >* folders = new QValueList >(); + Q3ValueList >* folders = new Q3ValueList >(); /* this is needed! */ if (m_storage) mailstorage_disconnect(m_storage); init_storage(); @@ -255,7 +257,7 @@ encodedString* MHwrapper::fetchRawBody(const RecMailP&mail) return result; } -void MHwrapper::deleteMails(const QString & mailbox,const QValueList &target) +void MHwrapper::deleteMails(const QString & mailbox,const Q3ValueList &target) { QString f = buildPath(mailbox); int r = mailsession_select_folder(m_storage->sto_session,(char*)f.latin1()); @@ -263,7 +265,7 @@ void MHwrapper::deleteMails(const QString & mailbox,const QValueList & qDebug("deleteMails: error selecting folder! "); return; } - QValueList::ConstIterator it; + Q3ValueList::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) { diff --git a/kmicromail/libmailwrapper/mhwrapper.h b/kmicromail/libmailwrapper/mhwrapper.h index 36a443a..6151ff1 100644 --- a/kmicromail/libmailwrapper/mhwrapper.h +++ b/kmicromail/libmailwrapper/mhwrapper.h @@ -6,6 +6,8 @@ #include "genericwrapper.h" #include +//Added by qt3to4: +#include class encodedString; struct mailmbox_folder; @@ -16,8 +18,8 @@ public: MHwrapper(const QString & dir,const QString&name); virtual ~MHwrapper(); - virtual void listMessages(const QString & mailbox, QValueList > &target, int maxSizeInKb = 0 ); - virtual QValueList >* listFolders(); + virtual void listMessages(const QString & mailbox, Q3ValueList > &target, int maxSizeInKb = 0 ); + virtual Q3ValueList >* listFolders(); virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); virtual void deleteMail(const RecMailP&mail); @@ -36,7 +38,7 @@ public: static void mbox_progress( size_t current, size_t maximum ); virtual encodedString* fetchRawBody(const RecMailP&mail); - virtual void deleteMails(const QString & FolderName,const QValueList > &target); + virtual void deleteMails(const QString & FolderName,const Q3ValueList > &target); virtual int deleteAllMail(const Opie::Core::OSmartPointer&); virtual MAILLIB::ATYPE getType()const; virtual const QString&getName()const; diff --git a/kmicromail/libmailwrapper/nntpwrapper.cpp b/kmicromail/libmailwrapper/nntpwrapper.cpp index 93cd2b5..b328ecd 100644 --- a/kmicromail/libmailwrapper/nntpwrapper.cpp +++ b/kmicromail/libmailwrapper/nntpwrapper.cpp @@ -4,6 +4,8 @@ #include "mailtypes.h" #include +//Added by qt3to4: +#include #include @@ -60,14 +62,14 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { 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) { @@ -99,7 +101,7 @@ RecBodyP NNTPwrapper::fetchBody( const RecMailP &mail ) { } -void NNTPwrapper::listMessages(const QString & which, QValueList > &target, int maxSizeInKb) +void NNTPwrapper::listMessages(const QString & which, Q3ValueList > &target, int maxSizeInKb) { login(); if (!m_nntp) @@ -186,9 +188,9 @@ void NNTPwrapper::logout() m_nntp = 0; } -QValueList >* NNTPwrapper::listFolders() { +Q3ValueList >* NNTPwrapper::listFolders() { - QValueList >* folders = new QValueList >(); + Q3ValueList >* folders = new Q3ValueList >(); 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 @@ -5,6 +5,8 @@ #include "mailwrapper.h" #include "genericwrapper.h" #include +//Added by qt3to4: +#include #include class encodedString; @@ -21,9 +23,9 @@ public: virtual ~NNTPwrapper(); /* mailbox will be ignored */ - virtual void listMessages(const QString & mailbox, QValueList > &target, int maxSizeInKb = 0 ); + virtual void listMessages(const QString & mailbox, Q3ValueList > &target, int maxSizeInKb = 0 ); /* should only get the subscribed one */ - virtual QValueList >* listFolders(); + virtual Q3ValueList >* listFolders(); /* mailbox will be ignored */ virtual void statusFolder(folderStat&target_stat,const QString & mailbox="INBOX"); QStringList listAllNewsgroups(const QString&mask = QString::null); diff --git a/kmicromail/libmailwrapper/pop3wrapper.cpp b/kmicromail/libmailwrapper/pop3wrapper.cpp index 2888f7c..ebeed71 100644 --- a/kmicromail/libmailwrapper/pop3wrapper.cpp +++ b/kmicromail/libmailwrapper/pop3wrapper.cpp @@ -9,8 +9,10 @@ #include #include -#include +#include #include +//Added by qt3to4: +#include /* we don't fetch messages larger than 5 MB */ #define HARD_MSG_SIZE_LIMIT 5242880 @@ -62,14 +64,14 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { 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) { @@ -100,7 +102,7 @@ RecBodyP POP3wrapper::fetchBody( const RecMailP &mail ) { return body; } -void POP3wrapper::listMessages(const QString &, QValueList > &target, int maxSizeInKb ) +void POP3wrapper::listMessages(const QString &, Q3ValueList > &target, int maxSizeInKb ) { login(); if (!m_pop3) @@ -187,14 +189,14 @@ void POP3wrapper::logout() } -QValueList >* POP3wrapper::listFolders() { - QValueList >* folders = new QValueList(); +Q3ValueList >* POP3wrapper::listFolders() { + Q3ValueList >* folders = new Q3ValueList(); FolderP inb=new Folder("INBOX","/"); folders->append(inb); return folders; } -void POP3wrapper::deleteMailList(const QValueList&target) +void POP3wrapper::deleteMailList(const Q3ValueList&target) { login(); if (!m_pop3) @@ -202,7 +204,7 @@ void POP3wrapper::deleteMailList(const QValueList&target) int iii = 0; int count = target.count(); - QProgressBar wid ( count ); + Q3ProgressBar wid ( count ); wid.setCaption( i18n("Deleting ...")); wid.show(); while (iii < count ) { @@ -246,7 +248,7 @@ 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) { diff --git a/kmicromail/libmailwrapper/pop3wrapper.h b/kmicromail/libmailwrapper/pop3wrapper.h index ebc2fc7..a077877 100644 --- a/kmicromail/libmailwrapper/pop3wrapper.h +++ b/kmicromail/libmailwrapper/pop3wrapper.h @@ -5,6 +5,8 @@ #include "mailwrapper.h" #include "genericwrapper.h" #include +//Added by qt3to4: +#include class encodedString; struct mailstorage; @@ -18,13 +20,13 @@ public: POP3wrapper( POP3account *a ); virtual ~POP3wrapper(); /* mailbox will be ignored */ - virtual void listMessages(const QString & mailbox, QValueList > &target, int maxSizeInKb = 0 ); - virtual QValueList >* listFolders(); + virtual void listMessages(const QString & mailbox, Q3ValueList > &target, int maxSizeInKb = 0 ); + virtual Q3ValueList >* 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&target); + virtual void deleteMailList(const Q3ValueList&target); virtual void answeredMail(const RecMailP&mail); virtual int deleteAllMail(const Opie::Core::OSmartPointer&); diff --git a/kmicromail/libmailwrapper/sendmailprogress.cpp b/kmicromail/libmailwrapper/sendmailprogress.cpp index 20dfe9b..6cd6409 100644 --- a/kmicromail/libmailwrapper/sendmailprogress.cpp +++ b/kmicromail/libmailwrapper/sendmailprogress.cpp @@ -1,5 +1,5 @@ #include "sendmailprogress.h" -#include +#include #include #include diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp index 9436d43..fc01528 100644 --- a/kmicromail/libmailwrapper/settings.cpp +++ b/kmicromail/libmailwrapper/settings.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include //#include @@ -376,11 +376,11 @@ QString SMTPaccount::getSignature() 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(); @@ -399,11 +399,11 @@ void SMTPaccount::setSignature( QString b ) 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 @@ -9,6 +9,8 @@ //#include #include #include +//Added by qt3to4: +#include #include #ifndef DESKTOP_VERSION //#include @@ -434,8 +436,8 @@ bool SMTPwrapper::flushOutbox() { return false; } QString oldPw, oldUser; - QValueList mailsToSend; - QValueList mailsToRemove; + Q3ValueList mailsToSend; + Q3ValueList mailsToRemove; QString mbox("Outgoing"); wrap->listMessages(mbox,mailsToSend); if (mailsToSend.count()==0) { diff --git a/kmicromail/mailistviewitem.cpp b/kmicromail/mailistviewitem.cpp index 41cee52..d8eee7d 100644 --- a/kmicromail/mailistviewitem.cpp +++ b/kmicromail/mailistviewitem.cpp @@ -1,12 +1,12 @@ // CHANGED 2004-08-06 Lutz Rogowski #include "mailistviewitem.h" #include -#include +#include #include #include "koprefs.h" //#include -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 @@ -9,7 +9,7 @@ class MailListViewItem:public KListViewItem { public: - MailListViewItem(QListView * parent, MailListViewItem * after ); + MailListViewItem(Q3ListView * parent, MailListViewItem * after ); virtual ~MailListViewItem(){} void storeData(const RecMailP&data); diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp index fe4bc76..dc73455 100644 --- a/kmicromail/main.cpp +++ b/kmicromail/main.cpp @@ -3,6 +3,8 @@ #ifndef DESKTOP_VERSION #include +//Added by qt3to4: +#include #include #include #else @@ -23,6 +25,7 @@ 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 ); @@ -51,7 +54,7 @@ int main( int argc, char **argv ) { 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 diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index d547dda..627d92e 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp @@ -1,10 +1,16 @@ // CHANGED 2004-08-06 Lutz Rogowski #include -#include -#include +#include +#include #include #include +//Added by qt3to4: +#include +#include +#include +#include +#include //#include #include #include @@ -27,8 +33,8 @@ extern QStatusBar* globalSstatusBarMainWindow; #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(); @@ -36,11 +42,11 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 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 ); @@ -114,7 +120,7 @@ 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); @@ -125,7 +131,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) //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 ); @@ -139,7 +145,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 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) ; @@ -168,18 +174,18 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 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 ); @@ -197,17 +203,17 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 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&)), - this,SLOT(refreshMailView(const QValueList&))); - - 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&)), + this,SLOT(refreshMailView(const Q3ValueList&))); + + connect( mailView, SIGNAL( currentChanged (Q3ListViewItem* )),this, + SLOT( setInfoFields(Q3ListViewItem*) ) ); connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); @@ -215,7 +221,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); //mailView->setMultiSelection ( true ); //mailView->setSelectionMode( QListView::Extended ); - QValueList list; + Q3ValueList list; int fw = 100; if ( QApplication::desktop()->width() > 320 ) fw = 50; @@ -235,7 +241,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 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()) ); @@ -259,7 +265,7 @@ MainWindow::~MainWindow() { } -void MainWindow::setInfoFields(QListViewItem* item ) +void MainWindow::setInfoFields(Q3ListViewItem* item ) { if ( item == 0) { if ( subLE ) subLE->setText(""); @@ -345,7 +351,7 @@ 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"); } @@ -405,12 +411,12 @@ void MainWindow::slotShowFolders( bool ) qDebug("not implemented: "); } -void MainWindow::refreshMailView(const QValueList&) +void MainWindow::refreshMailView(const Q3ValueList&) { qDebug("not implemented: "); } -void MainWindow::mailLeftClicked(QListViewItem * ) +void MainWindow::mailLeftClicked(Q3ListViewItem * ) { qDebug("not implemented: "); } @@ -425,7 +431,7 @@ 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 @@ -3,12 +3,16 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include +#include +//Added by qt3to4: +#include +#include +#include #include #include #include -#include +#include #ifdef DESKTOP_VERSION #include #define QPEMenuBar QMenuBar @@ -24,46 +28,46 @@ 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&); + virtual void refreshMailView(const Q3ValueList&); 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; diff --git a/kmicromail/nntpgroups.cpp b/kmicromail/nntpgroups.cpp index c729f79..d2213d4 100644 --- a/kmicromail/nntpgroups.cpp +++ b/kmicromail/nntpgroups.cpp @@ -1,12 +1,12 @@ #include "nntpgroups.h" #include -#include +#include #include 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; @@ -27,8 +27,8 @@ void NNTPGroups::slotGetNG() 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)); @@ -41,8 +41,8 @@ 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 ); } } @@ -50,10 +50,10 @@ void NNTPGroups::fillGroups() 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) ); } } diff --git a/kmicromail/nntpgroups.h b/kmicromail/nntpgroups.h index e5b7c35..80cc329 100644 --- a/kmicromail/nntpgroups.h +++ b/kmicromail/nntpgroups.h @@ -12,7 +12,7 @@ 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 diff --git a/kmicromail/nntpgroupsdlg.cpp b/kmicromail/nntpgroupsdlg.cpp index f564b10..bfe1d35 100644 --- a/kmicromail/nntpgroupsdlg.cpp +++ b/kmicromail/nntpgroupsdlg.cpp @@ -5,13 +5,15 @@ #include #include +//Added by qt3to4: +#include 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); diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp index 75a75b9..f453be5 100644 --- a/kmicromail/opiemail.cpp +++ b/kmicromail/opiemail.cpp @@ -4,6 +4,11 @@ #define protected public #include +//Added by qt3to4: +#include +#include +#include +#include #undef protected #include "koprefsdialog.h" #include @@ -27,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -63,12 +68,12 @@ OpieMail::~OpieMail() delete tb; } -void OpieMail::appMessage(const QCString &msg, const QByteArray &data) +void OpieMail::appMessage(const Q3CString &msg, const QByteArray &data) { } #include -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; @@ -83,7 +88,7 @@ void OpieMail::message(const QCString &msg, const QByteArray &data) 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() ) ); @@ -100,7 +105,7 @@ 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 :SUBJECT @@ -279,7 +284,7 @@ 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); @@ -331,7 +336,7 @@ 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; @@ -372,7 +377,7 @@ void OpieMail::slotDownloadMail( ) void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item ) { closeViewMail(vm); return; @@ -392,7 +397,7 @@ void OpieMail::deleteAndDisplayNextMail(ViewMail * vm) } void OpieMail::displayNextMail(ViewMail * vm) { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item) return; ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() ); item = item->itemBelow(); @@ -408,7 +413,7 @@ void OpieMail::displayNextMail(ViewMail * vm) } void OpieMail::displayMail() { - QListViewItem*item = mailView->currentItem(); + Q3ListViewItem*item = mailView->currentItem(); if (!item) return; RecMailP mail = ((MailListViewItem*)item)->data(); RecBodyP body = folderView->fetchBody(mail); @@ -432,14 +437,14 @@ void OpieMail::displayMail() } 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 (); @@ -447,7 +452,7 @@ void OpieMail::slotGetAllMail() } void OpieMail::slotGetMail() { - QListViewItem * item = folderView->currentItem(); + Q3ListViewItem * item = folderView->currentItem(); if ( ! item ) return; ((AccountViewItem *)item)->contextMenuSelected( 101 ); } @@ -464,7 +469,7 @@ void OpieMail::slotDeleteMail() void OpieMail::slotDeleteAllMail() { - QValueList t; + Q3ValueList 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 (); @@ -492,21 +497,21 @@ 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) { @@ -553,12 +558,12 @@ void OpieMail::slotShowFolders( bool show ) } } -void OpieMail::refreshMailView(const QValueList&list) +void OpieMail::refreshMailView(const Q3ValueList&list) { MailListViewItem*item = 0; mailView->clear(); - QValueList::ConstIterator it; + Q3ValueList::ConstIterator it; for (it = list.begin(); it != list.end();++it) { item = new MailListViewItem(mailView,item); @@ -568,7 +573,7 @@ void OpieMail::refreshMailView(const QValueList&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 */ @@ -614,7 +619,7 @@ void OpieMail::slotMoveCopyAllMail() { if (!mailView->currentItem()) return; - QValueList t; + Q3ValueList 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 (); diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h index bdd9058..ea64dc4 100644 --- a/kmicromail/opiemail.h +++ b/kmicromail/opiemail.h @@ -9,6 +9,9 @@ #include #include #include +//Added by qt3to4: +#include +#include class ComposeMail; @@ -26,8 +29,8 @@ public slots: 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); @@ -43,10 +46,10 @@ protected slots: 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&); - virtual void mailLeftClicked( QListViewItem * ); + virtual void refreshMailView(const Q3ValueList&); + virtual void mailLeftClicked( Q3ListViewItem * ); virtual void slotMoveCopyMail(); virtual void slotMoveCopyAllMail(); virtual void reEditMail(); @@ -59,9 +62,9 @@ private: QString mPendingEmail; QString mPendingName; QByteArray mPendingData; - QCString mPendingMessage; + Q3CString mPendingMessage; Settings *settings; - QTextBrowser * tb; + Q3TextBrowser * tb; }; 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 @@ -14,7 +14,7 @@ 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 ); }; 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,19 +1,19 @@ #include -#include +#include #include #include #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 ); diff --git a/kmicromail/selectsmtp.cpp b/kmicromail/selectsmtp.cpp index 10b6d79..ead723c 100644 --- a/kmicromail/selectsmtp.cpp +++ b/kmicromail/selectsmtp.cpp @@ -8,9 +8,9 @@ #include #include #include -#include +#include #include -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); diff --git a/kmicromail/selectsmtp.h b/kmicromail/selectsmtp.h index 9157ddf..d7accf6 100644 --- a/kmicromail/selectsmtp.h +++ b/kmicromail/selectsmtp.h @@ -11,7 +11,7 @@ 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*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 @@ -2,7 +2,7 @@ #define _SELECTSTORE_H #include "selectstoreui.h" -#include +#include #include #include diff --git a/kmicromail/settingsdialog.cpp b/kmicromail/settingsdialog.cpp index c593b48..889c490 100644 --- a/kmicromail/settingsdialog.cpp +++ b/kmicromail/settingsdialog.cpp @@ -2,6 +2,8 @@ #include #include #include +//Added by qt3to4: +#include #include #include @@ -12,13 +14,13 @@ #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; diff --git a/kmicromail/settingsdialog.h b/kmicromail/settingsdialog.h index 042b69f..b168226 100644 --- a/kmicromail/settingsdialog.h +++ b/kmicromail/settingsdialog.h @@ -11,7 +11,7 @@ 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: diff --git a/kmicromail/statuswidget.cpp b/kmicromail/statuswidget.cpp index 19cf635..6da6f54 100644 --- a/kmicromail/statuswidget.cpp +++ b/kmicromail/statuswidget.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include "statuswidget.h" @@ -7,7 +7,7 @@ // 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 ); diff --git a/kmicromail/statuswidget.h b/kmicromail/statuswidget.h index 73f0d75..1d29daf 100644 --- a/kmicromail/statuswidget.h +++ b/kmicromail/statuswidget.h @@ -9,7 +9,7 @@ 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(); diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp index 685b4e4..c9dedb0 100644 --- a/kmicromail/viewmail.cpp +++ b/kmicromail/viewmail.cpp @@ -24,20 +24,23 @@ #include /* QT */ -#include +#include #include -#include +#include #include -#include +#include #include #include +//Added by qt3to4: +#include +#include //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&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&path) + : Q3ListViewItem(parent,after),_partNum(num) { _path=path; setText(0, mime); @@ -46,9 +49,9 @@ AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mi 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&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&path) + : Q3ListViewItem(parent,after),_partNum(num) { _path=path; setText(0, mime); @@ -57,7 +60,7 @@ AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QStrin setText(3, fsize); } -bool AttachItem::isParentof(const QValueList&path) +bool AttachItem::isParentof(const Q3ValueList&path) { /* if not set, then no parent */ if (path.count()==0||_path.count()==0) return false; @@ -70,9 +73,9 @@ bool AttachItem::isParentof(const QValueList&path) return true; } -AttachItem* ViewMail::searchParent(const QValueList&path) +AttachItem* ViewMail::searchParent(const Q3ValueList&path) { - QListViewItemIterator it( attachments ); + Q3ListViewItemIterator it( attachments ); for ( ; it.current(); ++it ) { AttachItem*ati = (AttachItem*)it.current(); @@ -154,7 +157,7 @@ void ViewMail::setBody(const RecBodyP&body ) */ 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"; } @@ -195,7 +198,7 @@ void ViewMail::setBody(const RecBodyP&body ) } 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()); @@ -239,7 +242,7 @@ void ViewMail::slotShowHtml( bool state ) setText(); } -void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int ) +void ViewMail::slotItemClicked( Q3ListViewItem * item , const QPoint & point, int ) { if (!item ) return; @@ -249,7 +252,7 @@ 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" ) @@ -278,7 +281,7 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int if (content) { QFile output(str); - output.open(IO_WriteOnly); + output.open(QIODevice::WriteOnly); output.writeBlock(content->Content(),content->Length()); output.close(); delete content; @@ -297,7 +300,7 @@ 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(tmpfile); - output.open(IO_WriteOnly); + output.open(QIODevice::WriteOnly); output.writeBlock(content->Content(),content->Length()); output.close(); delete content; @@ -352,7 +355,7 @@ void ViewMail::slotNextMail() 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; @@ -369,7 +372,7 @@ ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) 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); } @@ -557,10 +560,10 @@ void ViewMail::slotDeleteMail( ) } } -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); diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h index bb5b685..6cf6efb 100644 --- a/kmicromail/viewmail.h +++ b/kmicromail/viewmail.h @@ -7,28 +7,28 @@ #include #include -#include +#include #include #include #include -#include +#include //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&path); - AttachItem(QListViewItem * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file, - const QString&fsize,int num,const QValueList&path); + AttachItem(Q3ListView * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, + const QString&fsize,int num,const Q3ValueList&path); + AttachItem(Q3ListViewItem * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file, + const QString&fsize,int num,const Q3ValueList&path); int Partnumber() { return _partNum; } - bool isParentof(const QValueList&path); + bool isParentof(const Q3ValueList&path); private: int _partNum; /* needed for a better display of attachments */ - QValueList _path; + Q3ValueList _path; }; class ViewMail : public ViewMailBase @@ -36,7 +36,7 @@ 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(); @@ -50,7 +50,7 @@ public: void signalDownloadMail(); protected: QString deHtml(const QString &string); - AttachItem* searchParent(const QValueList&path); + AttachItem* searchParent(const Q3ValueList&path); AttachItem* lastChild(AttachItem*parent); protected slots: @@ -58,7 +58,7 @@ protected slots: 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(); @@ -83,7 +83,7 @@ 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: diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp index 3bb964e..371ee91 100644 --- a/kmicromail/viewmailbase.cpp +++ b/kmicromail/viewmailbase.cpp @@ -1,13 +1,16 @@ // CHANGED 2004-08-06 Lutz Rogowski -#include -#include +#include +#include #include #include -#include +#include #include -#include +#include #include +//Added by qt3to4: +#include +#include #include //#include #include @@ -15,15 +18,15 @@ #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); @@ -69,10 +72,10 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 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; @@ -85,7 +88,7 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl) 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 @@ -2,7 +2,10 @@ #ifndef VIEWMAILBASE_H #define VIEWMAILBASE_H -#include +#include +//Added by qt3to4: +#include +#include #ifndef DESKTOP_VERSION #include @@ -11,27 +14,27 @@ 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); -- cgit v0.9.0.2