qt6-bb10/tests/auto/widgets/widgets
Gatis Paeglis 2f2bfc4e59 widgets: fix QWidget::save/restoreGeometry()
QWidget::restoreGeometry() is calling QWidget::move() with restoredFrameGeometry,
which internally calls setGeometry() and sets positionPolicy = QWindowPrivate::WindowFrameExclusive,
which is invalid: restoredFrameGeometry is WindowFrameInclusive geometry.
QPA plugins rely on correctly set policies when interpreting x,y. QWidget::move()
was not designed for this AFAICT, so making it to accept frame geometry is
no-op. It is widely used legacy code, changing it could cause regressions.

Save/restore API was introduced in Qt 4.2, at that time we did not have APIs
like QWindow::setFramePosition(), so its unclear why geometry() was not stored
instead. The documentation also is somewhat unclear:

"[..] save the geometry when the window closes [..]"

Frame or client geometry? It does not specify. And from the code we see
that frame geometry was passed as client geometry, not making the original
intention clearer. Besides that, restoreGeometry() is full of other undocumented
assumptions where to place windows and when to fail (fortunately its easy
to write your own save/restore logic). Added a Qt 6 note in the source code.

What this patch changes:

Now we store geometry() in saveGeometry() and use that value in restoreGeometry()
by setGeometry(). This does not cause any behavior difference in window
positioning (tst_QWidget::saveRestoreGeometry still works). Geometry restored
from data saved with earlier versions of saveGeometry() might be positioned at:
x + leftMargin, y + topMargin.

This patch makes tst_QWidget::saveRestoreGeometry to always fail instead
of being flaky. Blacklisting for XCB instead of selected distros.

Also enabled excluded code paths for XCB on tst_QDockWidget::restoreDockWidget().
It does not seem to be flaky, maybe it was in 2015, but lot of things have changed
since then.

Task-number: QTBUG-66708
Change-Id: Ic86a6fd091e2c71b7550b2f476386da704253cd4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-06-25 13:41:06 +00:00
..
qabstractbutton tests/auto/widgets/widgets: Avoid unconditional qWait()s 2018-04-25 11:55:34 +00:00
qabstractscrollarea winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qabstractslider testlib: start sharing common helper functions 2017-11-04 20:11:22 +00:00
qabstractspinbox testlib: start sharing common helper functions 2017-11-04 20:11:22 +00:00
qbuttongroup Updated license headers 2016-01-21 18:55:18 +00:00
qcalendarwidget winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qcheckbox tests/auto/widgets/widgets: Avoid unconditional qWait()s 2018-04-25 11:55:34 +00:00
qcombobox winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qcommandlinkbutton tst_QCommandLinkButton: Add back wait to the beginning of setAutoRepeat() 2018-05-16 06:10:08 +00:00
qdatetimeedit Apply Qt::ControlModifier to all spin box interactions 2018-05-24 09:44:16 +00:00
qdial Updated license headers 2016-01-21 18:55:18 +00:00
qdialogbuttonbox tests/auto/widgets/widgets: Avoid unconditional qWait()s 2018-04-25 11:55:34 +00:00
qdockwidget widgets: fix QWidget::save/restoreGeometry() 2018-06-25 13:41:06 +00:00
qdoublespinbox winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qfocusframe Updated license headers 2016-01-21 18:55:18 +00:00
qfontcombobox Update usage of QFontMetrics::width() to new API 2017-12-08 15:06:32 +00:00
qframe Fusion: desaturate the brown shades 2017-04-27 16:03:15 +00:00
qgroupbox QGroupBox tests: Correct spelling of "release" 2017-03-22 18:30:14 +00:00
qkeysequenceedit Updated license headers 2016-01-21 18:55:18 +00:00
qlabel tests/auto/widgets/widgets: Avoid unconditional qWait()s 2018-04-25 11:55:34 +00:00
qlcdnumber Updated license headers 2016-01-21 18:55:18 +00:00
qlineedit winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qmainwindow winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qmdiarea winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qmdisubwindow winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qmenu winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qmenubar winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qopenglwidget qtbase: cleanup BLACKLIST files 2018-02-13 15:20:33 +00:00
qplaintextedit winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qprogressbar winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qpushbutton winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qradiobutton tests/auto/widgets/widgets: Avoid unconditional qWait()s 2018-04-25 11:55:34 +00:00
qscrollarea Updated license headers 2016-01-21 18:55:18 +00:00
qscrollbar Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
qsizegrip winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qslider Updated license headers 2016-01-21 18:55:18 +00:00
qspinbox winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qsplashscreen Updated license headers 2016-01-21 18:55:18 +00:00
qsplitter winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qstackedwidget Ensure result of all QTest::qWaitFor are verified 2017-10-05 15:15:36 +00:00
qstatusbar winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qtabbar qtbase: cleanup BLACKLIST files 2018-02-13 15:20:33 +00:00
qtabwidget tst_QTabWidget: Add unconditional qWait() back 2018-05-02 09:04:14 +00:00
qtextbrowser Fix tst_qtextbrowser for configurations with builtin testdata 2018-06-22 05:02:50 +00:00
qtextedit winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
qtoolbar tests/auto/widgets/widgets: Avoid unconditional qWait()s 2018-04-25 11:55:34 +00:00
qtoolbox Updated license headers 2016-01-21 18:55:18 +00:00
qtoolbutton winrt: Make widgets/widgets auto tests pass 2018-06-22 05:02:49 +00:00
widgets.pro winrt: Skip/blacklist failing opengl tests 2018-05-28 08:36:55 +00:00