From 32a66514c6a907604c1efced5ba0c885ea7c7355 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 18 Mar 2013 16:33:06 +0100 Subject: 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 (cherry picked from commit 36e6632fa363152e1a0d42e53a0e5ada09092324) Reviewed-by: J-P Nurmi --- tests/auto/qdockwidget/tst_qdockwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qdockwidget/tst_qdockwidget.cpp b/tests/auto/qdockwidget/tst_qdockwidget.cpp index adf61e2..22f4f23 100644 --- a/tests/auto/qdockwidget/tst_qdockwidget.cpp +++ b/tests/auto/qdockwidget/tst_qdockwidget.cpp @@ -770,7 +770,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 -- cgit v0.12