diff options
Diffstat (limited to 'src/imports/gestures/qdeclarativegesturearea.cpp')
-rw-r--r-- | src/imports/gestures/qdeclarativegesturearea.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp index 243ba0f..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)); } @@ -261,7 +261,10 @@ bool QDeclarativeGestureAreaPrivate::gestureEvent(QGestureEvent *event) bool accept = true; for (Bindings::Iterator it = bindings.begin(); it != bindings.end(); ++it) { if ((gesture = event->gesture(it.key()))) { - it.value()->evaluate(); + QDeclarativeExpression *expr = it.value(); + expr->evaluate(); + if (expr->hasError()) + qmlInfo(q_func()) << expr->error(); event->setAccepted(true); // XXX only if value returns true? } } |