summaryrefslogtreecommitdiffstats
path: root/gui/dialogs
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-12-05 02:39:52 +0100
committerPetr Mrázek <peterix@gmail.com>2013-12-05 02:39:52 +0100
commitf028aa76bc5d28b7fc4d1ea4e194895690e9944e (patch)
tree5157fb0c4675c7f6f14c3947ab685f3b87d45610 /gui/dialogs
parent613699b3626aea750093ab7eaaeccaa28c0e87c6 (diff)
downloadMultiMC-f028aa76bc5d28b7fc4d1ea4e194895690e9944e.tar
MultiMC-f028aa76bc5d28b7fc4d1ea4e194895690e9944e.tar.gz
MultiMC-f028aa76bc5d28b7fc4d1ea4e194895690e9944e.tar.lz
MultiMC-f028aa76bc5d28b7fc4d1ea4e194895690e9944e.tar.xz
MultiMC-f028aa76bc5d28b7fc4d1ea4e194895690e9944e.zip
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.
Diffstat (limited to 'gui/dialogs')
-rw-r--r--gui/dialogs/AccountListDialog.cpp10
-rw-r--r--gui/dialogs/AccountSelectDialog.cpp2
2 files changed, 5 insertions, 7 deletions
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 <logger/QsLog.h>
-#include <logic/auth/flows/AuthenticateTask.h>
#include <logic/net/NetJob.h>
#include <gui/dialogs/EditAccountDialog.h>
@@ -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 <logger/QsLog.h>
-#include <logic/auth/flows/AuthenticateTask.h>
-
#include <gui/dialogs/ProgressDialog.h>
#include <MultiMC.h>