[kmobiletools] KDE/kdepim/kmobiletools

Frank Osterfeld frank.osterfeld at gmx.de
Thu Jun 21 14:56:51 CEST 2007


On Thursday 21 June 2007 14:15:50 Marco Gulino wrote:

>  KDateTime SMS::getDateTime() const {
>      if(! const_cast<SMS*>(this)->hasHeader("Date") ) return KDateTime();
> -    return (dynamic_cast<KMime::Headers::Date*>(
> -        const_cast<SMS*>(this)->getHeaderByType("Date"))
> -            )->dateTime();
> +    return (const_cast<SMS*>(this)->date() )->dateTime();
>  }

hasHeader() and friends should probably become const in kmime, so one can
avoid this ugly const_cast mess?

Regards,

Frank


More information about the kmobiletools mailing list