Dehardcode account providers (#38)

* Dehardcode account providers

* Fix crash on creation

* Add dynamic 'add account dialog' provider selector

* Fix typo and add newlines

* Rename loginType to provider

* Rename MojangAccount to Account and MojangAccountList to AccountList

* Fix json save error
This commit is contained in:
Max
2021-06-14 12:51:25 +03:00
committed by GitHub
parent 396400b60d
commit 167b6bd405
39 changed files with 398 additions and 261 deletions

View File

@@ -19,7 +19,7 @@
#include <memory>
#include "minecraft/auth/MojangAccountList.h"
#include "minecraft/auth/AccountList.h"
namespace Ui
{
@@ -59,7 +59,7 @@ public:
* Gets a pointer to the account that the user selected.
* This is null if the user clicked cancel or hasn't clicked OK yet.
*/
MojangAccountPtr selectedAccount() const;
AccountPtr selectedAccount() const;
/*!
* Returns true if the user checked the "use as global default" checkbox.
@@ -80,10 +80,10 @@ slots:
void on_buttonBox_rejected();
protected:
std::shared_ptr<MojangAccountList> m_accounts;
std::shared_ptr<AccountList> m_accounts;
//! The account that was selected when the user clicked OK.
MojangAccountPtr m_selected;
AccountPtr m_selected;
private:
Ui::ProfileSelectDialog *ui;