summaryrefslogtreecommitdiff
path: root/src/gui/graphicsview/qgraphicssceneindex.cpp
diff options
context:
space:
mode:
authorLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-01-28 18:09:39 +0100
committerLeonardo Sobral Cunha <leo.cunha@nokia.com>2010-01-29 17:25:08 +0100
commit519760c4256997f26c039cb4b047c6207470b54f (patch)
treefdfd386e09caa36e11b95d69bd60d2d54b6c6754 /src/gui/graphicsview/qgraphicssceneindex.cpp
parent4a5e81f5320daa82352b13e670718998b0d2d23b (diff)
downloadqt4-tools-519760c4256997f26c039cb4b047c6207470b54f.tar.gz
Adds convenience functions QGraphicsItemPrivate::isOpacityNull
This should unify the error constant used along the code and enforce qreal to avoid unnecessary double conversions. Reviewed-by: bnilsen
Diffstat (limited to 'src/gui/graphicsview/qgraphicssceneindex.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicssceneindex.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicssceneindex.cpp b/src/gui/graphicsview/qgraphicssceneindex.cpp
index 043c4eb813..707c71f3e3 100644
--- a/src/gui/graphicsview/qgraphicssceneindex.cpp
+++ b/src/gui/graphicsview/qgraphicssceneindex.cpp
@@ -279,7 +279,7 @@ void QGraphicsSceneIndexPrivate::recursive_items_helper(QGraphicsItem *item, QRe
return;
const qreal opacity = item->d_ptr->combineOpacityFromParent(parentOpacity);
- const bool itemIsFullyTransparent = (opacity < 0.0001);
+ const bool itemIsFullyTransparent = QGraphicsItemPrivate::isOpacityNull(opacity);
const bool itemHasChildren = !item->d_ptr->children.isEmpty();
if (itemIsFullyTransparent && (!itemHasChildren || item->d_ptr->childrenCombineOpacity()))
return;
@@ -554,7 +554,7 @@ QList<QGraphicsItem *> QGraphicsSceneIndex::estimateTopLevelItems(const QRectF &
/*!
\fn QList<QGraphicsItem *> QGraphicsSceneIndex::items(Qt::SortOrder order = Qt::DescendingOrder) const
-
+
This pure virtual function all items in the index and sort them using
\a order.
*/