Tests: stabilize tst_QDockWidget on small screens
The test has been recently failing in CI. The problem was easy to reproduce in a virtual machine by resizing the window of the virtual machine small enough. This change makes sure that the requested size hint is significantly smaller than the desktop size, to avoid the window manager stepping in and limiting the window size. Change-Id: Id8ce63b2b88cbed964e0330633c5d2e1dc33598c Reviewed-by: Caroline Chao <caroline.chao@digia.com>bb10
parent
4111a676f1
commit
36e6632fa3
|
|
@ -735,7 +735,7 @@ void tst_QDockWidget::task169808_setFloating()
|
|||
QSize sizeHint() const
|
||||
{
|
||||
const QRect& deskRect = qApp->desktop()->availableGeometry();
|
||||
return QSize(qMin(300, deskRect.width()), 300);
|
||||
return QSize(qMin(300, deskRect.width() / 2), qMin(300, deskRect.height() / 2));
|
||||
}
|
||||
|
||||
QSize minimumSizeHint() const
|
||||
|
|
|
|||
Loading…
Reference in New Issue