diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-12-07 14:17:38 +0100 |
---|---|---|
committer | Luca Beldi <v.ronin@yahoo.it> | 2019-01-03 08:29:56 +0000 |
commit | 8c04aab8966611e96c64f469b7a1c6afe67e3fca (patch) | |
tree | 40fe2bc3f4d945a65828d49586292ea6c72440a1 /examples/widgets/layouts/basiclayouts/dialog.cpp | |
parent | 451ebdff824cad329b40aad9a10cec5e5cb464cc (diff) |
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 <v.ronin@yahoo.it>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/widgets/layouts/basiclayouts/dialog.cpp')
-rw-r--r-- | examples/widgets/layouts/basiclayouts/dialog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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] |