summaryrefslogtreecommitdiffabout
path: root/kmicromail/viewmail.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/viewmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/viewmail.cpp47
1 files changed, 25 insertions, 22 deletions
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 <qpe/qpeapplication.h>
/* QT */
-#include <qtextbrowser.h>
+#include <q3textbrowser.h>
#include <qmessagebox.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qaction.h>
-#include <qpopupmenu.h>
+#include <q3popupmenu.h>
#include <qfile.h>
#include <qlayout.h>
+//Added by qt3to4:
+#include <Q3ValueList>
+#include <Q3VBoxLayout>
//using namespace Opie::Ui;
//using namespace Opie::Core;
-AttachItem::AttachItem(QListView * parent,QListViewItem *after, const QString&mime,const QString&desc,const QString&file,
- const QString&fsize,int num,const QValueList<int>&path)
- : QListViewItem(parent,after),_partNum(num)
+AttachItem::AttachItem(Q3ListView * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file,
+ const QString&fsize,int num,const Q3ValueList<int>&path)
+ : Q3ListViewItem(parent,after),_partNum(num)
{
_path=path;
setText(0, mime);
@@ -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<int>&path)
- : QListViewItem(parent,after),_partNum(num)
+AttachItem::AttachItem(Q3ListViewItem * parent,Q3ListViewItem *after, const QString&mime,const QString&desc,const QString&file,
+ const QString&fsize,int num,const Q3ValueList<int>&path)
+ : Q3ListViewItem(parent,after),_partNum(num)
{
_path=path;
setText(0, mime);
@@ -57,7 +60,7 @@ AttachItem::AttachItem(QListViewItem * parent,QListViewItem *after, const QStrin
setText(3, fsize);
}
-bool AttachItem::isParentof(const QValueList<int>&path)
+bool AttachItem::isParentof(const Q3ValueList<int>&path)
{
/* if not set, then no parent */
if (path.count()==0||_path.count()==0) return false;
@@ -70,9 +73,9 @@ bool AttachItem::isParentof(const QValueList<int>&path)
return true;
}
-AttachItem* ViewMail::searchParent(const QValueList<int>&path)
+AttachItem* ViewMail::searchParent(const Q3ValueList<int>&path)
{
- QListViewItemIterator it( attachments );
+ Q3ListViewItemIterator it( attachments );
for ( ; it.current(); ++it )
{
AttachItem*ati = (AttachItem*)it.current();
@@ -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);