Gui: modernize C++: use range-based for loop

This commit is contained in:
wmayer
2023-08-14 19:40:21 +02:00
committed by wwmayer
parent 4991475341
commit e09d8aaba6
42 changed files with 234 additions and 240 deletions

View File

@@ -254,8 +254,7 @@ void FlagLayout::setGeometry(const QRect &rect)
QLayout::setGeometry(rect);
// left side
for (int i = 0; i < list.size(); ++i) {
ItemWrapper *wrapper = list.at(i);
for (ItemWrapper *wrapper : list) {
QLayoutItem *item = wrapper->item;
Position position = wrapper->position;
@@ -275,8 +274,7 @@ void FlagLayout::setGeometry(const QRect &rect)
// right side
topHeight = 0;
bottomHeight = 0;
for (int i = 0; i < list.size(); ++i) {
ItemWrapper *wrapper = list.at(i);
for (ItemWrapper *wrapper : list) {
QLayoutItem *item = wrapper->item;
Position position = wrapper->position;
@@ -318,8 +316,7 @@ QSize FlagLayout::calculateSize(SizeType sizeType) const
{
QSize totalSize;
for (int i = 0; i < list.size(); ++i) {
ItemWrapper *wrapper = list.at(i);
for (ItemWrapper *wrapper : list) {
QSize itemSize;
if (sizeType == MinimumSize)