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
parent 19b6f56a0a
commit c632a91ee5
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();