From d8131513b07d3f0a6d749c9961b294fc955fed6d Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 14 Jan 2015 12:50:34 +0100 Subject: Add C++11 move operators, and a simpler internal constructor Move semantics should optimize some copy operations on QJSValues, and the internal constructor will simplify refactoring the QJSValue class to get rid of the extra allocated private. Change-Id: I24863b30523af2432aa81ad6b87fda7fe35749c4 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlproperty.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/qml') diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp index a4c46a1705..abdb938e52 100644 --- a/src/qml/qml/qqmlproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -1550,7 +1550,7 @@ bool QQmlPropertyPrivate::writeBinding(QObject *object, return false; } writeValueProperty(object, core, QVariant::fromValue( - QJSValue(new QJSValuePrivate(QV8Engine::getV4(v8engine), result))), + QJSValue(QV8Engine::getV4(v8engine), result.asReturnedValue())), context, flags); } else if (isUndefined) { QString errorStr = QLatin1String("Unable to assign [undefined] to "); -- cgit v1.2.3