summaryrefslogtreecommitdiff
path: root/noncore/net/mail/viewmail.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/viewmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/viewmail.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp
index 156e11d..a574ea1 100644
--- a/noncore/net/mail/viewmail.cpp
+++ b/noncore/net/mail/viewmail.cpp
@@ -118,49 +118,49 @@ void ViewMail::setBody(const RecBodyP&body )
118 } 118 }
119 119
120 { 120 {
121 /* I did not found a method to make a CONTENT reset on a QTextStream 121 /* I did not found a method to make a CONTENT reset on a QTextStream
122 so I use this construct that the stream will re-constructed in each 122 so I use this construct that the stream will re-constructed in each
123 loop. To let it work, the textstream is packed into a own area of 123 loop. To let it work, the textstream is packed into a own area of
124 code is it will be destructed after finishing its small job. 124 code is it will be destructed after finishing its small job.
125 */ 125 */
126 QTextOStream o(&fsize); 126 QTextOStream o(&fsize);
127 if (w>0) o.precision(2); else o.precision(0); 127 if (w>0) o.precision(2); else o.precision(0);
128 o.setf(QTextStream::fixed); 128 o.setf(QTextStream::fixed);
129 o << s << " " << q << "Byte"; 129 o << s << " " << q << "Byte";
130 } 130 }
131 131
132 curItem=new AttachItem(attachments,curItem,type,"Mailbody","",fsize,-1,body->Description()->Positionlist()); 132 curItem=new AttachItem(attachments,curItem,type,"Mailbody","",fsize,-1,body->Description()->Positionlist());
133 QString filename = ""; 133 QString filename = "";
134 134
135 for (unsigned int i = 0; i < body->Parts().count();++i) 135 for (unsigned int i = 0; i < body->Parts().count();++i)
136 { 136 {
137 filename = ""; 137 filename = "";
138 type = body->Parts()[i]->Type()+"/"+body->Parts()[i]->Subtype(); 138 type = body->Parts()[i]->Type()+"/"+body->Parts()[i]->Subtype();
139 part_plist_t::ConstIterator it = body->Parts()[i]->Parameters().begin(); 139 part_plist_t::ConstIterator it = body->Parts()[i]->Parameters().begin();
140 for (;it!=body->Parts()[i]->Parameters().end();++it) 140 for (;it!=body->Parts()[i]->Parameters().end();++it)
141 { 141 {
142 qDebug(it.key()); 142 odebug << it.key() << oendl;
143 if (it.key().lower()=="name") 143 if (it.key().lower()=="name")
144 { 144 {
145 filename=it.data(); 145 filename=it.data();
146 } 146 }
147 } 147 }
148 s = body->Parts()[i]->Size(); 148 s = body->Parts()[i]->Size();
149 w = 0; 149 w = 0;
150 while (s>1024) 150 while (s>1024)
151 { 151 {
152 s/=1024; 152 s/=1024;
153 ++w; 153 ++w;
154 if (w>=2) break; 154 if (w>=2) break;
155 } 155 }
156 switch(w) 156 switch(w)
157 { 157 {
158 case 1: 158 case 1:
159 q="k"; 159 q="k";
160 break; 160 break;
161 case 2: 161 case 2:
162 q="M"; 162 q="M";
163 break; 163 break;
164 default: 164 default:
165 q=""; 165 q="";
166 break; 166 break;