diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-04-10 11:42:18 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-04-10 10:34:06 +0000 |
commit | 6d0c86d65b6fa0f37ba696de28fea4e977d0a282 (patch) | |
tree | 10a0c5eb676c27143db4b1ce36ad012d375534b2 /examples/designer/taskmenuextension/tictactoedialog.cpp | |
parent | 1b04bf6d36af200dff0d7afff7080afab278034a (diff) |
Qt Designer Examples: Fix code around constructors.
Make constructors explicit, use constructor initialization for member
variables, remove unused variables.
Change-Id: I84273400d66ef061376bd0ec4948ab1a0fd45f30
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'examples/designer/taskmenuextension/tictactoedialog.cpp')
-rw-r--r-- | examples/designer/taskmenuextension/tictactoedialog.cpp | 11 |
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); |