Move MSA Client ID to the same place as the others
MSA Client ID has been moved to CMakeLists.txt, and defaults to the Client ID for the PolyMC application. Removed secrets/notsecrets library, replace with (temporary?) program_info subdirectory.
This commit is contained in:
@ -76,8 +76,6 @@
|
||||
#include <ganalytics.h>
|
||||
#include <sys.h>
|
||||
|
||||
#include <Secrets.h>
|
||||
|
||||
|
||||
#if defined Q_OS_WIN32
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@ -1559,10 +1557,6 @@ void Application::on_windowClose()
|
||||
}
|
||||
}
|
||||
|
||||
QString Application::msaClientId() const {
|
||||
return Secrets::getMSAClientID('-');
|
||||
}
|
||||
|
||||
void Application::updateProxySettings(QString proxyTypeStr, QString addr, int port, QString user, QString password)
|
||||
{
|
||||
// Set the application proxy settings.
|
||||
|
@ -104,8 +104,6 @@ public:
|
||||
return m_accounts;
|
||||
}
|
||||
|
||||
QString msaClientId() const;
|
||||
|
||||
Status status() const {
|
||||
return m_status;
|
||||
}
|
||||
|
@ -935,7 +935,7 @@ target_link_libraries(Launcher_logic
|
||||
ganalytics
|
||||
)
|
||||
|
||||
target_link_libraries(Launcher_logic secrets)
|
||||
target_link_libraries(Launcher_logic)
|
||||
|
||||
add_executable(${Launcher_Name} MACOSX_BUNDLE WIN32 main.cpp ${LAUNCHER_RCS})
|
||||
target_link_libraries(${Launcher_Name} Launcher_logic)
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include <QNetworkRequest>
|
||||
|
||||
#include "BuildConfig.h"
|
||||
#include "minecraft/auth/AuthRequest.h"
|
||||
#include "minecraft/auth/Parsers.h"
|
||||
|
||||
@ -13,7 +14,7 @@ using Activity = Katabasis::Activity;
|
||||
MSAStep::MSAStep(AccountData* data, Action action) : AuthStep(data), m_action(action) {
|
||||
OAuth2::Options opts;
|
||||
opts.scope = "XboxLive.signin offline_access";
|
||||
opts.clientIdentifier = APPLICATION->msaClientId();
|
||||
opts.clientIdentifier = BuildConfig.MSA_CLIENT_ID;
|
||||
opts.authorizationUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode";
|
||||
opts.accessTokenUrl = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token";
|
||||
|
||||
|
@ -835,15 +835,6 @@ QModelIndex InstanceView::moveCursor(QAbstractItemView::CursorAction cursorActio
|
||||
if(group_index < 0)
|
||||
return current;
|
||||
|
||||
auto real_group = m_groups[group_index];
|
||||
int beginning_row = 0;
|
||||
for(auto group: m_groups)
|
||||
{
|
||||
if(group == real_group)
|
||||
break;
|
||||
beginning_row += group->numRows();
|
||||
}
|
||||
|
||||
QPair<int, int> pos = cat->positionOf(current);
|
||||
int column = pos.first;
|
||||
int row = pos.second;
|
||||
|
@ -37,8 +37,6 @@
|
||||
|
||||
#include "BuildConfig.h"
|
||||
|
||||
#include "Secrets.h"
|
||||
|
||||
AccountListPage::AccountListPage(QWidget *parent)
|
||||
: QMainWindow(parent), ui(new Ui::AccountListPage)
|
||||
{
|
||||
@ -74,7 +72,7 @@ AccountListPage::AccountListPage(QWidget *parent)
|
||||
updateButtonStates();
|
||||
|
||||
// Xbox authentication won't work without a client identifier, so disable the button if it is missing
|
||||
ui->actionAddMicrosoft->setVisible(Secrets::hasMSAClientID());
|
||||
ui->actionAddMicrosoft->setVisible(BuildConfig.MSA_CLIENT_ID.size() != 0);
|
||||
}
|
||||
|
||||
AccountListPage::~AccountListPage()
|
||||
|
Reference in New Issue
Block a user