summaryrefslogtreecommitdiff
path: root/src/scripttools/debugging/qscriptdebuggercodewidgetinterface.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2011-04-27 15:53:28 +0200
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2011-04-27 16:49:22 +0200
commitfeabda665de62a0f6a82d831b45926697f30b45b (patch)
treebef0c40e7e6043130532b60060bd835e06784634 /src/scripttools/debugging/qscriptdebuggercodewidgetinterface.cpp
parent4671c273edb87e55436dd3bf0b371267c5e34ff7 (diff)
downloadqt4-tools-feabda665de62a0f6a82d831b45926697f30b45b.tar.gz
Added QStringRef::toLatin1 and QStringRef::toUtf8
These helper functions make it convenient to avoid making an unnecessary copy of the string before converting it to a QByteArray. The current most obvious way to do this would be: // QStringRef text QByteArray latin1 = text.toString().toLatin1(); Though the copy can also be avoided by doing: const QString textData = QString::fromRawData(text.unicode(), text.size()); QByteArray latin1 = textData.toLatin1(); Now the faster method can be achieved using the new obvious way: QByteArray latin1 = text.toLatin1(); Reviewed-by: Thiago Macieira Reviewed-by: Robin Burchell
Diffstat (limited to 'src/scripttools/debugging/qscriptdebuggercodewidgetinterface.cpp')
0 files changed, 0 insertions, 0 deletions