qt5base-lts/examples/widgets
Mikolaj Boc 7022d0e223 Replace QDialog::exec() with open() in text edit example
On WASM, the shortcut triggering the dialog in textedit example
seemingly lets the event invoke the default action. What really happens
is that the dialog's exec() does not return and WASM does not have a
chance to set preventDefault() on the keyboard event it receives. This
masks other problems with keyboards shortcuts.

Uses of exec() on message boxes were replaced, too. Closing operation
is now performed in two steps, first the event is ignored and maybeSave
is called to query for potential changes of the text document.
If there are no changes or the file is discarded, the close continues
with a second event, now accepted.

PrintDialog::exec(), QPrintPreviewDialog::exec(), QFileDialog::exec()
were also eliminated in favor of open().

Finally, indirect calls to exec() via QColorDialog::getColor were
removed.

Task-number: QTBUG-76587
Change-Id: Ia90fad46ec3f94244723512be3ec93b64df9d9ef
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-06-20 07:28:42 +01:00
..
animation Examples: Remove unnecessary Q_INIT_RESOURCE calls 2023-06-08 16:15:02 +00:00
desktop Examples: Remove unnecessary Q_INIT_RESOURCE calls 2023-06-08 16:15:02 +00:00
dialogs Dialogs example: add checkbox for ColorDialogOption::NoEyeDropperButton 2023-06-12 15:11:26 +02:00
doc Move widgets blurpicker example to manual test 2023-06-05 19:13:33 +02:00
draganddrop Examples: Remove unnecessary Q_INIT_RESOURCE calls 2023-06-08 16:15:02 +00:00
effects Move widgets blurpicker example to manual test 2023-06-05 19:13:33 +02:00
gallery Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
gestures Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
graphicsview Examples: Remove unnecessary Q_INIT_RESOURCE calls 2023-06-08 16:15:02 +00:00
itemviews Move storageview example into tests/manual 2023-06-12 21:22:36 +02:00
layouts Remove showMaximized() workaround for Android in examples 2022-12-02 15:53:37 +01:00
mainwindows Doc: Fix documentation issues 2023-06-09 18:24:15 +00:00
painting Examples: Remove unnecessary Q_INIT_RESOURCE calls 2023-06-08 16:15:02 +00:00
qnx/foreignwindows Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
richtext Replace QDialog::exec() with open() in text edit example 2023-06-20 07:28:42 +01:00
tools Examples: "About &Qt" should show info about Qt, not quit 2023-06-16 21:37:11 +02:00
touch Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
tutorials Doc cleanup: remove old gettingStarted tutorial, move doc file 2023-05-15 23:54:01 +02:00
widgets Examples: Remove unnecessary Q_INIT_RESOURCE calls 2023-06-08 16:15:02 +00:00
windowcontainer Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
CMakeLists.txt Move scroller/graphicsview example into tests/manual 2023-06-12 21:22:36 +02:00
widgets.pro Move scroller/graphicsview example into tests/manual 2023-06-12 21:22:36 +02:00