diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-22 01:39:22 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-02-22 01:39:22 (GMT) |
commit | f595c880cf68225d300547d31f13cf9520be3846 (patch) | |
tree | 8ba6d4f77b4dd8602ef82128d44ca6bec11f49fe /src/declarative/graphicsitems/qmlgraphicspathview.cpp | |
parent | 01498eb9a44f3b15e517e81b309087fbbf1b93bf (diff) | |
download | Qt-f595c880cf68225d300547d31f13cf9520be3846.zip Qt-f595c880cf68225d300547d31f13cf9520be3846.tar.gz Qt-f595c880cf68225d300547d31f13cf9520be3846.tar.bz2 |
Fix compile error on Solaris
QTBUG-8267. Remove templating from QmlTimeLineEvent class (and rename
it to QmlTimeLineCallback to more represent what it is).
Diffstat (limited to 'src/declarative/graphicsitems/qmlgraphicspathview.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicspathview.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicspathview.cpp b/src/declarative/graphicsitems/qmlgraphicspathview.cpp index f862555..aba184d 100644 --- a/src/declarative/graphicsitems/qmlgraphicspathview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicspathview.cpp @@ -524,7 +524,7 @@ void QmlGraphicsPathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *) qreal dist = qAbs(velocity/2 - qmlMod(velocity/2, qreal(100.0 / d->model->count()) - inc)); d->moveOffset.setValue(d->_offset); d->tl.accel(d->moveOffset, velocity, 10, dist); - d->tl.execute(d->fixupOffsetEvent); + d->tl.callback(QmlTimeLineCallback(&d->moveOffset, d->fixOffsetCallback, d)); } else { d->fixOffset(); } @@ -886,6 +886,11 @@ void QmlGraphicsPathViewPrivate::updateCurrent() } } +void QmlGraphicsPathViewPrivate::fixOffsetCallback(void *d) +{ + ((QmlGraphicsPathViewPrivate *)d)->fixOffset(); +} + void QmlGraphicsPathViewPrivate::fixOffset() { Q_Q(QmlGraphicsPathView); @@ -938,7 +943,7 @@ void QmlGraphicsPathViewPrivate::snapToCurrent() rounds++; tl.move(moveOffset, targetOffset + 100.0*(-rounds), QEasingCurve(QEasingCurve::InOutQuad), int(100*items.count()*qMax((qreal)(2.0/items.count()),(qreal)qAbs(rounds)))); - tl.execute(fixupOffsetEvent); + tl.callback(QmlTimeLineCallback(&moveOffset, fixOffsetCallback, this)); return; } |