On Tuesday, 20 de December de 2011 13.37.54, [email protected] 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 have some thoughts on improving the conversion code, as we've said before we
wanted the QString "const char*" methods to convert using UTF-8 instead of
Qt2-compat fromAscii. If we do that, those methods should be inlined as well
so the string length could be calculated by the compiler.
Also note that C++11's u8"Literal string" produces a "const char *". There is
no char type for UTF-8, like UTF-16 and UTF-32.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
