summaryrefslogtreecommitdiffstats
path: root/scroller
diff options
context:
space:
mode:
authorRobert Griebl <rgriebl@trolltech.com>2010-05-10 16:37:55 +0200
committerRobert Griebl <rgriebl@trolltech.com>2010-05-10 16:37:55 +0200
commitd00d11f9dcc0dbc966c4d2dca9ab0aab29c3671b (patch)
tree83c3f6c7bb283f62cd8da801caefc2f0ee144f01 /scroller
parent664a71ddc080111eed3d359e2770fb5c1979053e (diff)
a few minor fixes
Diffstat (limited to 'scroller')
-rw-r--r--scroller/qkineticscroller.cpp10
-rw-r--r--scroller/qkineticscroller_p.h2
-rw-r--r--scroller/scroller.pro2
3 files changed, 11 insertions, 3 deletions
diff --git a/scroller/qkineticscroller.cpp b/scroller/qkineticscroller.cpp
index 89a2202..b835efc 100644
--- a/scroller/qkineticscroller.cpp
+++ b/scroller/qkineticscroller.cpp
@@ -190,6 +190,7 @@ QKineticScrollerPrivate::QKineticScrollerPrivate()
, scrollToY(false)
, overshootX(false)
, overshootY(false)
+ , cancelPress(false)
, debugHook(0)
, debugHookUser(0)
{ }
@@ -653,6 +654,7 @@ bool QKineticScrollerPrivate::pressWhileInactive(QKineticScroller::Input, const
if (q->canStartScrollingAt(position)) {
lastPosition = pressPosition = position;
lastTimestamp = pressTimestamp = timestamp;
+ cancelPress = true;
setState(QKineticScroller::StatePressed);
}
}
@@ -699,7 +701,8 @@ bool QKineticScrollerPrivate::moveWhilePressed(QKineticScroller::Input, const QP
}
if (moveStarted) {
- q->cancelPress(pressPosition);
+ if (cancelPress)
+ q->cancelPress(pressPosition);
setState(QKineticScroller::StateDragging);
// subtract the dragStartDistance
@@ -804,8 +807,11 @@ void QKineticScrollerPrivate::timerEventWhileScrolling()
setState(QKineticScroller::StateInactive);
}
-bool QKineticScrollerPrivate::pressWhileScrolling(QKineticScroller::Input, const QPointF &, qint64)
+bool QKineticScrollerPrivate::pressWhileScrolling(QKineticScroller::Input, const QPointF &position, qint64 timestamp)
{
+ lastPosition = pressPosition = position;
+ lastTimestamp = pressTimestamp = timestamp;
+ cancelPress = false;
setState(QKineticScroller::StatePressed);
return true;
}
diff --git a/scroller/qkineticscroller_p.h b/scroller/qkineticscroller_p.h
index 83fc48c..6036beb 100644
--- a/scroller/qkineticscroller_p.h
+++ b/scroller/qkineticscroller_p.h
@@ -157,6 +157,8 @@ public:
qreal overshootStartTimeY;
int timerId;
+ bool cancelPress;
+
void (*debugHook)(void *user, const QPointF &releaseVelocity, const QPointF &position, const QPointF &overshootPosition);
void *debugHookUser;
diff --git a/scroller/scroller.pro b/scroller/scroller.pro
index fa44fbe..97a3ca7 100644
--- a/scroller/scroller.pro
+++ b/scroller/scroller.pro
@@ -3,7 +3,7 @@
######################################################################
TEMPLATE = lib
-CONFIG *= staticlib
+CONFIG *= staticlib create_prl
TARGET =
DEPENDPATH += .
INCLUDEPATH += .