aboutsummaryrefslogtreecommitdiff
path: root/launcher/Application.cpp
diff options
context:
space:
mode:
authorLennyMcLennington <lenny@sneed.church>2022-02-13 14:06:27 +0000
committerGitHub <noreply@github.com>2022-02-13 14:06:27 +0000
commita5b06514c633313409a5f4e479f1d6f354f8c4e2 (patch)
treef4ec5d771db9398984dc6b8d18541f1010da2da4 /launcher/Application.cpp
parent70a055bc278d4be86b5fca3f03ada312c4577f3d (diff)
parenta309f4e72143b28865d5a8b94dcf913d3a95773f (diff)
downloadPrismLauncher-a5b06514c633313409a5f4e479f1d6f354f8c4e2.tar.gz
PrismLauncher-a5b06514c633313409a5f4e479f1d6f354f8c4e2.tar.bz2
PrismLauncher-a5b06514c633313409a5f4e479f1d6f354f8c4e2.zip
Merge pull request #161 from Scrumplex/custom-clientid
Add MSA-Client-ID override in UI
Diffstat (limited to 'launcher/Application.cpp')
-rw-r--r--launcher/Application.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp
index 93cefc28..a3d6216e 100644
--- a/launcher/Application.cpp
+++ b/launcher/Application.cpp
@@ -14,7 +14,7 @@
#include "ui/pages/global/ProxyPage.h"
#include "ui/pages/global/ExternalToolsPage.h"
#include "ui/pages/global/AccountListPage.h"
-#include "ui/pages/global/PastePage.h"
+#include "ui/pages/global/APIPage.h"
#include "ui/pages/global/CustomCommandsPage.h"
#include "ui/themes/ITheme.h"
@@ -719,6 +719,9 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
m_settings->registerSetting("CloseAfterLaunch", false);
+ // Custom MSA credentials
+ m_settings->registerSetting("MSAClientIDOverride", "");
+
// Init page provider
{
m_globalSettingsProvider = std::make_shared<GenericPageProvider>(tr("Settings"));
@@ -730,7 +733,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
m_globalSettingsProvider->addPage<ProxyPage>();
m_globalSettingsProvider->addPage<ExternalToolsPage>();
m_globalSettingsProvider->addPage<AccountListPage>();
- m_globalSettingsProvider->addPage<PastePage>();
+ m_globalSettingsProvider->addPage<APIPage>();
}
qDebug() << "<> Settings loaded.";
}
@@ -1516,3 +1519,13 @@ QString Application::getJarsPath()
}
return m_jarsPath;
}
+
+QString Application::getMSAClientID()
+{
+ QString clientIDOverride = m_settings->get("MSAClientIDOverride").toString();
+ if (!clientIDOverride.isEmpty()) {
+ return clientIDOverride;
+ }
+
+ return BuildConfig.MSA_CLIENT_ID;
+}