Replaced all Qt foreach loops with modern C++ range-based loops. (#277)

This commit is contained in:
Jaye Evins
2026-01-05 15:24:00 -05:00
committed by GitHub
parent 45a92eda89
commit 3cd173a37f
17 changed files with 79 additions and 82 deletions
+4 -4
View File
@@ -672,7 +672,7 @@ namespace glabels
break;
}
QPainterPath hoverPath; // new empty hover path
foreach ( QTextLayout* layout, mEditorLayouts )
for ( QTextLayout* layout : mEditorLayouts )
{
for ( int j = 0; j < layout->lineCount(); j++ )
{
@@ -708,7 +708,7 @@ namespace glabels
painter->setPen( QPen( color ) );
}
foreach ( QTextLayout* layout, mEditorLayouts )
for ( QTextLayout* layout : mEditorLayouts )
{
layout->draw( painter, QPointF( 0, 0 ) );
}
@@ -790,7 +790,7 @@ namespace glabels
y = marginPts;
break;
}
foreach ( QTextLayout* layout, layouts )
for ( QTextLayout* layout : layouts )
{
for ( int j = 0; j < layout->lineCount(); j++ )
{
@@ -802,7 +802,7 @@ namespace glabels
// Draw layouts
painter->setPen( QPen( color ) );
foreach ( QTextLayout* layout, layouts )
for ( QTextLayout* layout : layouts )
{
layout->draw( painter, QPointF( 0, 0 ) );
}