diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-02-03 11:35:33 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-02-04 07:01:14 +0100 |
commit | a54abf77c40c59e5a4d8a70e1b129b1e420265a3 (patch) | |
tree | c0994060bdbadf8499c87e5345840edeae6d388f /schema | |
parent | 0a83e6dfaff35bf8ee74d6d7f49bb1b2df0958c8 (diff) |
tdf#130857 qt weld: Support asnyc running of msg dialogs
Implement methods required to run a welded Qt message dialog
asynchronously: `QtInstanceMessageDialog::runAsync` and
`QtInstanceMessageDialog::response`.
Run the dialog asynchronously using `QDialog::open` and
connect to the `QDialog::finished` signal to be notified
when the dialog gets closed.
Similar to how the gtk-based implementation, use local
variables for the `std::shared_ptr`s and reset the members
right away, not only at the end of the slot, since resetting
the relevant one set in the corresponding `runAsync` overload
will result in the object getting deallocated, thus the members
can no longer be accessed safely.
Take the solar mutex before calling the callback function
as that seems to be expected (e.g. otherwise triggers an assert
for the below example where the callback functions
modifies VCL widgets).
With this in place, running welded Qt message dialogs
asynchronously works instead of not showing up at all, e.g.
1) start Writer with qt6 VCL plugin and without
`SAL_VCL_QT_NO_WELDED_WIDGETS` set
2) open "File" -> "Properties" -> "Security"
3) click the "Protect..." button
4) enter 2 different passwords and press "OK" button
Change-Id: Ic1b1bfc7d89c1be8a9f9dee59bc86cf3da37a280
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162948
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'schema')
0 files changed, 0 insertions, 0 deletions