aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/testtypes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmllanguage/testtypes.cpp')
-rw-r--r--tests/auto/qml/qqmllanguage/testtypes.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmllanguage/testtypes.cpp b/tests/auto/qml/qqmllanguage/testtypes.cpp
index 908600784e..3921f89d23 100644
--- a/tests/auto/qml/qqmllanguage/testtypes.cpp
+++ b/tests/auto/qml/qqmllanguage/testtypes.cpp
@@ -129,9 +129,10 @@ void CustomBinding::componentComplete()
QV4::Scope scope(QQmlEnginePrivate::getV4Engine(qmlEngine(this)));
QV4::ScopedValue function(scope, QV4::FunctionObject::createQmlFunction(context, m_target, compilationUnit->runtimeFunctions[bindingId]));
- QQmlBinding *qmlBinding = new QQmlBinding(function, m_target, context);
QQmlProperty property(m_target, name, qmlContext(this));
+ QQmlBinding *qmlBinding = QQmlBinding::create(&QQmlPropertyPrivate::get(property)->core,
+ function, m_target, context);
qmlBinding->setTarget(property);
QQmlPropertyPrivate::setBinding(property, qmlBinding);
}