qt/qml: fix shortcut dialog handling
- Allowing preferences dialog to be opened multiple time freezes the application. I think co-existence should not be allowed. I did not change it to a singleton because it seems it should not allocate memory when not shown.
- Various methods in
DialogsProvider
use static methods that are available inQFileDialog
. These methods createQDialog
objects, and callsexec()
. This creates a new event loop, and this allows the same dialog to be opened multiple times without waiting for the old one to exit when the same shortcut is invoked.- In the future, I think that these static methods should not be used, because they are not compatible with
QWindow
. They either need to be reimplemented in a way that allows to set their transient parent window (being done in at least some of the current native dialogs), or maybe Qt labs platform dialogs should be used.
- In the future, I think that these static methods should not be used, because they are not compatible with
Edited by Fatih Uzunoğlu