diff options
author | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-07 14:50:23 (GMT) |
---|---|---|
committer | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-08 08:24:38 (GMT) |
commit | 72f84ad17d0905f91e9d3988bb0f6482df6c6c78 (patch) | |
tree | fa1c345ee0d052db81733659f9fcdc161ede0b95 /src/gui/graphicsview | |
parent | 6fd4a720870775a4d9a645d9000b0259caa74178 (diff) | |
download | Qt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.zip Qt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.tar.gz Qt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.tar.bz2 |
Use qIsFuzzyNull rather than the more expensive qFuzzyCompare
See also fde7f3d03782c801901f511131458d6fcb1021a5
Reviewed-by: Olivier
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index b8ff5b4..0d846d9 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -4091,7 +4091,7 @@ void QGraphicsItem::scroll(qreal dx, qreal dy, const QRectF &rect) return; if (d->cacheMode != NoCache) { QGraphicsItemCache *c; - bool scrollCache = qFuzzyCompare(dx - int(dx), qreal(0.0)) && qFuzzyCompare(dy - int(dy), qreal(0.0)) + bool scrollCache = qIsFuzzyNull(dx - int(dx)) && qIsFuzzyNull(dy - int(dy)) && (c = (QGraphicsItemCache *)qVariantValue<void *>(d_ptr->extra(QGraphicsItemPrivate::ExtraCacheData))) && (d->cacheMode == ItemCoordinateCache && !c->fixedSize.isValid()); if (scrollCache) { |