From 4532a1399e10a677083300648cf18af9addab656 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 20 Nov 2012 14:55:20 +0100 Subject: QProxyStyle: fix the base style assignment in constructor Assign the baseStyle member before calling setParent(), because that will trigger ParentChange event and thus calls ensureBaseStyle(). The baseStyle member must be set at that point, because otherwise it will start creating a fallback base style. Change-Id: I3522e41bb6b82e3fe2e7790d53a53978c18a027a Reviewed-by: Gabriel de Dietrich --- src/widgets/styles/qproxystyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/styles/qproxystyle.cpp b/src/widgets/styles/qproxystyle.cpp index 60853880f6..c3fc1d06a4 100644 --- a/src/widgets/styles/qproxystyle.cpp +++ b/src/widgets/styles/qproxystyle.cpp @@ -120,9 +120,9 @@ QProxyStyle::QProxyStyle(QStyle *style) : { Q_D(QProxyStyle); if (style) { + d->baseStyle = style; style->setProxy(this); style->setParent(this); // Take ownership - d->baseStyle = style; } } -- cgit v1.2.3