aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlerror.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/qqmlerror.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/qqmlerror.cpp')
-rw-r--r--src/qml/qml/qqmlerror.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlerror.cpp b/src/qml/qml/qqmlerror.cpp
index 74ceeabeb4..b309550ca8 100644
--- a/src/qml/qml/qqmlerror.cpp
+++ b/src/qml/qml/qqmlerror.cpp
@@ -249,9 +249,9 @@ QString QQmlError::toString() const
int l(line());
if (u.isEmpty() || (u.isLocalFile() && u.path().isEmpty()))
- rv = QLatin1String("<Unknown File>");
+ rv += QLatin1String("<Unknown File>");
else
- rv = u.toString();
+ rv += u.toString();
if (l != -1) {
rv += QLatin1Char(':') + QString::number(l);