summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2013-03-18 16:33:06 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-20 09:58:06 +0100
commit5fd509c4d7b4bd9be9cc6f3a5f419ee496fe9142 (patch)
treefe54d416c60b34a3344c380f9aa01a58613a6bbd /tests
parent677313fc0b013644ad558e3410266ecbbcbc6d29 (diff)
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> (cherry picked from commit 36e6632fa363152e1a0d42e53a0e5ada09092324) Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
index 92b16ac155..6ab7cb4491 100644
--- a/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/widgets/widgets/qdockwidget/tst_qdockwidget.cpp
@@ -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