aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/dialogs/ProgressDialog.cpp
diff options
context:
space:
mode:
authorhe3als <65787561+he3als@users.noreply.github.com>2022-10-22 15:30:40 +0100
committerGitHub <noreply@github.com>2022-10-22 15:30:40 +0100
commit89fd84d916b58cb7c82c94bcadc0834de8f5a039 (patch)
treefae8c646ca9b35bc2499a4c39787387686ae2a91 /launcher/ui/dialogs/ProgressDialog.cpp
parent92dfd659f1a3e11accdbf0ebbdc7cb91f74d9a21 (diff)
parent81f13052701dbec499ef65fe714f107a9b584ebf (diff)
downloadPrismLauncher-89fd84d916b58cb7c82c94bcadc0834de8f5a039.tar.gz
PrismLauncher-89fd84d916b58cb7c82c94bcadc0834de8f5a039.tar.bz2
PrismLauncher-89fd84d916b58cb7c82c94bcadc0834de8f5a039.zip
Merge branch 'PrismLauncher:develop' into develop
Diffstat (limited to 'launcher/ui/dialogs/ProgressDialog.cpp')
-rw-r--r--launcher/ui/dialogs/ProgressDialog.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/launcher/ui/dialogs/ProgressDialog.cpp b/launcher/ui/dialogs/ProgressDialog.cpp
index 258a32e4..05269f62 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();
@@ -135,11 +136,13 @@ void ProgressDialog::onTaskStarted() {}
void ProgressDialog::onTaskFailed(QString failure)
{
reject();
+ hide();
}
void ProgressDialog::onTaskSucceeded()
{
accept();
+ hide();
}
void ProgressDialog::changeStatus(const QString& status)