forked from MultiMC/Launcher
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UltimMC: Restructure local accounts working
- Loading branch information
1 parent
82df3ac
commit 81c6b31
Showing
14 changed files
with
219 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "Local.h" | ||
|
||
#include "minecraft/auth/steps/LocalStep.h" | ||
|
||
LocalRefresh::LocalRefresh(AccountData* data, QObject* parent) : AuthFlow(data, parent) | ||
{ | ||
m_steps.append(makeShared<LocalStep>(m_data)); | ||
} | ||
|
||
LocalLogin::LocalLogin(AccountData* data, QObject* parent) : AuthFlow(data, parent) | ||
{ | ||
m_steps.append(makeShared<LocalStep>(m_data)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
#include "AuthFlow.h" | ||
|
||
class LocalRefresh : public AuthFlow { | ||
Q_OBJECT | ||
public: | ||
explicit LocalRefresh(AccountData* data, QObject* parent = 0); | ||
}; | ||
|
||
class LocalLogin : public AuthFlow { | ||
Q_OBJECT | ||
public: | ||
explicit LocalLogin(AccountData* data, QObject* parent = 0); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "LocalStep.h" | ||
|
||
#include "Application.h" | ||
|
||
LocalStep::LocalStep(AccountData* data) : AuthStep(data) {} | ||
LocalStep::~LocalStep() noexcept = default; | ||
|
||
QString LocalStep::describe() | ||
{ | ||
return tr("Creating local account."); | ||
} | ||
|
||
void LocalStep::rehydrate() | ||
{ | ||
// NOOP | ||
} | ||
|
||
void LocalStep::perform() | ||
{ | ||
emit finished(AccountTaskState::STATE_WORKING, tr("Created local account.")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
#include <QObject> | ||
|
||
#include "QObjectPtr.h" | ||
#include "minecraft/auth/AuthStep.h" | ||
|
||
#include <katabasis/DeviceFlow.h> | ||
|
||
class LocalStep : public AuthStep { | ||
Q_OBJECT | ||
public: | ||
explicit LocalStep(AccountData* data); | ||
virtual ~LocalStep() noexcept; | ||
|
||
void perform() override; | ||
void rehydrate() override; | ||
|
||
QString describe() override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.