diff options
author | flow <flowlnlnln@gmail.com> | 2022-10-13 15:10:35 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-10-13 15:10:35 -0300 |
commit | dfa220ef02f23ff734dec6247f4a124a7a144c7a (patch) | |
tree | 73dc55f36db5e421ad529f21fd38fcc5291d7974 /launcher/ui/dialogs/ProgressDialog.cpp | |
parent | f26be005716818b643a0c8b1373dbe83e4cdcfbf (diff) | |
download | PrismLauncher-dfa220ef02f23ff734dec6247f4a124a7a144c7a.tar.gz PrismLauncher-dfa220ef02f23ff734dec6247f4a124a7a144c7a.tar.bz2 PrismLauncher-dfa220ef02f23ff734dec6247f4a124a7a144c7a.zip |
fix: issues with aborts (again)
i hate it
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/dialogs/ProgressDialog.cpp')
-rw-r--r-- | launcher/ui/dialogs/ProgressDialog.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/launcher/ui/dialogs/ProgressDialog.cpp b/launcher/ui/dialogs/ProgressDialog.cpp index 258a32e4..68dd4d17 100644 --- a/launcher/ui/dialogs/ProgressDialog.cpp +++ b/launcher/ui/dialogs/ProgressDialog.cpp @@ -25,6 +25,7 @@ ProgressDialog::ProgressDialog(QWidget* parent) : QDialog(parent), ui(new Ui::Pr { ui->setupUi(this); this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint); + setAttribute(Qt::WidgetAttribute::WA_QuitOnClose, true); setSkipButton(false); changeProgress(0, 100); } @@ -67,7 +68,7 @@ int ProgressDialog::execWithTask(Task* task) return QDialog::DialogCode::Accepted; } - QDialog::DialogCode result; + QDialog::DialogCode result {}; if (handleImmediateResult(result)) { return result; } @@ -80,7 +81,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] { QDialog::reject(); }); + connect(task, &Task::aborted, this, &ProgressDialog::hide); connect(task, &Task::abortStatusChanged, ui->skipButton, &QPushButton::setEnabled); m_is_multi_step = task->isMultiStep(); |