qt5base-lts/tests/auto/widgets/dialogs
Tor Arne Vestbø 0246bfd40a Close QDialog via QWidget::close()
By going via QWidget::close() we ensure that if there's a QWidgetWindow
backing the dialog (which is almost always the case), we will plumb down
to QWindow::close(), resulting in QEvent::Close events to the QWindow.

Since we don't want QDialog subclasses to receive a call to a closeEvent
override that they didn't receive before (and which they might interpret
as rejection or cancellation), install a temporary event filter that
eats the QCloseEvent resulting from the call to close().

Task-number: QTBUG-53286
Change-Id: Ie8f6f0cb3160acfd5865dc74f0a7b6d87f838724
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-09-16 14:24:00 +02:00
..
qcolordialog Remove the qmake project files 2021-01-07 15:32:28 +01:00
qdialog Close QDialog via QWidget::close() 2021-09-16 14:24:00 +02:00
qerrormessage Remove the qmake project files 2021-01-07 15:32:28 +01:00
qfiledialog tests: Use QT_TESTCASE_SOURCEDIR define 2021-08-11 21:03:56 +02:00
qfiledialog2 tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
qfontdialog testlib: Deprecate QWARN() in favor of qWarning() 2021-08-04 19:31:51 +02:00
qinputdialog Remove the qmake project files 2021-01-07 15:32:28 +01:00
qmessagebox macOS: Don't show QMessageBox::about(Qt) as modal windows 2021-09-09 15:10:36 +00:00
qprogressdialog Re-layout QProgressDialog when setting the cancel button 2021-04-19 09:22:04 +00:00
qsidebar Remove the qmake project files 2021-01-07 15:32:28 +01:00
qwizard Remove the qmake project files 2021-01-07 15:32:28 +01:00
CMakeLists.txt Android: exclude tests crashing at start 2020-11-16 13:35:44 +02:00