summaryrefslogtreecommitdiffstats
path: root/src/xml/sax/qxml.cpp
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2012-02-23 07:43:30 +0100
committerQt by Nokia <[email protected]>2012-02-23 14:57:06 +0100
commitc951908bc201afa59402967d50fa926212845fae (patch)
treeee27aa3fca4ace7c3dfe63c7bcbae06e9c0cdc1c /src/xml/sax/qxml.cpp
parent949b7452e0d2402a3ba046a5ba1fe043b670baaa (diff)
QString: add from{Ascii,Latin1,Utf8,Local8Bit() overloads for QByteArray
One of the more frequent uses for QByteArray::operator const char*() is in passing a QByteArray to QString::fromLatin1(). But this is highly inefficient, since the bytearray already knows its size, but since its demoted to a const char* in passing to fromLatin1(), it forces the latter to call strlen() _again_. The solution, then, is to add overloads for QByteArray that pass the array's .size() as a second argument to the two-arg fromLatin1() version. Change-Id: I5ea1ad3c96d9e64167be53c0c418c7b7dba51f68 Reviewed-by: David Faure <[email protected]> Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/xml/sax/qxml.cpp')
0 files changed, 0 insertions, 0 deletions