Offline mode support, part 1
Refactor MojangAccount so it exposes a less generic interface and supports login. Hide the ugly details. Yggdrasil tasks are now only used from MojangAccount.
This commit is contained in:
@ -31,7 +31,7 @@ class YggdrasilTask : public Task
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit YggdrasilTask(MojangAccountPtr account, QObject *parent = 0);
|
||||
explicit YggdrasilTask(MojangAccount * account, QObject *parent = 0);
|
||||
~YggdrasilTask();
|
||||
|
||||
/**
|
||||
@ -59,11 +59,6 @@ public:
|
||||
QString m_cause;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the Mojang account that this task is operating on.
|
||||
*/
|
||||
virtual MojangAccountPtr getMojangAccount() const;
|
||||
|
||||
/**
|
||||
* Returns a pointer to a YggdrasilTask::Error object if an error has occurred.
|
||||
* If no error has occurred, returns a null pointer.
|
||||
@ -120,11 +115,11 @@ protected:
|
||||
*/
|
||||
virtual QString getStateMessage(const State state) const;
|
||||
|
||||
MojangAccountPtr m_account;
|
||||
MojangAccount *m_account = nullptr;
|
||||
|
||||
QNetworkReply *m_netReply;
|
||||
|
||||
Error *m_error;
|
||||
Error *m_error = nullptr;
|
||||
|
||||
protected
|
||||
slots:
|
||||
|
Reference in New Issue
Block a user