summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2012-11-20 14:55:20 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-20 17:10:19 +0100
commit4532a1399e10a677083300648cf18af9addab656 (patch)
tree6228c5bbe1ba61ca107cc81ebf7f377dee232e3c
parentf439108c4f6e456d329a666fe5000d07538b63c1 (diff)
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 <gabriel.dedietrich@digia.com>
-rw-r--r--src/widgets/styles/qproxystyle.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}
}