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 641bccce2a80b2a7268c3b8409bdc957b9a510b5.

Change-Id: I387eb2562475bc4910700d48f67303b0a5f80ccd
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
This commit is contained in:
Ahmad Samir 2023-08-13 01:02:32 +03:00
parent 408799de65
commit 1097c21748
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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