Fix login and startup logging issues

Auth uses the refresh endpoint instead of validate. This means less password entering.
Console will now only autoscroll when already scrolled all the way down.
Better conformance with the Yggdrasil auth protocol (not complete yet, but Mojang launcher isn't complete either).
Fix bug that prevented saving the account data (uninitialized variable).
Accounts can now trigger account list saving, this is used for the refresh endpoint.
This commit is contained in:
Petr Mrázek
2013-12-01 02:00:42 +01:00
parent 2eaf33816b
commit f27a6c39ea
27 changed files with 471 additions and 299 deletions

View File

@ -69,10 +69,9 @@ public:
void killMinecraft();
inline void setLogin(QString user, QString sid)
inline void setLogin(MojangAccountPtr account)
{
username = user;
sessionID = sid;
m_account = account;
}
signals:
@ -104,11 +103,13 @@ signals:
void log(QString text, MessageLevel::Enum level = MessageLevel::MultiMC);
protected:
BaseInstance *m_instance;
BaseInstance *m_instance = nullptr;
QStringList m_args;
QString m_err_leftover;
QString m_out_leftover;
QProcess m_prepostlaunchprocess;
bool killed = false;
MojangAccountPtr m_account;
protected
slots:
@ -117,8 +118,7 @@ slots:
void on_stdOut();
private:
bool killed;
QString censorPrivateInfo(QString in);
MessageLevel::Enum getLevel(const QString &message, MessageLevel::Enum defaultLevel);
QString sessionID;
QString username;
};