aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/pages/global/PastePage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/pages/global/PastePage.cpp')
-rw-r--r--launcher/ui/pages/global/PastePage.cpp23
1 files changed, 5 insertions, 18 deletions
diff --git a/launcher/ui/pages/global/PastePage.cpp b/launcher/ui/pages/global/PastePage.cpp
index 495e9937..0965da77 100644
--- a/launcher/ui/pages/global/PastePage.cpp
+++ b/launcher/ui/pages/global/PastePage.cpp
@@ -20,6 +20,7 @@
#include <QFileDialog>
#include <QStandardPaths>
#include <QTabBar>
+#include <QVariant>
#include "settings/SettingsObject.h"
#include "tools/BaseProfiler.h"
@@ -31,7 +32,6 @@ PastePage::PastePage(QWidget *parent) :
{
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();\
- connect(ui->customAPIkeyEdit, &QLineEdit::textEdited, this, &PastePage::textEdited);
loadSettings();
}
@@ -43,23 +43,15 @@ PastePage::~PastePage()
void PastePage::loadSettings()
{
auto s = APPLICATION->settings();
- QString pastebin = s->get("PastebinURL");
- int index = ui->urlChoices->findText(pastebin);
- ui->urlChoices->setCurrentIndex(index);
+ QString pastebinURL = s->get("PastebinURL").toString();
+ ui->urlChoices->setCurrentText(pastebinURL);
}
void PastePage::applySettings()
{
auto s = APPLICATION->settings();
-
- QString pasteKeyToUse;
- if (ui->customButton->isChecked())
- pasteKeyToUse = ui->customAPIkeyEdit->text();
- else
- {
- pasteKeyToUse = "multimc";
- }
- s->set("PasteEEAPIKey", pasteKeyToUse);
+ QString pastebinURL = ui->urlChoices->currentText();
+ s->set("PastebinURL", pastebinURL);
}
bool PastePage::apply()
@@ -67,8 +59,3 @@ bool PastePage::apply()
applySettings();
return true;
}
-
-void PastePage::textEdited(const QString& text)
-{
- ui->customButton->setChecked(true);
-}