summaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-07-22 17:04:56 +0200
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-07-23 11:46:40 +0200
commit1d5bc6d586445c477823e4f7fe03530634bf869d (patch)
treeb45225ee6198d2b054ad54b6002c4438607e3cf0 /src/imports
parentca92c8e4bf6d9bcd843d020c974c6e2ed515cf15 (diff)
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
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/gestures/qdeclarativegesturearea.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp
index a8f98f17b9..ed936d58ee 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));
}