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/util/qundostack.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/util/qundostack.cpp')
-rw-r--r-- | src/widgets/util/qundostack.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/util/qundostack.cpp b/src/widgets/util/qundostack.cpp index 7f6a56e0ec..7361adfdd5 100644 --- a/src/widgets/util/qundostack.cpp +++ b/src/widgets/util/qundostack.cpp @@ -110,10 +110,8 @@ QT_BEGIN_NAMESPACE */ QUndoCommand::QUndoCommand(const QString &text, QUndoCommand *parent) + : QUndoCommand(parent) { - d = new QUndoCommandPrivate; - if (parent != 0) - parent->d->child_list.append(this); setText(text); } |