From 68cc2c2779aa8f75c14415ecbd19a9c6fdee6ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 21 Aug 2019 15:16:22 +0200 Subject: widgets: Don't rely on QWidget friending QWidgetRepaintManager Change-Id: Id9fc28eb62103d38eaa51261f61a2294db85e0d6 Reviewed-by: Paul Olav Tvete --- src/widgets/kernel/qwidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/widgets/kernel/qwidget.cpp') diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 00d91a13c9..d098d9cc04 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -11840,9 +11840,9 @@ void QWidget::setBackingStore(QBackingStore *store) return; if (isTopLevel()) { - if (repaintManager->store != oldStore && repaintManager->store != store) - delete repaintManager->store; - repaintManager->store = store; + if (repaintManager->backingStore() != oldStore && repaintManager->backingStore() != store) + delete repaintManager->backingStore(); + repaintManager->setBackingStore(store); } } @@ -11859,7 +11859,7 @@ QBackingStore *QWidget::backingStore() const return extra->backingStore; QWidgetRepaintManager *repaintManager = d->maybeRepaintManager(); - return repaintManager ? repaintManager->store : nullptr; + return repaintManager ? repaintManager->backingStore() : nullptr; } void QWidgetPrivate::getLayoutItemMargins(int *left, int *top, int *right, int *bottom) const -- cgit v1.2.3