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. --- gui/dialogs/AccountListDialog.cpp | 10 +++++----- gui/dialogs/AccountSelectDialog.cpp | 2 -- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'gui/dialogs') diff --git a/gui/dialogs/AccountListDialog.cpp b/gui/dialogs/AccountListDialog.cpp index f5268b61..e1f65c16 100644 --- a/gui/dialogs/AccountListDialog.cpp +++ b/gui/dialogs/AccountListDialog.cpp @@ -20,7 +20,6 @@ #include -#include #include #include @@ -117,8 +116,8 @@ void AccountListDialog::addAccount(const QString& errMsg) QString username(loginDialog.username()); QString password(loginDialog.password()); - MojangAccountPtr account = MojangAccountPtr(new MojangAccount(username)); - + MojangAccountPtr account = MojangAccount::createFromUsername(username); +/* ProgressDialog progDialog(this); AuthenticateTask authTask(account, password, &progDialog); if (progDialog.exec(&authTask)) @@ -132,9 +131,9 @@ void AccountListDialog::addAccount(const QString& errMsg) for(AccountProfile profile : account->profiles()) { - auto meta = MMC->metacache()->resolveEntry("skins", profile.name() + ".png"); + auto meta = MMC->metacache()->resolveEntry("skins", profile.name + ".png"); auto action = CacheDownload::make( - QUrl("http://skins.minecraft.net/MinecraftSkins/" + profile.name() + ".png"), + QUrl("http://skins.minecraft.net/MinecraftSkins/" + profile.name + ".png"), meta); job->addNetAction(action); meta->stale = true; @@ -142,5 +141,6 @@ void AccountListDialog::addAccount(const QString& errMsg) job->start(); } + */ } } diff --git a/gui/dialogs/AccountSelectDialog.cpp b/gui/dialogs/AccountSelectDialog.cpp index b8fa9e42..ec2f09be 100644 --- a/gui/dialogs/AccountSelectDialog.cpp +++ b/gui/dialogs/AccountSelectDialog.cpp @@ -20,8 +20,6 @@ #include -#include - #include #include -- cgit v1.2.3