Baseline tests: wait longer before taking a screen snapshot
The recorded images frequently show traces of a fading-out command prompt window that is opened by the test execution. We evidently have to wait longer for all window-level effects are finished. Pick-to: 6.5 Change-Id: I50db54ff33bf4bb1ef7c480a4aede1d5de1618c3 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
fed79b873e
commit
b3424c7027
@ -124,8 +124,9 @@ QImage QWidgetBaselineTest::takeSnapshot()
|
|||||||
*/
|
*/
|
||||||
QImage QWidgetBaselineTest::takeScreenSnapshot(const QRect& windowRect)
|
QImage QWidgetBaselineTest::takeScreenSnapshot(const QRect& windowRect)
|
||||||
{
|
{
|
||||||
// make sure all effects are done
|
// make sure all effects are done - wait longer here because entire
|
||||||
QTest::qWait(250);
|
// windows might be fading in and out.
|
||||||
|
QTest::qWait(750);
|
||||||
return window->screen()->grabWindow(0, windowRect.x(), windowRect.y(),
|
return window->screen()->grabWindow(0, windowRect.x(), windowRect.y(),
|
||||||
windowRect.width(), windowRect.height()).toImage();
|
windowRect.width(), windowRect.height()).toImage();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user