Use the QStringBuilder API to save allocations

Change-Id: Iae2b08715157325f031f1c08b393cd682908029f
Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Frank Meerkoetter 2016-05-09 22:31:42 +02:00
parent 5046012e07
commit 2e950afe90
1 changed files with 2 additions and 4 deletions

View File

@ -758,10 +758,8 @@ bool QQmlEngineDebugServiceImpl::setMethodBody(int objectId, const QString &meth
paramStr.append(QString::fromUtf8(paramNames.at(ii)));
}
QString jsfunction = QLatin1String("(function ") + method + QLatin1Char('(') + paramStr +
QLatin1String(") {");
jsfunction += body;
jsfunction += QLatin1String("\n})");
const QString jsfunction = QLatin1String("(function ") + method + QLatin1Char('(') + paramStr +
QLatin1String(") {") + body + QLatin1String("\n})");
QQmlVMEMetaObject *vmeMetaObject = QQmlVMEMetaObject::get(object);
Q_ASSERT(vmeMetaObject); // the fact we found the property above should guarentee this