From f028aa76bc5d28b7fc4d1ea4e194895690e9944e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 5 Dec 2013 02:39:52 +0100 Subject: 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. --- logic/auth/YggdrasilTask.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'logic/auth/YggdrasilTask.h') diff --git a/logic/auth/YggdrasilTask.h b/logic/auth/YggdrasilTask.h index 62638c9d..18d3dc61 100644 --- a/logic/auth/YggdrasilTask.h +++ b/logic/auth/YggdrasilTask.h @@ -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: -- cgit v1.2.3