summaryrefslogtreecommitdiffstats
path: root/examples/designer/taskmenuextension/tictactoedialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/designer/taskmenuextension/tictactoedialog.cpp')
-rw-r--r--examples/designer/taskmenuextension/tictactoedialog.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/examples/designer/taskmenuextension/tictactoedialog.cpp b/examples/designer/taskmenuextension/tictactoedialog.cpp
index e6d1d415e..6c6e2f3d7 100644
--- a/examples/designer/taskmenuextension/tictactoedialog.cpp
+++ b/examples/designer/taskmenuextension/tictactoedialog.cpp
@@ -51,15 +51,14 @@
//! [0]
TicTacToeDialog::TicTacToeDialog(TicTacToe *tic, QWidget *parent)
: QDialog(parent)
+ , editor(new TicTacToe)
+ , ticTacToe(tic)
+ , buttonBox(new QDialogButtonBox(QDialogButtonBox::Ok
+ | QDialogButtonBox::Cancel
+ | QDialogButtonBox::Reset))
{
- ticTacToe = tic;
- editor = new TicTacToe;
editor->setState(ticTacToe->state());
- buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
- | QDialogButtonBox::Cancel
- | QDialogButtonBox::Reset);
-
connect(buttonBox->button(QDialogButtonBox::Reset), &QAbstractButton::clicked,
this, &TicTacToeDialog::resetState);
connect(buttonBox, &QDialogButtonBox::accepted, this, &TicTacToeDialog::saveState);