From cf27d9e8a5e14ebe083f4b0fa2204d0646e7ed5e Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 7 Dec 2018 14:17:02 +0100 Subject: Cleanup Widgets examples - new signal/slot syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleanup the Widget examples - use the new signal/slot syntax where possible - painting and richtext subdirectory Change-Id: If0e365ab1cabf9184076595494cfca151406fddf Reviewed-by: Luca Beldi Reviewed-by: Topi Reiniƶ --- examples/widgets/painting/basicdrawing/window.cpp | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'examples/widgets/painting/basicdrawing') diff --git a/examples/widgets/painting/basicdrawing/window.cpp b/examples/widgets/painting/basicdrawing/window.cpp index c80237e914..65f6971d13 100644 --- a/examples/widgets/painting/basicdrawing/window.cpp +++ b/examples/widgets/painting/basicdrawing/window.cpp @@ -157,22 +157,22 @@ Window::Window() //! [7] //! [8] - connect(shapeComboBox, SIGNAL(activated(int)), - this, SLOT(shapeChanged())); - connect(penWidthSpinBox, SIGNAL(valueChanged(int)), - this, SLOT(penChanged())); - connect(penStyleComboBox, SIGNAL(activated(int)), - this, SLOT(penChanged())); - connect(penCapComboBox, SIGNAL(activated(int)), - this, SLOT(penChanged())); - connect(penJoinComboBox, SIGNAL(activated(int)), - this, SLOT(penChanged())); - connect(brushStyleComboBox, SIGNAL(activated(int)), - this, SLOT(brushChanged())); - connect(antialiasingCheckBox, SIGNAL(toggled(bool)), - renderArea, SLOT(setAntialiased(bool))); - connect(transformationsCheckBox, SIGNAL(toggled(bool)), - renderArea, SLOT(setTransformed(bool))); + connect(shapeComboBox, QOverload::of(&QComboBox::activated), + this, &Window::shapeChanged); + connect(penWidthSpinBox, QOverload::of(&QSpinBox::valueChanged), + this, &Window::penChanged); + connect(penStyleComboBox, QOverload::of(&QComboBox::activated), + this, &Window::penChanged); + connect(penCapComboBox, QOverload::of(&QComboBox::activated), + this, &Window::penChanged); + connect(penJoinComboBox, QOverload::of(&QComboBox::activated), + this, &Window::penChanged); + connect(brushStyleComboBox, QOverload::of(&QComboBox::activated), + this, &Window::brushChanged); + connect(antialiasingCheckBox, &QAbstractButton::toggled, + renderArea, &RenderArea::setAntialiased); + connect(transformationsCheckBox, &QAbstractButton::toggled, + renderArea, &RenderArea::setTransformed); //! [8] //! [9] -- cgit v1.2.3