On 1/10/12 6:39 AM, "ext Stephen Kelly" <[email protected]> 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

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to