summaryrefslogtreecommitdiffstats
path: root/examples/network
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-01-29 15:44:12 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-02-01 13:13:43 (GMT)
commite0fda52fde32458c4a42f04bd62b5e37f14c4bfd (patch)
treedf8154a8878f767c87a5cae8ad9d1dc4e17ebffd /examples/network
parent45591e13862963fb29c13e0c5bfe39330883c579 (diff)
downloadQt-e0fda52fde32458c4a42f04bd62b5e37f14c4bfd.zip
Qt-e0fda52fde32458c4a42f04bd62b5e37f14c4bfd.tar.gz
Qt-e0fda52fde32458c4a42f04bd62b5e37f14c4bfd.tar.bz2
optimization: get rid of QString::fromUtf16() usage
QString::fromUtf16() is slow - it does a BOM check and optionally byte swapping, which is utterly pointless when converting internal data structures which are raw utf16 in host byte order anyway. so replace it with QString::fromRawData() (for short-lived strings) or QString(const QChar *, int) (otherwise) if possible. Reviewed-by: axis Reviewed-by: mariusSO Reviewed-by: Bill King
Diffstat (limited to 'examples/network')
-rw-r--r--examples/network/qftp/sym_iap_util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/network/qftp/sym_iap_util.h b/examples/network/qftp/sym_iap_util.h
index 8079d2c..41e43a9 100644
--- a/examples/network/qftp/sym_iap_util.h
+++ b/examples/network/qftp/sym_iap_util.h
@@ -298,7 +298,7 @@ QString qt_TDesC2QStringL(const TDesC& aDescriptor)
#ifdef QT_NO_UNICODE
return QString::fromLocal8Bit(aDescriptor.Ptr(), aDescriptor.Length());
#else
- return QString::fromUtf16(aDescriptor.Ptr(), aDescriptor.Length());
+ return QString((const QChar *)aDescriptor.Ptr(), aDescriptor.Length());
#endif
}