diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-07-20 14:23:59 +0300 |
---|---|---|
committer | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-08-09 18:00:36 +0000 |
commit | b11421394b4745253a046461234906feb9c811dc (patch) | |
tree | 6c7770fd9c161e44eb3de44de96e6d797f04e2ea /src/qml/qml/qqmlvmemetaobject.cpp | |
parent | 4fbfbf7fe8e6f8f31b5704a0f8f55415a7284523 (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/qqmlvmemetaobject.cpp')
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 81bc6846e6..47c125355b 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -932,10 +932,10 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * // are not rewritten correctly but this bug is deemed out-of-scope to fix for // performance reasons; see QTBUG-24064) and thus compilation will have failed. QQmlError e; - e.setDescription(QString::fromLatin1("Exception occurred during compilation of " - "function: %1") - .arg(QString::fromUtf8(QMetaObject::method(_id) - .methodSignature()))); + e.setDescription(QLatin1String("Exception occurred during compilation of " + "function: ") + + QString::fromUtf8(QMetaObject::method(_id) + .methodSignature())); ep->warning(e); return -1; // The dynamic method with that id is not available. } |