From 9e6b4366c59c7d9939a6f44be9d32c4bc553869f Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 24 Jan 2005 21:52:37 +0000 Subject: compile fix --- (limited to 'kmicromail/libmailwrapper/mailtypes.h') diff --git a/kmicromail/libmailwrapper/mailtypes.h b/kmicromail/libmailwrapper/mailtypes.h index 39c0bac..97f10d7 100644 --- a/kmicromail/libmailwrapper/mailtypes.h +++ b/kmicromail/libmailwrapper/mailtypes.h @@ -55,9 +55,21 @@ public: const QString&Replyto()const{return replyto;} void setMsgsize(unsigned int size){msg_size = size;} const unsigned int Msgsize()const{return msg_size;} - const QString MsgsizeString()const; - - + const QString MsgsizeString()const { + double s = msg_size; + int w = 0; + s/=1024; + if (s>999.0) { + s/=1024.0; + ++w; + } + QString fsize = QString::number( s, 'f', 2 ); + if ( w == 0 ) { + fsize += "kB" ; + } else + fsize += "MB" ; + return fsize; + }; void setTo(const QStringList&list); const QStringList&To()const; void setCC(const QStringList&list); -- cgit v0.9.0.2