diff options
Diffstat (limited to 'scroller/qkineticscroller.cpp')
-rw-r--r-- | scroller/qkineticscroller.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scroller/qkineticscroller.cpp b/scroller/qkineticscroller.cpp index 75556a4..e031ec1 100644 --- a/scroller/qkineticscroller.cpp +++ b/scroller/qkineticscroller.cpp @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); -#define KINETIC_SCROLLER_DEBUG +// #define KINETIC_SCROLLER_DEBUG #ifdef KINETIC_SCROLLER_DEBUG # define qKSDebug qDebug @@ -339,7 +339,6 @@ bool QKineticScroller::handleInput(Input input, const QPointF &position, qint64 { Q_D(QKineticScroller); - qKSDebug() << "QKS::handleInput(" << input << ", " << position << ", " << timestamp << ")"; struct statechange { State state; @@ -361,7 +360,7 @@ bool QKineticScroller::handleInput(Input input, const QPointF &position, qint64 statechange *sc = statechanges + i; if (d->state == sc->state && input == sc->input) - return (d->*sc->handler)(input, position, timestamp); + return (d->*sc->handler)(input, position - d->overshootPosition, timestamp); } qWarning() << "Unhandled input: got input " << d->inputName(input) << " while in state " << d->stateName(d->state); @@ -655,10 +654,9 @@ void QKineticScrollerPrivate::handleDrag(const QPointF &position, qint64 timesta bool QKineticScrollerPrivate::pressWhileInactive(QKineticScroller::Input, const QPointF &position, qint64 timestamp) { QScrollPrepareEvent spe(position); - qDebug() << "Sending prepare event to "<<receiver; sendEvent(receiver, &spe); - qDebug() << "Returned with "<<spe.isAccepted()<<"for"<<spe.target(); + qKSDebug() << "QScrollPrepareEvent returned with "<<spe.isAccepted()<<"for"<<spe.target(); if (spe.isAccepted() && spe.target()) { target = spe.target(); viewportSize = spe.viewportSize(); |