summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-01-04 15:18:39 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-02-12 13:32:14 +0000
commit1a36cf5ea1a8ab10658919892f29bbc3d337d1d3 (patch)
tree1edada455334a426b4724889090f8087633d3f1e /tests/auto
parenta3c3330b6fa2a7599a86dd1475987e73856f481b (diff)
Deduplicate QWidgetPrivate::invalidateBuffer
Now that MSVC (presumably) supports templates, we can merge the QRect and QRegion versions of the functions into one. The function has been renamed to invalidateBackingStore to better reflect what it's doing. Change-Id: I0e94a0cabd286cf97f2ba718a42ee0425f59d3ec Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 93c8b095e0..2d4d5249d2 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -321,7 +321,9 @@ private slots:
void setMaskInResizeEvent();
void moveInResizeEvent();
- void immediateRepaintAfterInvalidateBuffer();
+#ifdef QT_BUILD_INTERNAL
+ void immediateRepaintAfterInvalidateBackingStore();
+#endif
void effectiveWinId();
void effectiveWinId2();
@@ -8215,7 +8217,7 @@ void tst_QWidget::resizeInPaintEvent()
widget.resizeInPaintEvent = true;
// This will call resize in the paintEvent, which in turn will call
- // invalidateBuffer() and a new update request should be posted.
+ // invalidateBackingStore() and a new update request should be posted.
widget.repaint();
QCOMPARE(widget.numPaintEvents, 1);
widget.numPaintEvents = 0;
@@ -8370,7 +8372,8 @@ void tst_QWidget::moveInResizeEvent()
QTRY_COMPARE(testWidget.geometry(), expectedGeometry);
}
-void tst_QWidget::immediateRepaintAfterInvalidateBuffer()
+#ifdef QT_BUILD_INTERNAL
+void tst_QWidget::immediateRepaintAfterInvalidateBackingStore()
{
if (m_platform != QStringLiteral("xcb") && m_platform != QStringLiteral("windows"))
QSKIP("We don't support immediate repaint right after show on other platforms.");
@@ -8384,7 +8387,7 @@ void tst_QWidget::immediateRepaintAfterInvalidateBuffer()
// Marks the area covered by the widget as dirty in the backing store and
// posts an UpdateRequest event.
- qt_widget_private(widget.data())->invalidateBuffer(widget->rect());
+ qt_widget_private(widget.data())->invalidateBackingStore(widget->rect());
QCOMPARE(widget->numPaintEvents, 0);
// The entire widget is already dirty, but this time we want to update immediately
@@ -8393,6 +8396,7 @@ void tst_QWidget::immediateRepaintAfterInvalidateBuffer()
widget->repaint();
QCOMPARE(widget->numPaintEvents, 1);
}
+#endif
void tst_QWidget::effectiveWinId()
{
@@ -9628,7 +9632,7 @@ public:
{
if (!static_cast<QWidgetPrivate*>(d_ptr.data())->maybeBackingStore()) {
static_cast<QWidgetPrivate*>(d_ptr.data())->topData()->backingStoreTracker.create(this);
- static_cast<QWidgetPrivate*>(d_ptr.data())->invalidateBuffer(this->rect());
+ static_cast<QWidgetPrivate*>(d_ptr.data())->invalidateBackingStore(this->rect());
repaint();
}
}