preliminary stuff for paste.ee removal
This commit is contained in:
		| @@ -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/PasteEEPage.h" | ||||
| #include "ui/pages/global/PastePage.h" | ||||
| #include "ui/pages/global/CustomCommandsPage.h" | ||||
|  | ||||
| #include "ui/themes/ITheme.h" | ||||
| @@ -728,7 +728,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<PasteEEPage>(); | ||||
|             m_globalSettingsProvider->addPage<PastePage>(); | ||||
|         } | ||||
|         qDebug() << "<> Settings loaded."; | ||||
|     } | ||||
|   | ||||
| @@ -711,8 +711,8 @@ SET(LAUNCHER_SOURCES | ||||
|     ui/pages/global/LauncherPage.h | ||||
|     ui/pages/global/ProxyPage.cpp | ||||
|     ui/pages/global/ProxyPage.h | ||||
|     ui/pages/global/PasteEEPage.cpp | ||||
|     ui/pages/global/PasteEEPage.h | ||||
|     ui/pages/global/PastePage.cpp | ||||
|     ui/pages/global/PastePage.h | ||||
|  | ||||
|     # GUI - platform pages | ||||
|     ui/pages/modplatform/VanillaPage.cpp | ||||
| @@ -848,7 +848,7 @@ qt5_wrap_ui(LAUNCHER_UI | ||||
|     ui/pages/global/AccountListPage.ui | ||||
|     ui/pages/global/JavaPage.ui | ||||
|     ui/pages/global/LauncherPage.ui | ||||
|     ui/pages/global/PasteEEPage.ui | ||||
|     ui/pages/global/PastePage.ui | ||||
|     ui/pages/global/ProxyPage.ui | ||||
|     ui/pages/global/MinecraftPage.ui | ||||
|     ui/pages/global/ExternalToolsPage.ui | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| /* Copyright 2013-2021 MultiMC Contributors
 | ||||
| /* Copyright 2013-2021 MultiMC & PolyMC Contributors
 | ||||
|  * | ||||
|  * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
|  * you may not use this file except in compliance with the License. | ||||
| @@ -13,8 +13,8 @@ | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| 
 | ||||
| #include "PasteEEPage.h" | ||||
| #include "ui_PasteEEPage.h" | ||||
| #include "PastePage.h" | ||||
| #include "ui_PastePage.h" | ||||
| 
 | ||||
| #include <QMessageBox> | ||||
| #include <QFileDialog> | ||||
| @@ -25,22 +25,22 @@ | ||||
| #include "tools/BaseProfiler.h" | ||||
| #include "Application.h" | ||||
| 
 | ||||
| PasteEEPage::PasteEEPage(QWidget *parent) : | ||||
| PastePage::PastePage(QWidget *parent) : | ||||
|     QWidget(parent), | ||||
|     ui(new Ui::PasteEEPage) | ||||
|     ui(new Ui::PastePage) | ||||
| { | ||||
|     ui->setupUi(this); | ||||
|     ui->tabWidget->tabBar()->hide();\ | ||||
|     connect(ui->customAPIkeyEdit, &QLineEdit::textEdited, this, &PasteEEPage::textEdited); | ||||
|     connect(ui->customAPIkeyEdit, &QLineEdit::textEdited, this, &PastePage::textEdited); | ||||
|     loadSettings(); | ||||
| } | ||||
| 
 | ||||
| PasteEEPage::~PasteEEPage() | ||||
| PastePage::~PastePage() | ||||
| { | ||||
|     delete ui; | ||||
| } | ||||
| 
 | ||||
| void PasteEEPage::loadSettings() | ||||
| void PastePage::loadSettings() | ||||
| { | ||||
|     auto s = APPLICATION->settings(); | ||||
|     QString keyToUse = s->get("PasteEEAPIKey").toString(); | ||||
| @@ -55,7 +55,7 @@ void PasteEEPage::loadSettings() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void PasteEEPage::applySettings() | ||||
| void PastePage::applySettings() | ||||
| { | ||||
|     auto s = APPLICATION->settings(); | ||||
| 
 | ||||
| @@ -69,13 +69,13 @@ void PasteEEPage::applySettings() | ||||
|     s->set("PasteEEAPIKey", pasteKeyToUse); | ||||
| } | ||||
| 
 | ||||
| bool PasteEEPage::apply() | ||||
| bool PastePage::apply() | ||||
| { | ||||
|     applySettings(); | ||||
|     return true; | ||||
| } | ||||
| 
 | ||||
| void PasteEEPage::textEdited(const QString& text) | ||||
| void PastePage::textEdited(const QString& text) | ||||
| { | ||||
|     ui->customButton->setChecked(true); | ||||
| } | ||||
| @@ -21,16 +21,16 @@ | ||||
| #include <Application.h> | ||||
| 
 | ||||
| namespace Ui { | ||||
| class PasteEEPage; | ||||
| class PastePage; | ||||
| } | ||||
| 
 | ||||
| class PasteEEPage : public QWidget, public BasePage | ||||
| class PastePage : public QWidget, public BasePage | ||||
| { | ||||
|     Q_OBJECT | ||||
| 
 | ||||
| public: | ||||
|     explicit PasteEEPage(QWidget *parent = 0); | ||||
|     ~PasteEEPage(); | ||||
|     explicit PastePage(QWidget *parent = 0); | ||||
|     ~PastePage(); | ||||
| 
 | ||||
|     QString displayName() const override | ||||
|     { | ||||
| @@ -58,5 +58,6 @@ private slots: | ||||
|     void textEdited(const QString &text); | ||||
| 
 | ||||
| private: | ||||
|     Ui::PasteEEPage *ui; | ||||
|     Ui::PastePage *ui; | ||||
| }; | ||||
| 
 | ||||
| @@ -1,7 +1,7 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <ui version="4.0"> | ||||
|  <class>PasteEEPage</class> | ||||
|  <widget class="QWidget" name="PasteEEPage"> | ||||
|  <class>PastePage</class> | ||||
|  <widget class="QWidget" name="PastePage"> | ||||
|   <property name="geometry"> | ||||
|    <rect> | ||||
|     <x>0</x> | ||||
| @@ -36,39 +36,9 @@ | ||||
|        <item> | ||||
|         <widget class="QGroupBox" name="groupBox_2"> | ||||
|          <property name="title"> | ||||
|           <string>paste.ee API key</string> | ||||
|           <string>Pastebin Site</string> | ||||
|          </property> | ||||
|          <layout class="QVBoxLayout" name="verticalLayout_10"> | ||||
|           <item> | ||||
|            <widget class="QRadioButton" name="multimcButton"> | ||||
|             <property name="text"> | ||||
|              <string>MultiMC key - 12MB &upload limit</string> | ||||
|             </property> | ||||
|             <attribute name="buttonGroup"> | ||||
|              <string notr="true">pasteButtonGroup</string> | ||||
|             </attribute> | ||||
|            </widget> | ||||
|           </item> | ||||
|           <item> | ||||
|            <widget class="QRadioButton" name="customButton"> | ||||
|             <property name="text"> | ||||
|              <string>&Your own key - 12MB upload limit:</string> | ||||
|             </property> | ||||
|             <attribute name="buttonGroup"> | ||||
|              <string notr="true">pasteButtonGroup</string> | ||||
|             </attribute> | ||||
|            </widget> | ||||
|           </item> | ||||
|           <item> | ||||
|            <widget class="QLineEdit" name="customAPIkeyEdit"> | ||||
|             <property name="echoMode"> | ||||
|              <enum>QLineEdit::Password</enum> | ||||
|             </property> | ||||
|             <property name="placeholderText"> | ||||
|              <string>Paste your API key here!</string> | ||||
|             </property> | ||||
|            </widget> | ||||
|           </item> | ||||
|           <item> | ||||
|            <widget class="Line" name="line"> | ||||
|             <property name="orientation"> | ||||
| @@ -76,10 +46,24 @@ | ||||
|             </property> | ||||
|            </widget> | ||||
|           </item> | ||||
|           <item> | ||||
|            <widget class="QComboBox" name="comboBox"> | ||||
|             <item> | ||||
|              <property name="text"> | ||||
|               <string>0x0.st</string> | ||||
|              </property> | ||||
|             </item> | ||||
|             <item> | ||||
|              <property name="text"> | ||||
|               <string>paste.polymc.org</string> | ||||
|              </property> | ||||
|             </item> | ||||
|            </widget> | ||||
|           </item> | ||||
|           <item> | ||||
|            <widget class="QLabel" name="label"> | ||||
|             <property name="text"> | ||||
|              <string><html><head/><body><p><a href="https://paste.ee">paste.ee</a> is used by MultiMC for log uploads. If you have a <a href="https://paste.ee">paste.ee</a> account, you can add your API key here and have your uploaded logs paired with your account.</p></body></html></string> | ||||
|              <string><html><head/><body><p>paste.polymc.org is a pastebin managed by PolyMC's lead maintainer. Something something trust</p></body></html></string> | ||||
|             </property> | ||||
|             <property name="textFormat"> | ||||
|              <enum>Qt::RichText</enum> | ||||
| @@ -116,9 +100,6 @@ | ||||
|  </widget> | ||||
|  <tabstops> | ||||
|   <tabstop>tabWidget</tabstop> | ||||
|   <tabstop>multimcButton</tabstop> | ||||
|   <tabstop>customButton</tabstop> | ||||
|   <tabstop>customAPIkeyEdit</tabstop> | ||||
|  </tabstops> | ||||
|  <resources/> | ||||
|  <connections/> | ||||
		Reference in New Issue
	
	Block a user