diff options
author | Mikolaj Boc <mikolaj.boc@qt.io> | 2022-09-08 15:26:00 +0200 |
---|---|---|
committer | Mikolaj Boc <mikolaj.boc@qt.io> | 2023-06-20 07:28:42 +0100 |
commit | 7022d0e22364b7c075a20670d023fc590a0a7ac4 (patch) | |
tree | 5a1912281fc4f78e6bc77c5ff938bd7ed9a0f6f3 /src/tools/moc | |
parent | a6059cebe85c4ba8dd43df8aae146799c8bb6cb0 (diff) |
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>
Diffstat (limited to 'src/tools/moc')
0 files changed, 0 insertions, 0 deletions