[Development] QLatin1Constant and QtContacts / QtOrganizer
lars.knoll at nokia.com
lars.knoll at nokia.com
Tue Jan 10 11:22:58 CET 2012
On 1/10/12 6:39 AM, "ext Stephen Kelly" <stephen.kelly at kdab.com> wrote:
>On Tuesday, December 20, 2011 10:17:20 Thiago Macieira wrote:
>> str = QString::fromLatin1("%1 %2").arg(foo, bar);
>> reason: QString::fromLatin1 will need to allocate memory
>> use: QStringLiteral
>
>I looked into QStringLiteral by the way. It has no arg() methods, so if
>you are suggesting
>
>str = QStringLiteral("%1 %2").arg(foo, bar);
>
>that won't work.
>
>Are you suggesting
>
>str = QString(QStringLiteral("%1 %2")).arg(foo, bar);
>
>or so?
Yes, that's the correct way.
Lars
More information about the Development
mailing list