diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-08-03 10:53:57 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-08-03 10:53:57 (GMT) |
commit | d5491ecdde14659a913c9f476f18c45f1d9489bb (patch) | |
tree | 06cc52249feda9bd9e50ca47abb8ebd676c8a309 /src/imports/gestures/qdeclarativegesturearea.cpp | |
parent | 42cdfaf86d34afeb6448723839fef70fe477deed (diff) | |
parent | a41128af5373a0225c3548abd3eb82cd7e8f7a0e (diff) | |
download | Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.zip Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.gz Qt-d5491ecdde14659a913c9f476f18c45f1d9489bb.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into lighthouse
Conflicts:
configure
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? } } |