From 06ee7893d5f6b97a76769d2ba597e989b4c587e7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 12 Jul 2024 13:25:38 -0400 Subject: Replace use of Qt foreach keyword with range-based for loops --- src/jalv_qt.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/jalv_qt.cpp b/src/jalv_qt.cpp index a63a508..20f9de6 100644 --- a/src/jalv_qt.cpp +++ b/src/jalv_qt.cpp @@ -196,8 +196,7 @@ QSize FlowLayout::minimumSize() const { QSize size = {}; - QLayoutItem* item = nullptr; - foreach (item, itemList) { + for (QLayoutItem* const item : itemList) { size = size.expandedTo(item->minimumSize()); } @@ -218,8 +217,7 @@ FlowLayout::doLayout(const QRect& rect, bool testOnly) const int y = effectiveRect.y(); int lineHeight = 0; - QLayoutItem* item = nullptr; - foreach (item, itemList) { + for (QLayoutItem* const item : itemList) { QWidget* wid = item->widget(); int spaceX = horizontalSpacing(); -- cgit v1.2.1