Show errors when logging in in the account dialog.

This commit is contained in:
Petr Mrázek
2013-12-22 19:47:58 +01:00
parent 3051d0d328
commit 77ddf8b5d7
3 changed files with 24 additions and 13 deletions

View File

@ -26,7 +26,9 @@
#include <gui/dialogs/EditAccountDialog.h>
#include <gui/dialogs/ProgressDialog.h>
#include <gui/dialogs/AccountSelectDialog.h>
#include "CustomMessageBox.h"
#include <logic/tasks/Task.h>
#include <logic/auth/YggdrasilTask.h>
#include <MultiMC.h>
@ -147,5 +149,12 @@ void AccountListDialog::addAccount(const QString& errMsg)
job->start();
}
else
{
auto reason = task->failReason();
auto dlg = CustomMessageBox::selectable(this, tr("Login error."), reason, QMessageBox::Critical);
dlg->exec();
delete dlg;
}
}
}