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>bb10
parent
f439108c4f
commit
4532a1399e
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue