-rw-r--r-- | noncore/net/mail/viewmail.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index 48b71eb..0947879 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp | |||
@@ -5,2 +5,3 @@ | |||
5 | #include <qpopupmenu.h> | 5 | #include <qpopupmenu.h> |
6 | #include <qfile.h> | ||
6 | #include <qapplication.h> | 7 | #include <qapplication.h> |
@@ -14,2 +15,3 @@ | |||
14 | #include "accountview.h" | 15 | #include "accountview.h" |
16 | #include "mailtypes.h" | ||
15 | 17 | ||
@@ -136,3 +138,10 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int | |||
136 | if( !str.isEmpty() ) { | 138 | if( !str.isEmpty() ) { |
137 | qDebug( "first we will need a MIME wrapper" ); | 139 | encodedString*content = m_recMail.Wrapper()->fetchDecodedPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ); |
140 | if (content) { | ||
141 | QFile output(str); | ||
142 | output.open(IO_WriteOnly); | ||
143 | output.writeBlock(content->Content(),content->Length()); | ||
144 | output.close(); | ||
145 | delete content; | ||
146 | } | ||
138 | } | 147 | } |
@@ -146,3 +155,3 @@ void ViewMail::slotItemClicked( QListViewItem * item , const QPoint & point, int | |||
146 | if ( m_recMail.Wrapper() != 0l ) { // make sure that there is a wrapper , even after delete or simular actions | 155 | if ( m_recMail.Wrapper() != 0l ) { // make sure that there is a wrapper , even after delete or simular actions |
147 | browser->setText( m_recMail.Wrapper()->fetchPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) ); | 156 | browser->setText( m_recMail.Wrapper()->fetchTextPart( m_recMail, m_body.Parts()[ ( ( AttachItem* )item )->Partnumber() ] ) ); |
148 | } | 157 | } |