From 1d5bc6d586445c477823e4f7fe03530634bf869d Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Thu, 22 Jul 2010 17:04:56 +0200 Subject: Fixed the scope when evaluating GestureArea javascript expressions In the QML gesture example we access properties of the gesture by just accessing the "gesture" property, which is in fact in a GestureArea. To make it work I've set the GestureArea as a scope of the evaluated javascript expression. Reviewed-by: Warwick Allison --- src/imports/gestures/qdeclarativegesturearea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp index a8f98f1..ed936d5 100644 --- a/src/imports/gestures/qdeclarativegesturearea.cpp +++ b/src/imports/gestures/qdeclarativegesturearea.cpp @@ -228,7 +228,7 @@ void QDeclarativeGestureArea::connectSignals() ds >> gesturetype; QString script; ds >> script; - QDeclarativeExpression *exp = new QDeclarativeExpression(qmlContext(this), 0, script); + QDeclarativeExpression *exp = new QDeclarativeExpression(qmlContext(this), this, script); d->bindings.insert(Qt::GestureType(gesturetype),exp); grabGesture(Qt::GestureType(gesturetype)); } -- cgit v0.12