QGraphicsAnchorLayout: make a member container const
The m_edges container isn't changed after it's initialized in the
constructor; so make it const.
This amends commit 641bccce2a.
Change-Id: I387eb2562475bc4910700d48f67303b0a5f80ccd
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
bb10
parent
408799de65
commit
1097c21748
|
|
@ -459,7 +459,7 @@ void SequentialAnchorData::updateChildrenSizes()
|
|||
// "from" or "to", that _contains_ one of them.
|
||||
AnchorVertex *prev = from;
|
||||
|
||||
for (AnchorData *e : std::as_const(m_edges)) {
|
||||
for (AnchorData *e : m_edges) {
|
||||
const bool edgeIsForward = (e->from == prev);
|
||||
if (edgeIsForward) {
|
||||
e->sizeAtMinimum = interpolate(minFactor, e->minSize, e->minPrefSize,
|
||||
|
|
@ -494,7 +494,7 @@ void SequentialAnchorData::calculateSizeHints()
|
|||
|
||||
AnchorVertex *prev = from;
|
||||
|
||||
for (AnchorData *edge : std::as_const(m_edges)) {
|
||||
for (AnchorData *edge : m_edges) {
|
||||
const bool edgeIsForward = (edge->from == prev);
|
||||
if (edgeIsForward) {
|
||||
minSize += edge->minSize;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ struct SequentialAnchorData : public AnchorData
|
|||
void calculateSizeHints();
|
||||
|
||||
QList<AnchorVertex *> m_children; // list of vertices in the sequence
|
||||
QList<AnchorData *> m_edges; // keep the list of edges too.
|
||||
const QList<AnchorData *> m_edges; // keep the list of edges too.
|
||||
};
|
||||
|
||||
struct ParallelAnchorData : public AnchorData
|
||||
|
|
|
|||
Loading…
Reference in New Issue