clang-tidy: Apply modernize-loop-convert everywhere (#6481)

Co-authored-by: allejok96 <allejok96@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
This commit is contained in:
saker
2022-09-27 04:27:35 -04:00
committed by GitHub
parent e407e73e24
commit 2f7a6558a1
67 changed files with 441 additions and 598 deletions

View File

@@ -200,10 +200,9 @@ void TabWidget::resizeEvent( QResizeEvent * )
{
if (!m_resizable)
{
for ( widgetStack::iterator it = m_widgets.begin();
it != m_widgets.end(); ++it )
for (const auto& widget : m_widgets)
{
( *it ).w->setFixedSize( width() - 4, height() - m_tabbarHeight );
widget.w->setFixedSize(width() - 4, height() - m_tabbarHeight);
}
}
}
@@ -320,11 +319,10 @@ QSize TabWidget::minimumSizeHint() const
if (m_resizable)
{
int maxWidth = 0, maxHeight = 0;
for ( widgetStack::const_iterator it = m_widgets.begin();
it != m_widgets.end(); ++it )
for (const auto& widget : m_widgets)
{
maxWidth = std::max(maxWidth, it->w->minimumSizeHint().width());
maxHeight = std::max(maxHeight, it->w->minimumSizeHint().height());
maxWidth = std::max(maxWidth, widget.w->minimumSizeHint().width());
maxHeight = std::max(maxHeight, widget.w->minimumSizeHint().height());
}
// "-1" :
// in "addTab", under "Position tab's window", the widget is
@@ -342,11 +340,10 @@ QSize TabWidget::sizeHint() const
if (m_resizable)
{
int maxWidth = 0, maxHeight = 0;
for ( widgetStack::const_iterator it = m_widgets.begin();
it != m_widgets.end(); ++it )
for (const auto& widget : m_widgets)
{
maxWidth = std::max(maxWidth, it->w->sizeHint().width());
maxHeight = std::max(maxHeight, it->w->sizeHint().height());
maxWidth = std::max(maxWidth, widget.w->sizeHint().width());
maxHeight = std::max(maxHeight, widget.w->sizeHint().height());
}
// "-1" :
// in "addTab", under "Position tab's window", the widget is