diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-10-19 13:51:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 13:51:35 +0200 |
commit | 46c57e120f50084b310879286a2774334b53d2af (patch) | |
tree | c07fb5de0126acd5b2029d8faf28fe9bdfc74316 /launcher/ui/dialogs/ProgressDialog.cpp | |
parent | 6b52ee61aebe147c2717f71675b8ca6f6ab7b60a (diff) | |
parent | c90a88b6b6cf1b7d0fe2b6784de880762201f4a9 (diff) | |
download | PrismLauncher-46c57e120f50084b310879286a2774334b53d2af.tar.gz PrismLauncher-46c57e120f50084b310879286a2774334b53d2af.tar.bz2 PrismLauncher-46c57e120f50084b310879286a2774334b53d2af.zip |
Merge pull request #27 from flowln/ftb_install_improve
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(); |