summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2017-07-04 19:16:13 +0200
committerLéo Lam <leo@innovatetechnologi.es>2017-08-10 23:47:18 +0800
commit5ba6182bbc6cdad229fddcd9fdd449d666e1e75c (patch)
tree0223f497cb449e559220d6ad5d14783ae2dfa5c6 /Source/Core
parentea3b351d9237d8188928df1db1bb7ef5a42f72cd (diff)
Qt: Fix WiiUpdate progress dialog cancel button
We didn't properly remove the default cancellation handler, which would cause crashes if the dialog was gone too early.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinQt2/WiiUpdate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt2/WiiUpdate.cpp b/Source/Core/DolphinQt2/WiiUpdate.cpp
index cd9b0275e0..397765f4c9 100644
--- a/Source/Core/DolphinQt2/WiiUpdate.cpp
+++ b/Source/Core/DolphinQt2/WiiUpdate.cpp
@@ -98,7 +98,7 @@ static WiiUtils::UpdateResult ShowProgress(QWidget* parent, Callable function, A
auto* cancel_button = new QPushButton(QObject::tr("&Cancel"), parent);
dialog.setCancelButton(cancel_button);
Common::Flag was_cancelled;
- QObject::disconnect(&dialog, &QProgressDialog::canceled, &dialog, &QProgressDialog::cancel);
+ QObject::disconnect(&dialog, &QProgressDialog::canceled, nullptr, nullptr);
QObject::connect(&dialog, &QProgressDialog::canceled, [&] {
dialog.setLabelText(QObject::tr("Finishing the update...\nThis can take a while."));
cancel_button->setEnabled(false);
@@ -120,7 +120,7 @@ static WiiUtils::UpdateResult ShowProgress(QWidget* parent, Callable function, A
return !was_cancelled.IsSet();
},
std::forward<Args>(args)...);
- QueueOnObject(&dialog, [&dialog] { dialog.close(); });
+ QueueOnObject(&dialog, [&dialog] { dialog.done(0); });
return res;
});