[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdepim/plugins/kmail/bodypartformatter
From:       Ingo =?utf-8?q?Kl=C3=B6cker?= <kloecker () kde ! org>
Date:       2008-02-16 23:44:00
Message-ID: 200802170044.01200 () erwin ! ingo-kloecker ! de
[Download RAW message or body]


On Saturday 16 February 2008, Till Adam wrote:
> +         const QString addedLineStyle( "style=\"" "color: green;\"" );

Why is this a QString while everything else is a QLatin1String?

And wouldn't it make sense to make those static const so that they are 
constructed only once? I guess it doesn't really matter because the 
c'tor of QLatin1String is dead-cheap, but it might serve as example for 
other usages of constants.

> +         const QLatin1String fileAddStyle( "style=\"font-weight: bold;
> " "color: green; \"" ); 
[snip]
> +         const QLatin1String removedLineStyle( "style=\"" "color:
> red;\"" );
> +         const QLatin1String fileRemoveStyle( 
> "style=\"font-weight: bold; " "color: red ;\"" );


Regards,
Ingo

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic