diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-04-29 15:12:22 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-05-02 07:56:25 +0000 |
commit | f40dbe0d0b54ce83d2168e82905cf4f75059a841 (patch) | |
tree | 405640220011f4ac0d0222b48bcf92ef1480af54 /src/widgets/widgets/qdialogbuttonbox.cpp | |
parent | 799be4e48912170a0441de6dadcbc64aeb7baffa (diff) |
QtWidgets: Introduce delegating constructors.
Reduce code duplication by chaining constructors.
Change-Id: I0229556a417153063ac6d14d35765c85e6fe1fe8
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/widgets/qdialogbuttonbox.cpp')
-rw-r--r-- | src/widgets/widgets/qdialogbuttonbox.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp index 2b68c308ec..0d369eb28c 100644 --- a/src/widgets/widgets/qdialogbuttonbox.cpp +++ b/src/widgets/widgets/qdialogbuttonbox.cpp @@ -462,9 +462,8 @@ void QDialogButtonBoxPrivate::retranslateStrings() \sa orientation, addButton() */ QDialogButtonBox::QDialogButtonBox(QWidget *parent) - : QWidget(*new QDialogButtonBoxPrivate(Qt::Horizontal), parent, 0) + : QDialogButtonBox(Qt::Horizontal, parent) { - d_func()->initLayout(); } /*! @@ -487,10 +486,8 @@ QDialogButtonBox::QDialogButtonBox(Qt::Orientation orientation, QWidget *parent) \sa orientation, addButton() */ QDialogButtonBox::QDialogButtonBox(StandardButtons buttons, QWidget *parent) - : QWidget(*new QDialogButtonBoxPrivate(Qt::Horizontal), parent, 0) + : QDialogButtonBox(buttons, Qt::Horizontal, parent) { - d_func()->initLayout(); - d_func()->createStandardButtons(buttons); } /*! @@ -501,9 +498,8 @@ QDialogButtonBox::QDialogButtonBox(StandardButtons buttons, QWidget *parent) */ QDialogButtonBox::QDialogButtonBox(StandardButtons buttons, Qt::Orientation orientation, QWidget *parent) - : QWidget(*new QDialogButtonBoxPrivate(orientation), parent, 0) + : QDialogButtonBox(orientation, parent) { - d_func()->initLayout(); d_func()->createStandardButtons(buttons); } |