diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-08-14 14:07:55 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2019-08-20 11:33:47 +0200 |
commit | 6d9d4e6817b116676320a1aba0ea0af1633205bc (patch) | |
tree | 78f48574a90deb97476ab38e70cb0db3cc77aa4c /tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | |
parent | f4db3811694fe032b9fbf237b869fa842e094883 (diff) |
Rename QWidgetBackingStore to QWidgetRepaintManager
Quoting a blog from 2009, "this class is responsible for figuring out which parts
of the window surface needs to be updated prior to showing it to screen, so it's
really a repaint manager."
https://blog.qt.io/blog/2009/12/16/qt-graphics-and-performance-an-overview/
What better time to do the rename than 10 years later!
Change-Id: Ibf3c3bc8c7df64ac03d72e1f71d296b62d832fee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 715bbbec0f..22bb488b3d 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -46,7 +46,7 @@ #include <qstylefactory.h> #include <qdesktopwidget.h> #include <private/qwidget_p.h> -#include <private/qwidgetbackingstore_p.h> +#include <private/qwidgetrepaintmanager_p.h> #include <private/qapplication_p.h> #include <private/qhighdpiscaling_p.h> #include <qcalendarwidget.h> @@ -9565,7 +9565,7 @@ void tst_QWidget::destroyBackingStore() QTRY_VERIFY(w.numPaintEvents > 0); w.reset(); w.update(); - qt_widget_private(&w)->topData()->widgetBackingStore.reset(new QWidgetBackingStore(&w)); + qt_widget_private(&w)->topData()->repaintManager.reset(new QWidgetRepaintManager(&w)); w.update(); QApplication::processEvents(); @@ -9580,14 +9580,14 @@ void tst_QWidget::destroyBackingStore() #endif // QT_BUILD_INTERNAL // Helper function -QWidgetBackingStore* backingStore(QWidget &widget) +QWidgetRepaintManager* repaintManager(QWidget &widget) { - QWidgetBackingStore *backingStore = nullptr; + QWidgetRepaintManager *repaintManager = nullptr; #ifdef QT_BUILD_INTERNAL if (QTLWExtra *topExtra = qt_widget_private(&widget)->maybeTopData()) - backingStore = topExtra->widgetBackingStore.get(); + repaintManager = topExtra->repaintManager.get(); #endif - return backingStore; + return repaintManager; } // Tables of 5000 elements do not make sense on Windows Mobile. @@ -9785,12 +9785,12 @@ class scrollWidgetWBS : public QWidget public: void deleteBackingStore() { - static_cast<QWidgetPrivate*>(d_ptr.data())->topData()->widgetBackingStore.reset(nullptr); + static_cast<QWidgetPrivate*>(d_ptr.data())->topData()->repaintManager.reset(nullptr); } void enableBackingStore() { - if (!static_cast<QWidgetPrivate*>(d_ptr.data())->maybeBackingStore()) { - static_cast<QWidgetPrivate*>(d_ptr.data())->topData()->widgetBackingStore.reset(new QWidgetBackingStore(this)); + if (!static_cast<QWidgetPrivate*>(d_ptr.data())->maybeRepaintManager()) { + static_cast<QWidgetPrivate*>(d_ptr.data())->topData()->repaintManager.reset(new QWidgetRepaintManager(this)); static_cast<QWidgetPrivate*>(d_ptr.data())->invalidateBackingStore(this->rect()); repaint(); } |