QGraphicsItem device coordinate cache unefficient in portrait mode
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>
Wed, 6 Oct 2010 12:19:44 +0000 (14:19 +0200)
committerJason McDonald <jason.mcdonald@nokia.com>
Fri, 8 Oct 2010 03:29:16 +0000 (13:29 +1000)
commit000540cfd13bfdb7743fc5c9e931989ba982dbc0
treef61f837d77b9d2f57acc0b46087e9c3b7e53155d
parentb3ccb9f7b7795dab6520e7328c75537d58d08577
QGraphicsItem device coordinate cache unefficient in portrait mode

Problem was that we always invalidated the cache whenever the item was
rotated. This is however not required for simple rotations such as
90, 180 and 270 degrees. This commit also removes the somewhat arbitrary
logic which takes the desktop size into account. We now use the viewport
size instead.

Auto test included.

Task-number: QT-3779
Reviewed-by: yoann
(cherry picked from commit e84ab1fee7f44a28ee82793f83b0b27d04d28c09)
src/gui/graphicsview/qgraphicsscene.cpp
tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp