aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorSérgio Martins <sergio.martins@kdab.com>2015-08-12 13:17:58 +0100
committerSérgio Martins <sergio.martins@kdab.com>2015-08-13 16:11:48 +0000
commitb5572010798198de7b58ca3b905cb2691a316d1a (patch)
treeb15505115ab0f68fcb6defd338c28a673af8ad65 /src/qml/qml/qqmlengine.cpp
parentfbdc01f141a4ec4e6fc78ea69d86ff7aa128bf72 (diff)
qml: Avoid heap allocations due to QString::fromLatin1()
By using QStringLiteral when the argument is a literal. Change-Id: Ib25042d10f3d9d0aca81af74cde0107aba4f9432 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index df5f50644c..70c682dedd 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1638,7 +1638,7 @@ void QQmlData::destroyed(QObject *object)
if (location.sourceFile.isEmpty())
location.sourceFile = QStringLiteral("<Unknown File>");
locationString.append(location.sourceFile);
- locationString.append(QString::fromLatin1(":%0: ").arg(location.line));
+ locationString.append(QStringLiteral(":%0: ").arg(location.line));
QString source = expr->expression();
if (source.size() > 100) {
source.truncate(96);