diff --git a/tests/tst_docks.cpp b/tests/tst_docks.cpp index 7de33122..3b82121d 100644 --- a/tests/tst_docks.cpp +++ b/tests/tst_docks.cpp @@ -5439,7 +5439,9 @@ void TestDocks::tst_maximumSizePolicy() dock1->show(); auto oldFw2 = dock1->window(); - QVERIFY(dock1->window()->height() <= maxHeight + 20); // + 20 as the floating window is a bit bigger, due to margins etc. + + const int tollerance = 50; + QVERIFY(dock1->window()->height() <= maxHeight + tollerance); // +tollerance as the floating window is a bit bigger, due to margins etc. QVERIFY(dock1->height() <= maxHeight); auto m1 = createMainWindow(); @@ -5451,7 +5453,7 @@ void TestDocks::tst_maximumSizePolicy() dock1->window()->resize(QSize(dock1->width(), 800)); const QRect highlightRect = m1->multiSplitter()->rectForDrop(dock1->window(), Location_OnBottom, nullptr); - QVERIFY(highlightRect.height() <= maxHeight + 20); + QVERIFY(highlightRect.height() <= maxHeight + tollerance); // Now drop it, and check too m1->addDockWidget(dock1, Location_OnBottom);