diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-07-22 15:04:56 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-07-23 09:46:40 (GMT) |
commit | 1d5bc6d586445c477823e4f7fe03530634bf869d (patch) | |
tree | b45225ee6198d2b054ad54b6002c4438607e3cf0 /src/imports/gestures/qdeclarativegesturearea.cpp | |
parent | ca92c8e4bf6d9bcd843d020c974c6e2ed515cf15 (diff) | |
download | Qt-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/qdeclarativegesturearea.cpp')
-rw-r--r-- | src/imports/gestures/qdeclarativegesturearea.cpp | 2 |
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)); } |