diff options
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp index 53db11d2d7..4c01219d87 100644 --- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp @@ -1082,7 +1082,7 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP if (candidates.isEmpty()) after = (beforeSequence == adjacents.last() ? adjacents.first() : adjacents.last()); else - after = (candidates.last() == adjacents.last() ? adjacents.first() : adjacents.last()); + after = (candidates.constLast() == adjacents.last() ? adjacents.first() : adjacents.last()); // ### At this point we assumed that candidates will not contain 'after', this may not hold // when simplifying FLOATing anchors. @@ -1134,9 +1134,9 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP // One restriction we have is to not simplify half of an anchor and let the other half // unsimplified. So we remove center edges before and after the sequence. - const AnchorData *firstAnchor = g.edgeData(beforeSequence, candidates.first()); + const AnchorData *firstAnchor = g.edgeData(beforeSequence, candidates.constFirst()); if (firstAnchor->isCenterAnchor) { - beforeSequence = candidates.first(); + beforeSequence = candidates.constFirst(); candidates.remove(0); // If there's not candidates to be simplified, leave. @@ -1144,9 +1144,9 @@ bool QGraphicsAnchorLayoutPrivate::simplifyGraphIteration(QGraphicsAnchorLayoutP continue; } - const AnchorData *lastAnchor = g.edgeData(candidates.last(), afterSequence); + const AnchorData *lastAnchor = g.edgeData(candidates.constLast(), afterSequence); if (lastAnchor->isCenterAnchor) { - afterSequence = candidates.last(); + afterSequence = candidates.constLast(); candidates.remove(candidates.count() - 1); if (candidates.isEmpty()) |