summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-29 01:01:07 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-29 01:01:19 +0100
commit3de89e57c9640ef9d476130abc4cca9120d3ef8c (patch)
tree626efeaa3a00581f0f18cf01f9917a1c0058ebe0 /tests/auto/widgets/kernel
parent02fb4e8f0da24aee81820adb283bb9a1bb8f0688 (diff)
parentad4ef9836c3142e13a4dc125832a7f0adb5b5d0e (diff)
Merge "Merge remote-tracking branch 'origin/5.15' into dev"
Diffstat (limited to 'tests/auto/widgets/kernel')
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 3f2b8bca13..07f84595fd 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -8385,12 +8385,9 @@ void tst_QWidget::resizeInPaintEvent()
widget.resizeInPaintEvent = true;
// This will call resize in the paintEvent, which in turn will call
// invalidateBackingStore() and a new update request should be posted.
- widget.repaint();
- QCOMPARE(widget.numPaintEvents, 1);
- widget.numPaintEvents = 0;
-
- // Make sure the resize triggers another update.
- QTRY_COMPARE(widget.numPaintEvents, 1);
+ // the resize triggers another update.
+ widget.update();
+ QTRY_COMPARE(widget.numPaintEvents, 2);
}
void tst_QWidget::opaqueChildren()
@@ -8559,8 +8556,8 @@ void tst_QWidget::immediateRepaintAfterInvalidateBackingStore()
// The entire widget is already dirty, but this time we want to update immediately
// by calling repaint(), and thus we have to repaint the widget and not wait for
// the UpdateRequest to be sent when we get back to the event loop.
- widget->repaint();
- QCOMPARE(widget->numPaintEvents, 1);
+ widget->update();
+ QTRY_COMPARE(widget->numPaintEvents, 1);
}
#endif
@@ -9832,7 +9829,7 @@ public:
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();
+ update();
}
}
};
@@ -9855,7 +9852,7 @@ void tst_QWidget::scrollWithoutBackingStore()
scrollable.scroll(-25,-25);
QCOMPARE(child.pos(),QPoint(25,25));
scrollable.enableBackingStore();
- QCOMPARE(child.pos(),QPoint(25,25));
+ QTRY_COMPARE(child.pos(),QPoint(25,25));
}
#endif