diff options
Diffstat (limited to 'examples/widgets/painting/deform')
-rw-r--r-- | examples/widgets/painting/deform/main.cpp | 8 | ||||
-rw-r--r-- | examples/widgets/painting/deform/pathdeform.cpp | 8 | ||||
-rw-r--r-- | examples/widgets/painting/deform/pathdeform.h | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/examples/widgets/painting/deform/main.cpp b/examples/widgets/painting/deform/main.cpp index 85e83207c0..28e3d6823d 100644 --- a/examples/widgets/painting/deform/main.cpp +++ b/examples/widgets/painting/deform/main.cpp @@ -60,12 +60,12 @@ int main(int argc, char **argv) bool smallScreen = QApplication::arguments().contains("-small-screen"); - PathDeformWidget deformWidget(0, smallScreen); + PathDeformWidget deformWidget(nullptr, smallScreen); - QStyle *arthurStyle = new ArthurStyle(); + QStyle *arthurStyle = new ArthurStyle; deformWidget.setStyle(arthurStyle); - QList<QWidget *> widgets = deformWidget.findChildren<QWidget *>(); - foreach (QWidget *w, widgets) + const QList<QWidget *> widgets = deformWidget.findChildren<QWidget *>(); + for (QWidget *w : widgets) w->setStyle(arthurStyle); if (smallScreen) 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); } diff --git a/examples/widgets/painting/deform/pathdeform.h b/examples/widgets/painting/deform/pathdeform.h index 68908045b9..b7c7386e2a 100644 --- a/examples/widgets/painting/deform/pathdeform.h +++ b/examples/widgets/painting/deform/pathdeform.h @@ -135,7 +135,7 @@ signals: void okPressed(); void quitPressed(); private: - PathDeformRenderer* m_renderer; + PathDeformRenderer *m_renderer; void layoutForDesktop(); void layoutForSmallScreen(); }; @@ -145,7 +145,7 @@ class PathDeformWidget : public QWidget Q_OBJECT public: PathDeformWidget(QWidget *parent, bool smallScreen); - void setStyle (QStyle * style ); + void setStyle(QStyle *style); private: PathDeformRenderer *m_renderer; |