aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2012-03-23 09:32:45 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-27 06:54:34 +0200
commitec7deb3d123bb44b5d57590615a60ed48b1d2860 (patch)
tree4b6e98a85cc2fece6ad3cad29090a1294e94cd55 /src/qml/qml/qqmlproperty.cpp
parentf931ec39513854e56560fe85d55a5d144e22af88 (diff)
Add QQmlBoundSignalNoParamsqt-v5.0.0-alpha1
This class is used for signal handlers with no parameters, and is more lightweight than QQmlBoundSignal. Change-Id: Ie63eb989d334906657fd16fe35386df198654c28 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r--src/qml/qml/qqmlproperty.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp
index ea7d624c2c..2d459421d9 100644
--- a/src/qml/qml/qqmlproperty.cpp
+++ b/src/qml/qml/qqmlproperty.cpp
@@ -970,7 +970,11 @@ QQmlPropertyPrivate::setSignalExpression(const QQmlProperty &that,
return signalHandler->setExpression(expr);
if (expr) {
- QQmlBoundSignal *signal = new QQmlBoundSignal(that.d->object, that.method(), that.d->object);
+ QQmlAbstractBoundSignal *signal = 0;
+ if (that.method().parameterTypes().count())
+ signal = new QQmlBoundSignal(that.d->object, that.method(), that.d->object);
+ else
+ signal = new QQmlBoundSignalNoParams(that.d->object, that.method(), that.d->object);
QQmlExpression *oldExpr = signal->setExpression(expr);
signal->addToObject();
return oldExpr;