diff options
Diffstat (limited to 'launcher/dialogs/UpdateDialog.cpp')
-rw-r--r-- | launcher/dialogs/UpdateDialog.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/launcher/dialogs/UpdateDialog.cpp b/launcher/dialogs/UpdateDialog.cpp index 2baaf5e9..ca3bd915 100644 --- a/launcher/dialogs/UpdateDialog.cpp +++ b/launcher/dialogs/UpdateDialog.cpp @@ -1,7 +1,7 @@ #include "UpdateDialog.h" #include "ui_UpdateDialog.h" #include <QDebug> -#include "MultiMC.h" +#include "Launcher.h" #include <settings/SettingsObject.h> #include <Json.h> @@ -11,7 +11,7 @@ UpdateDialog::UpdateDialog(bool hasUpdate, QWidget *parent) : QDialog(parent), ui(new Ui::UpdateDialog) { ui->setupUi(this); - auto channel = MMC->settings()->get("UpdateChannel").toString(); + auto channel = LAUNCHER->settings()->get("UpdateChannel").toString(); if(hasUpdate) { ui->label->setText(tr("A new %1 update is available!").arg(channel)); @@ -24,7 +24,7 @@ UpdateDialog::UpdateDialog(bool hasUpdate, QWidget *parent) : QDialog(parent), u } ui->changelogBrowser->setHtml(tr("<center><h1>Loading changelog...</h1></center>")); loadChangelog(); - restoreGeometry(QByteArray::fromBase64(MMC->settings()->get("UpdateDialogGeometry").toByteArray())); + restoreGeometry(QByteArray::fromBase64(LAUNCHER->settings()->get("UpdateDialogGeometry").toByteArray())); } UpdateDialog::~UpdateDialog() @@ -33,17 +33,17 @@ UpdateDialog::~UpdateDialog() void UpdateDialog::loadChangelog() { - auto channel = MMC->settings()->get("UpdateChannel").toString(); + auto channel = LAUNCHER->settings()->get("UpdateChannel").toString(); dljob.reset(new NetJob("Changelog")); QString url; if(channel == "stable") { - url = QString("https://raw.githubusercontent.com/MultiMC/MultiMC5/%1/changelog.md").arg(channel); + url = QString("https://raw.githubusercontent.com/MultiMC/Launcher/%1/changelog.md").arg(channel); m_changelogType = CHANGELOG_MARKDOWN; } else { - url = QString("https://api.github.com/repos/MultiMC/MultiMC5/compare/%1...%2").arg(BuildConfig.GIT_COMMIT, channel); + url = QString("https://api.github.com/repos/MultiMC/Launcher/compare/%1...%2").arg(BuildConfig.GIT_COMMIT, channel); m_changelogType = CHANGELOG_COMMITS; } dljob->addNetAction(Net::Download::makeByteArray(QUrl(url), &changelogData)); @@ -58,14 +58,14 @@ QString reprocessMarkdown(QByteArray markdown) QString output = hoedown.process(markdown); // HACK: easier than customizing hoedown - output.replace(QRegExp("GH-([0-9]+)"), "<a href=\"https://github.com/MultiMC/MultiMC5/issues/\\1\">GH-\\1</a>"); + output.replace(QRegExp("GH-([0-9]+)"), "<a href=\"https://github.com/MultiMC/Launcher/issues/\\1\">GH-\\1</a>"); qDebug() << output; return output; } QString reprocessCommits(QByteArray json) { - auto channel = MMC->settings()->get("UpdateChannel").toString(); + auto channel = LAUNCHER->settings()->get("UpdateChannel").toString(); try { QString result; @@ -100,7 +100,7 @@ QString reprocessCommits(QByteArray json) result += "<tr><td>"; if(issuenr.length()) { - result += QString("<a href=\"https://github.com/MultiMC/MultiMC5/issues/%1\">GH-%2</a>").arg(issuenr, issuenr); + result += QString("<a href=\"https://github.com/MultiMC/Launcher/issues/%1\">GH-%2</a>").arg(issuenr, issuenr); } else if(prefix.length()) { @@ -177,6 +177,6 @@ void UpdateDialog::on_btnUpdateNow_clicked() void UpdateDialog::closeEvent(QCloseEvent* evt) { - MMC->settings()->set("UpdateDialogGeometry", saveGeometry().toBase64()); + LAUNCHER->settings()->set("UpdateDialogGeometry", saveGeometry().toBase64()); QDialog::closeEvent(evt); } |