diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-08-23 13:15:51 +0300 |
---|---|---|
committer | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-09-08 18:18:29 +0000 |
commit | 798b6ba239f59f7b3ed36b3c2cf10955a7bdffcb (patch) | |
tree | c6b507624aec85b73be11fd95ea9eab14a5b05b8 /src/qmltest | |
parent | 65c7ddd9dd0c86bb532b6a2ad979141a8f24dfea (diff) |
optimize string usage: use fromLatin1() less
.. to reduce allocations.
Replace fromLatin1 with QLatin1String or
with QStringBuilder where it is possible.
Change-Id: I09c7242fa7b118447b51239e2a6743a34fb3de14
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qmltest')
-rw-r--r-- | src/qmltest/quicktestresult.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp index e05d29bc05..d311e7810e 100644 --- a/src/qmltest/quicktestresult.cpp +++ b/src/qmltest/quicktestresult.cpp @@ -519,7 +519,7 @@ void QuickTestResult::stringify(QQmlV4Function *args) if (result.isEmpty()) { QString tmp = value->toQStringNoThrow(); if (value->as<QV4::ArrayObject>()) - result.append(QString::fromLatin1("[%1]").arg(tmp)); + result += QLatin1Char('[') + tmp + QLatin1Char(']'); else result.append(tmp); } |