[Qt-interest] Strange (as for me) QByteArray behavior

Ivan Kharin korsar.akvis at gmail.com
Wed Dec 8 08:07:42 CET 2010


> QByteArray tmp = username.toAscii();

const QByteArray &tmp = username.toAscii(); // avoid copy: const ref to function result ==
                                            //   keep automatic variable intact until end of scope

-- 
Regards,
Ivan Kharin





More information about the Qt-interest-old mailing list