summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-10-08 14:17:58 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-10-08 14:17:58 (GMT)
commitdb1162da76f1d257ba9bfcaef574275e7430385f (patch)
tree99536ef3ca85b6e0f395dd17408836f9dd9029a4
parent6a19047295169b8c563ad6bc42b3f783449c7521 (diff)
downloadQt-db1162da76f1d257ba9bfcaef574275e7430385f.zip
Qt-db1162da76f1d257ba9bfcaef574275e7430385f.tar.gz
Qt-db1162da76f1d257ba9bfcaef574275e7430385f.tar.bz2
Rename identifyNonFloatItems -> identifyFloatItems.
We changed the behaviour of that, so the name should reflect that.
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.cpp14
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout_p.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
index 2b3e405..f9b5c8c 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -275,8 +275,8 @@ static qreal getFactor(qreal value, qreal min, qreal pref, qreal max)
}
}
-static qreal getExpandingFactor(qreal expSize, qreal sizeAtPreferred,
- qreal sizeAtExpanding, qreal sizeAtMaximum)
+static qreal getExpandingFactor(const qreal &expSize, const qreal &sizeAtPreferred,
+ const qreal &sizeAtExpanding, const qreal &sizeAtMaximum)
{
const qreal lower = qMin(sizeAtPreferred, sizeAtMaximum);
const qreal upper = qMax(sizeAtPreferred, sizeAtMaximum);
@@ -1842,10 +1842,10 @@ void QGraphicsAnchorLayoutPrivate::findPaths(Orientation orientation)
}
}
- // We will walk through every reachable items (non-float) and mark them
- // by keeping their references on m_nonFloatItems. With this we can easily
- // identify non-float and float items.
- identifyNonFloatItems(visited, orientation);
+ // We will walk through every reachable items (non-float) store them in a temporary set.
+ // We them create a set of all items and subtract the non-floating items from the set in
+ // order to get the floating items. The floating items is then stored in m_floatItems
+ identifyFloatItems(visited, orientation);
}
/*!
@@ -2008,7 +2008,7 @@ QGraphicsAnchorLayoutPrivate::getGraphParts(Orientation orientation)
Use all visited Anchors on findPaths() so we can identify non-float Items.
*/
-void QGraphicsAnchorLayoutPrivate::identifyNonFloatItems(const QSet<AnchorData *> &visited, Orientation orientation)
+void QGraphicsAnchorLayoutPrivate::identifyFloatItems(const QSet<AnchorData *> &visited, Orientation orientation)
{
QSet<QGraphicsLayoutItem *> nonFloating;
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
index 0f045e5..9ac0e19 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h
@@ -443,7 +443,7 @@ public:
void constraintsFromPaths(Orientation orientation);
QList<QSimplexConstraint *> constraintsFromSizeHints(const QList<AnchorData *> &anchors);
QList<QList<QSimplexConstraint *> > getGraphParts(Orientation orientation);
- void identifyNonFloatItems(const QSet<AnchorData *> &visited, Orientation orientation);
+ void identifyFloatItems(const QSet<AnchorData *> &visited, Orientation orientation);
void identifyNonFloatItems_helper(const AnchorData *ad, QSet<QGraphicsLayoutItem *> *nonFloatingItemsIdentifiedSoFar);
inline AnchorVertex *internalVertex(const QPair<QGraphicsLayoutItem*, Qt::AnchorPoint> &itemEdge) const