aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlxmlhttprequest.cpp
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-07-20 14:23:59 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-08-09 18:00:36 +0000
commitb11421394b4745253a046461234906feb9c811dc (patch)
tree6c7770fd9c161e44eb3de44de96e6d797f04e2ea /src/qml/qml/qqmlxmlhttprequest.cpp
parent4fbfbf7fe8e6f8f31b5704a0f8f55415a7284523 (diff)
Qml: optimize string usage
Use QStringBuilder more. Use QString::asprintf instead of arg()'s chain. Use += operator to reserve extra capacity for possible free following append/prepend/+= call. Change-Id: Ib65398b91566994339d2c4bbfaf94e49806b7471 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlxmlhttprequest.cpp')
-rw-r--r--src/qml/qml/qqmlxmlhttprequest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp
index 14c12c2542..58ffab9ec9 100644
--- a/src/qml/qml/qqmlxmlhttprequest.cpp
+++ b/src/qml/qml/qqmlxmlhttprequest.cpp
@@ -1162,8 +1162,8 @@ QString QQmlXMLHttpRequest::headers() const
foreach (const HeaderPair &header, m_headersList) {
if (ret.length())
ret.append(QLatin1String("\r\n"));
- ret = ret % QString::fromUtf8(header.first) % QLatin1String(": ")
- % QString::fromUtf8(header.second);
+ ret += QString::fromUtf8(header.first) + QLatin1String(": ")
+ + QString::fromUtf8(header.second);
}
return ret;
}