diff options
author | flow <flowlnlnln@gmail.com> | 2022-07-28 15:58:04 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-09-20 18:36:09 -0300 |
commit | 654157096985d0cec0d3b7bb53f39a5c0157206e (patch) | |
tree | 91a522b27991652829711e2f7cfb28887b53ed1f /launcher/ui/dialogs | |
parent | 4b0ceea8941826134c949b1c2fb80e05c174e5ec (diff) | |
download | PrismLauncher-654157096985d0cec0d3b7bb53f39a5c0157206e.tar.gz PrismLauncher-654157096985d0cec0d3b7bb53f39a5c0157206e.tar.bz2 PrismLauncher-654157096985d0cec0d3b7bb53f39a5c0157206e.zip |
fix: simplify abort handling and add missing emits
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r-- | launcher/ui/dialogs/ProgressDialog.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/launcher/ui/dialogs/ProgressDialog.cpp b/launcher/ui/dialogs/ProgressDialog.cpp index 3c7f53d3..6f9cc8e0 100644 --- a/launcher/ui/dialogs/ProgressDialog.cpp +++ b/launcher/ui/dialogs/ProgressDialog.cpp @@ -43,8 +43,7 @@ void ProgressDialog::setSkipButton(bool present, QString label) void ProgressDialog::on_skipButton_clicked(bool checked) { Q_UNUSED(checked); - if (task->abort()) - QDialog::reject(); + task->abort(); } ProgressDialog::~ProgressDialog() @@ -81,7 +80,7 @@ int ProgressDialog::execWithTask(Task* task) connect(task, &Task::stepStatus, this, &ProgressDialog::changeStatus); connect(task, &Task::progress, this, &ProgressDialog::changeProgress); - connect(task, &Task::aborted, [this] { onTaskFailed(tr("Aborted by user")); }); + connect(task, &Task::aborted, [this] { QDialog::reject(); }); m_is_multi_step = task->isMultiStep(); if (!m_is_multi_step) { |