Change paste settings and add copyright headers

- There's now a notice reminding people to change the base URL if they
  had a custom base URL and change the paste type (that was something I
  personally had problems with when I was testing, so a reminder was
  helpful for me).

- Broke down some of the long lines on APIPage.cpp to be more readable.

- Added copyright headers where they were missing.

- Changed the paste service display names to the names they are more
  commonly known by.

- Changed the default hastebin base URL to https://hst.sh due to the
  acquisition of https://hastebin.com by Toptal.
This commit is contained in:
Lenny McLennington
2022-05-13 17:48:19 +01:00
parent 35f71f5793
commit caf6d02728
7 changed files with 95 additions and 14 deletions

View File

@ -2,6 +2,7 @@
/*
* PolyMC - Minecraft Launcher
* Copyright (C) 2022 Sefa Eyeoglu <contact@scrumplex.net>
* Copyright (C) 2022 Lenny McLennington <lenny@sneed.church>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -672,7 +673,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
m_settings->registerSetting("UpdateDialogGeometry", "");
// This code feels so stupid is there a less stupid way of doing this?
// HACK: This code feels so stupid is there a less stupid way of doing this?
{
m_settings->registerSetting("PastebinURL", "");
QString pastebinURL = m_settings->get("PastebinURL").toString();
@ -694,7 +695,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
}
bool ok;
unsigned int pasteType = m_settings->get("PastebinType").toUInt(&ok);
int pasteType = m_settings->get("PastebinType").toInt(&ok);
// If PastebinType is invalid then reset the related settings.
if (!ok || !(PasteUpload::PasteType::First <= pasteType && pasteType <= PasteUpload::PasteType::Last))
{