diff options
Diffstat (limited to 'examples/widgets/painting/deform/pathdeform.cpp')
-rw-r--r-- | examples/widgets/painting/deform/pathdeform.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/widgets/painting/deform/pathdeform.cpp b/examples/widgets/painting/deform/pathdeform.cpp index 3b80c40e9b..0eda76a831 100644 --- a/examples/widgets/painting/deform/pathdeform.cpp +++ b/examples/widgets/painting/deform/pathdeform.cpp @@ -291,16 +291,16 @@ void PathDeformWidget::hideControls() m_controls->hide(); } -void PathDeformWidget::setStyle( QStyle * style ) +void PathDeformWidget::setStyle(QStyle *style) { QWidget::setStyle(style); - if (m_controls == 0) + if (!m_controls) return; m_controls->setStyle(style); - QList<QWidget *> widgets = m_controls->findChildren<QWidget *>(); - foreach (QWidget *w, widgets) + const QList<QWidget *> widgets = m_controls->findChildren<QWidget *>(); + for (QWidget *w : widgets) w->setStyle(style); } |