mer-qt/qtdeclarative — pull request #49 by giucam (2014-10-10 07:53:59+00:00)
Title: Return the content position rounded on the right side

QQuickFlickable::contentX/Y() returns the negative of the value
stored in the QQuickTimeLineValue used by QQuickFlickable.
So we must be careful when using things like qRound, and call it
with the negative of the value ine the QQuickTimeLineValue, else
code like this would fail:

QQuickFlickable *f = ...
f->setPixelAligned(true)
f->setContentY(-10.5)
assert(f->contentY() == qRound(-10.5)) // fail

The assert expression indeed turns into -11 == -10, which is false
but which is not what the user would expect.

Change-Id: Ib92ee2fa613b751462237349d9e4e2f2b4652f82
Reviewed-by: Martin Jones