qt5base-lts/tests/auto/widgets
Volker Hilsheimer 7ba75d088c QWidget: close the QWindow in QWidget::close
We want to close the window, end full screen mode on macOS, and free
platform resources. This is all done by QWindow::close. QWindow::close
closes the platform window, triggering a closeEvent to QWidgetWindow,
which then calls QWidgetPrivate::close_helper.

This way, closing a window via QWidget::close, QWindow::close, or
interactively by the user are all equivalent.

The QCloseEvent generated by the widget needs to be spontaneous for
window-system generated events (i.e. the user clicked the close button),
and non-spontaneous if the window closes because of a call to
QWindow::close. To keep track of whether the event originated in an
explicit call to QWindow::close, add a boolean to the QWindowPrivate.

Add a test case that verifies that the window resources is destroyed,
and that events are delivered as they should.

Done-with: Morten Johan Sørvig <morten.sorvig@qt.io>
Fixes: QTBUG-46701
Pick-to: 6.2
Change-Id: Iacb6a2c8d5e880b16b0c8f0c9257ed94bed36f5b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-09-02 20:34:48 +02:00
..
dialogs tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
effects Fix tst_qgraphicseffect on Wayland 2021-03-11 08:04:21 +01:00
graphicsview Revert "Forward touchEvents to children inside QGraphicsProxyWidget" 2021-08-30 19:34:50 +00:00
itemviews Fix QListView assert when the last row is moved in IconMode 2021-09-01 16:03:15 +00:00
kernel QWidget: close the QWindow in QWidget::close 2021-09-02 20:34:48 +02:00
styles Implement missing support for 'em' and 'ex' lengths in style sheet 2021-08-10 19:43:02 +02:00
util Fix auto completion in QFileDialog on Windows 2021-07-09 00:48:44 +02:00
widgets Port to QImage and QPixmap deviceIndependentSize() 2021-09-01 15:24:05 +02:00
CMakeLists.txt