Skip to content

Instantly share code, notes, and snippets.

@bbandix
Created November 22, 2011 13:10
Show Gist options
  • Save bbandix/1385634 to your computer and use it in GitHub Desktop.
Save bbandix/1385634 to your computer and use it in GitHub Desktop.
diff --git a/src/declarative/items/qquickflickable.cpp b/src/declarative/items/qquickflickable.cpp
index 6554720..443ecf6 100644
--- a/src/declarative/items/qquickflickable.cpp
+++ b/src/declarative/items/qquickflickable.cpp
@@ -1640,6 +1640,14 @@ void QQuickFlickable::mouseUngrabEvent()
}
}
+void QQuickFlickable::handleInput(QMouseEvent *event, qint64 eventTimestampMillis)
+{
+ Q_D(QQuickFlickable);
+ // Set the next timestamp before handling the custom event
+ d->setConsistentTime(eventTimestampMillis);
+ sendMouseEvent(event);
+}
+
bool QQuickFlickable::sendMouseEvent(QMouseEvent *event)
{
Q_D(QQuickFlickable);
diff --git a/src/declarative/items/qquickflickable_p.h b/src/declarative/items/qquickflickable_p.h
index fe4ac40..2877352 100644
--- a/src/declarative/items/qquickflickable_p.h
+++ b/src/declarative/items/qquickflickable_p.h
@@ -253,6 +253,7 @@ protected:
virtual void geometryChanged(const QRectF &newGeometry,
const QRectF &oldGeometry);
void mouseUngrabEvent();
+ void handleInput(QMouseEvent *event, qint64 eventTimestampMillis);
bool sendMouseEvent(QMouseEvent *event);
bool xflick() const;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment