diff options
author | David Robillard <d@drobilla.net> | 2024-07-12 13:25:38 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-07-12 13:28:04 -0400 |
commit | 06ee7893d5f6b97a76769d2ba597e989b4c587e7 (patch) | |
tree | 74ca068a202b7f2ea7e713f932cef9d39a0626c4 | |
parent | d6d17de4fd3443f4880412c3ff4bf9df95985dc2 (diff) | |
download | jalv-06ee7893d5f6b97a76769d2ba597e989b4c587e7.tar.gz jalv-06ee7893d5f6b97a76769d2ba597e989b4c587e7.tar.bz2 jalv-06ee7893d5f6b97a76769d2ba597e989b4c587e7.zip |
Replace use of Qt foreach keyword with range-based for loops
-rw-r--r-- | src/jalv_qt.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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(); |