NOISSUE some safe refactors and changes of the task subsystem
Possibly also some bug fixes.
This commit is contained in:
@ -33,7 +33,7 @@ QString GuiUtil::uploadPaste(const QString &text, QWidget *parentWidget)
|
||||
}
|
||||
|
||||
dialog.execWithTask(paste.get());
|
||||
if (!paste->successful())
|
||||
if (!paste->wasSuccessful())
|
||||
{
|
||||
CustomMessageBox::selectable(parentWidget, QObject::tr("Upload failed"),
|
||||
paste->failReason(), QMessageBox::Critical)->exec();
|
||||
|
@ -103,7 +103,7 @@ void LaunchController::login()
|
||||
progDialog.setSkipButton(true, tr("Play Offline"));
|
||||
}
|
||||
progDialog.execWithTask(task.get());
|
||||
if (!task->successful())
|
||||
if (!task->wasSuccessful())
|
||||
{
|
||||
auto failReasonNew = task->failReason();
|
||||
if(failReasonNew == "Invalid token.")
|
||||
|
@ -116,7 +116,7 @@ bool ProgressDialog::handleImmediateResult(QDialog::DialogCode &result)
|
||||
{
|
||||
if(task->isFinished())
|
||||
{
|
||||
if(task->successful())
|
||||
if(task->wasSuccessful())
|
||||
{
|
||||
result = QDialog::Accepted;
|
||||
}
|
||||
|
@ -48,12 +48,12 @@ bool ProgressWidget::exec(std::shared_ptr<Task> task)
|
||||
{
|
||||
loop.exec();
|
||||
}
|
||||
return task->successful();
|
||||
return task->wasSuccessful();
|
||||
}
|
||||
|
||||
void ProgressWidget::handleTaskFinish()
|
||||
{
|
||||
if (!m_task->successful())
|
||||
if (!m_task->wasSuccessful())
|
||||
{
|
||||
m_label->setText(m_task->failReason());
|
||||
}
|
||||
|
Reference in New Issue
Block a user