Use Task::getState
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
06aece111a
commit
a195b9981d
1 changed files with 1 additions and 7 deletions
|
@ -299,16 +299,10 @@ void LaunchController::login()
|
||||||
progDialog.setSkipButton(true, tr("Abort"));
|
progDialog.setSkipButton(true, tr("Abort"));
|
||||||
|
|
||||||
auto task = accountToCheck->currentTask();
|
auto task = accountToCheck->currentTask();
|
||||||
|
|
||||||
bool aborted = false;
|
|
||||||
auto abortListener = connect(task.get(), &Task::aborted, [&aborted] { aborted = true; });
|
|
||||||
|
|
||||||
progDialog.execWithTask(task.get());
|
progDialog.execWithTask(task.get());
|
||||||
|
|
||||||
disconnect(abortListener);
|
|
||||||
|
|
||||||
// don't retry if aborted
|
// don't retry if aborted
|
||||||
if (aborted)
|
if (task->getState() == Task::State::AbortedByUser)
|
||||||
tryagain = false;
|
tryagain = false;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue