Handle "Delete confirmation" dialog result asynchronously

This is to avoid creating nested event loops as discussed in
https://github.com/qbittorrent/qBittorrent/pull/10786#issuecomment-502795822
This commit is contained in:
Chocobo1 2019-09-29 10:50:07 +08:00
commit c632a91ee5
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
3 changed files with 37 additions and 28 deletions

View file

@ -46,8 +46,7 @@ public:
DeletionConfirmationDialog(QWidget *parent, int size, const QString &name, bool defaultDeleteFiles);
~DeletionConfirmationDialog();
bool shouldDeleteLocalFiles() const;
static bool askForDeletionConfirmation(QWidget *parent, bool &deleteLocalFiles, int size, const QString &name);
bool isDeleteFileSelected() const;
private slots:
void updateRememberButtonState();