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:08 +0100
commitad4ef9836c3142e13a4dc125832a7f0adb5b5d0e (patch)
tree3e590680d6db678c87436cd252dd9d03d52534fe /tests/auto/widgets/kernel
parentcd200ad7aef1884a5c36528d5c3933c46c86510f (diff)
parent512c1febbd9d5b8af767b2604d6ee97f1fdee4d9 (diff)
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