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/styles/qproxystyle.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/styles/qproxystyle.cpp')
-rw-r--r-- | src/widgets/styles/qproxystyle.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/widgets/styles/qproxystyle.cpp b/src/widgets/styles/qproxystyle.cpp index 182c974729..5739678932 100644 --- a/src/widgets/styles/qproxystyle.cpp +++ b/src/widgets/styles/qproxystyle.cpp @@ -131,16 +131,9 @@ QProxyStyle::QProxyStyle(QStyle *style) : \sa QStyleFactory::create() */ -QProxyStyle::QProxyStyle(const QString &key) : - QCommonStyle(*new QProxyStylePrivate()) +QProxyStyle::QProxyStyle(const QString &key) + : QProxyStyle(QStyleFactory::create(key)) { - Q_D(QProxyStyle); - QStyle *style = QStyleFactory::create(key); - if (style) { - d->baseStyle = style; - style->setProxy(this); - style->setParent(this); // Take ownership - } } /*! |