diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-04-17 12:01:59 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-04-17 12:06:39 (GMT) |
commit | 4527bb90539f36dc5f0613f402049876f5089087 (patch) | |
tree | 2a87fc26073bf47d30887e19366f91064a1c3012 /src/dbus/qdbusargument_p.h | |
parent | 160252d5d1facf2a53af1314836f22fb00784625 (diff) | |
download | Qt-4527bb90539f36dc5f0613f402049876f5089087.zip Qt-4527bb90539f36dc5f0613f402049876f5089087.tar.gz Qt-4527bb90539f36dc5f0613f402049876f5089087.tar.bz2 |
Fix QGraphicsView::mapToScene(QRect) to avoid extra adjustments.
The QGraphicsView::mapToScene(QRect) function assumes that QRect and
QRectF share semantics for ::bottomRight(). However, since QRect follows
Qt 3 semantics (the rect is based on viewport pixels and (0,0,1,1) is
equivalent to one pixel, topleft = bottomright), this function gives
unexpected behavior: map(0,0,1,1) gives you an empty polygon! To work
around this, users of the function need to adjust their rectangles
with (0,0,1,1) to get the correct behavior, matching what QRectF does.
QRectF(0,0,1,1).bottomRight() == QPointF(1,1)
QRect(0,0,1,1).bottomRight() == QPoint(0,0)
Reviewed-by: TrustMe
Diffstat (limited to 'src/dbus/qdbusargument_p.h')
0 files changed, 0 insertions, 0 deletions