summaryrefslogtreecommitdiffstats
path: root/src/imports/gestures
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-07-22 15:04:56 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-07-23 09:46:40 (GMT)
commit1d5bc6d586445c477823e4f7fe03530634bf869d (patch)
treeb45225ee6198d2b054ad54b6002c4438607e3cf0 /src/imports/gestures
parentca92c8e4bf6d9bcd843d020c974c6e2ed515cf15 (diff)
downloadQt-1d5bc6d586445c477823e4f7fe03530634bf869d.zip
Qt-1d5bc6d586445c477823e4f7fe03530634bf869d.tar.gz
Qt-1d5bc6d586445c477823e4f7fe03530634bf869d.tar.bz2
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/gestures')
-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 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));
}