From 3dfd47362fea05bc354f814b5b743856f5ce7462 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 8 Apr 2016 15:20:23 +0200 Subject: QML: Specialize bindings based on target property type. When we can determine the type of a target property during type compilation, we can skip a whole bunch of code that deals with converting the result of a binding to the correct (target) type. This removes 65 instructions on x86 for such typed bindings. Change-Id: Id2c7c57b9ae6dfbeb921121beae9630604ca1d17 Reviewed-by: Simon Hausmann --- src/quick/qtquick2.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/quick/qtquick2.cpp') diff --git a/src/quick/qtquick2.cpp b/src/quick/qtquick2.cpp index 41e30a1110..bf5b0083e9 100644 --- a/src/quick/qtquick2.cpp +++ b/src/quick/qtquick2.cpp @@ -136,9 +136,10 @@ void QQmlQtQuick2DebugStatesDelegate::updateBinding(QQmlContext *context, QQmlBinding *newBinding = 0; if (!isLiteralValue) { - newBinding = new QQmlBinding(expression.toString(), object, - QQmlContextData::get(context), fileName, - line, column); + newBinding = QQmlBinding::create(&QQmlPropertyPrivate::get(property)->core, + expression.toString(), object, + QQmlContextData::get(context), fileName, + line, column); newBinding->setTarget(property); } -- cgit v1.2.3