mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 13:47:46 +02:00
Merge pull request #2828 from Trial97/cmake_fields
Allow configuring more URLs through CMake
This commit is contained in:
@ -90,15 +90,16 @@ MSAStep::MSAStep(AccountData* data, bool silent) : AuthStep(data), m_silent(sile
|
||||
|
||||
{
|
||||
auto replyHandler = new QOAuthHttpServerReplyHandler(this);
|
||||
replyHandler->setCallbackText(R"XXX(
|
||||
replyHandler->setCallbackText(QString(R"XXX(
|
||||
<noscript>
|
||||
<meta http-equiv="Refresh" content="0; URL=https://prismlauncher.org/successful-login" />
|
||||
<meta http-equiv="Refresh" content="0; URL=%1" />
|
||||
</noscript>
|
||||
Login Successful, redirecting...
|
||||
<script>
|
||||
window.location.replace("https://prismlauncher.org/successful-login");
|
||||
window.location.replace("%1");
|
||||
</script>
|
||||
)XXX");
|
||||
)XXX")
|
||||
.arg(BuildConfig.LOGIN_CALLBACK_URL));
|
||||
oauth2.setReplyHandler(replyHandler);
|
||||
} else {
|
||||
oauth2.setReplyHandler(new CustomOAuthOobReplyHandler(this));
|
||||
|
@ -550,7 +550,7 @@ void TranslationsModel::downloadIndex()
|
||||
d->m_index_job.reset(new NetJob("Translations Index", APPLICATION->network()));
|
||||
MetaEntryPtr entry = APPLICATION->metacache()->resolveEntry("translations", "index_v2.json");
|
||||
entry->setStale(true);
|
||||
auto task = Net::Download::makeCached(QUrl(BuildConfig.TRANSLATIONS_BASE_URL + "index_v2.json"), entry);
|
||||
auto task = Net::Download::makeCached(QUrl(BuildConfig.TRANSLATION_FILES_URL + "index_v2.json"), entry);
|
||||
d->m_index_task = task.get();
|
||||
d->m_index_job->addNetAction(task);
|
||||
d->m_index_job->setAskRetry(false);
|
||||
@ -591,7 +591,7 @@ void TranslationsModel::downloadTranslation(QString key)
|
||||
MetaEntryPtr entry = APPLICATION->metacache()->resolveEntry("translations", "mmc_" + key + ".qm");
|
||||
entry->setStale(true);
|
||||
|
||||
auto dl = Net::Download::makeCached(QUrl(BuildConfig.TRANSLATIONS_BASE_URL + lang->file_name), entry);
|
||||
auto dl = Net::Download::makeCached(QUrl(BuildConfig.TRANSLATION_FILES_URL + lang->file_name), entry);
|
||||
dl->addValidator(new Net::ChecksumValidator(QCryptographicHash::Sha1, lang->file_sha1));
|
||||
dl->setProgress(dl->getProgress(), lang->file_size);
|
||||
|
||||
|
Reference in New Issue
Block a user