[Development] Deprecating QString::{v,}sprintf()

jan-arve.saether at nokia.com jan-arve.saether at nokia.com
Tue Feb 21 16:58:25 CET 2012


Sorry for top-posting again...

I'm not sure I understand. The code that Marc fixed mostly needed to pay the penalty of converting the QString to a QByteArray. For the majority of the other cases, the code should have used tr().arg().


The code in qmake was however an exception, since it works with QStrings instead of byte arrays. That could serve as a counter argument...

I'm not sure why qmake needs to work with QStrings though..


Jan-Arve


21.02.12 16:39 skrev ext Robin Burchell:

On Tue, Feb 21, 2012 at 3:20 PM, <jan-arve.saether at nokia.com> wrote:
> Is there any reason why we cannot move QString::asprintf() to QByteArray::asprintf() instead?

If your data is already in a QString, you're going to pay a rather
large penalty to copy it all to a byte array just to use that, and
then convert it back.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120221/76a1e917/attachment.html>


More information about the Development mailing list