From f4db3811694fe032b9fbf237b869fa842e094883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 14 Aug 2019 12:39:27 +0200 Subject: Get rid of QWidgetBackingStoreTracker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was added for Symbian almost 10 years ago (d7057e7c1f1a), for a somewhat dubious use-case. The Symbian code is since long gone (ae30d7141), so the remaining pieces are just adding complexity to the already intricate workings of the QtWidgets backingstore/painting logic. Task-number: QTBUG-8697 Change-Id: I82af610a8ac26719c588ac63f06b4501f59b400d Reviewed-by: Paul Olav Tvete (cherry picked from commit 2e0b0be2ce30394269559590b42c81de27301ee6) Reviewed-by: Tor Arne Vestbø --- tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp') diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index bfc2631842..715bbbec0f 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -9564,7 +9565,7 @@ void tst_QWidget::destroyBackingStore() QTRY_VERIFY(w.numPaintEvents > 0); w.reset(); w.update(); - qt_widget_private(&w)->topData()->backingStoreTracker.create(&w); + qt_widget_private(&w)->topData()->widgetBackingStore.reset(new QWidgetBackingStore(&w)); w.update(); QApplication::processEvents(); @@ -9584,7 +9585,7 @@ QWidgetBackingStore* backingStore(QWidget &widget) QWidgetBackingStore *backingStore = nullptr; #ifdef QT_BUILD_INTERNAL if (QTLWExtra *topExtra = qt_widget_private(&widget)->maybeTopData()) - backingStore = topExtra->backingStoreTracker.data(); + backingStore = topExtra->widgetBackingStore.get(); #endif return backingStore; } @@ -9784,12 +9785,12 @@ class scrollWidgetWBS : public QWidget public: void deleteBackingStore() { - static_cast(d_ptr.data())->topData()->backingStoreTracker.destroy(); + static_cast(d_ptr.data())->topData()->widgetBackingStore.reset(nullptr); } void enableBackingStore() { if (!static_cast(d_ptr.data())->maybeBackingStore()) { - static_cast(d_ptr.data())->topData()->backingStoreTracker.create(this); + static_cast(d_ptr.data())->topData()->widgetBackingStore.reset(new QWidgetBackingStore(this)); static_cast(d_ptr.data())->invalidateBackingStore(this->rect()); repaint(); } -- cgit v1.2.3