From 8c04aab8966611e96c64f469b7a1c6afe67e3fca Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 7 Dec 2018 14:17:38 +0100 Subject: Cleanup Widgets examples - new signal/slot syntax Cleanup the Widget examples - use the new signal/slot syntax where possible - layout, statemachine, tools and touch subdirectory Change-Id: I466b309b643ef7ffc27be7591fa10f4c75cfd3f8 Reviewed-by: Luca Beldi Reviewed-by: Sze Howe Koh Reviewed-by: Paul Wicking --- examples/widgets/layouts/basiclayouts/dialog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/widgets/layouts') diff --git a/examples/widgets/layouts/basiclayouts/dialog.cpp b/examples/widgets/layouts/basiclayouts/dialog.cpp index 7acbc50eb7..8376820545 100644 --- a/examples/widgets/layouts/basiclayouts/dialog.cpp +++ b/examples/widgets/layouts/basiclayouts/dialog.cpp @@ -69,8 +69,8 @@ Dialog::Dialog() buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); - connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); - connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); //! [1] //! [2] @@ -99,7 +99,7 @@ void Dialog::createMenu() exitAction = fileMenu->addAction(tr("E&xit")); menuBar->addMenu(fileMenu); - connect(exitAction, SIGNAL(triggered()), this, SLOT(accept())); + connect(exitAction, &QAction::triggered, this, &QDialog::accept); } //! [6] -- cgit v1.2.3