[Development] QLatin1Constant and QtContacts / QtOrganizer

Harald Fernengel harald.fernengel at nokia.com
Tue Dec 20 15:54:17 CET 2011


Hi,

On Tuesday 20 December 2011 15:41:46 ext Thiago Macieira wrote:
> On Tuesday, 20 de December de 2011 13.37.54, harald.fernengel at nokia.com 
wrote:
> > Hi,
> > 
> > > The difference is that QLatin1String will make an inline call to
> > > strlen(latin1data), which the compiler may be able to optimise. Then
> > > again, we could make the same in QString::fromLatin1... any takers?
> > 
> > review?
> > 
> > http://codereview.qt-project.org/#change,11530
> 
> Done. The same could be done for QString::fromUtf8.

I thought about optimizing ::fromUtf8, but since we need to iterate character 
by character to convert the char* to utf16, the length of the string should be 
rather irrelevant?

Harald



More information about the Development mailing list