From b93997501d3c18832d0511abaf1514e73494bf56 Mon Sep 17 00:00:00 2001 From: Jamie Mansfield Date: Sun, 17 Oct 2021 20:14:16 +0100 Subject: [PATCH] NOISSUE Use Qt's clear button for modpacks.ch page This replaces our 'Reset' button. --- launcher/pages/modplatform/ftb/FtbPage.cpp | 6 ------ launcher/pages/modplatform/ftb/FtbPage.h | 1 - launcher/pages/modplatform/ftb/FtbPage.ui | 9 ++------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/launcher/pages/modplatform/ftb/FtbPage.cpp b/launcher/pages/modplatform/ftb/FtbPage.cpp index aca93cfe..bafcfac9 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.cpp +++ b/launcher/pages/modplatform/ftb/FtbPage.cpp @@ -33,7 +33,6 @@ FtbPage::FtbPage(NewInstanceDialog* dialog, QWidget *parent) ui->sortByBox->setCurrentText(filterModel->translateCurrentSorting()); connect(ui->searchEdit, &QLineEdit::textChanged, this, &FtbPage::triggerSearch); - connect(ui->resetButton, &QPushButton::clicked, this, &FtbPage::resetSearch); connect(ui->sortByBox, &QComboBox::currentTextChanged, this, &FtbPage::onSortingSelectionChanged); connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &FtbPage::onSelectionChanged); connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &FtbPage::onVersionSelectionChanged); @@ -105,11 +104,6 @@ void FtbPage::triggerSearch() filterModel->setSearchTerm(ui->searchEdit->text()); } -void FtbPage::resetSearch() -{ - ui->searchEdit->setText(""); -} - void FtbPage::onSortingSelectionChanged(QString data) { auto toSet = filterModel->getAvailableSortings().value(data); diff --git a/launcher/pages/modplatform/ftb/FtbPage.h b/launcher/pages/modplatform/ftb/FtbPage.h index 0dfac1a4..25b531fb 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.h +++ b/launcher/pages/modplatform/ftb/FtbPage.h @@ -65,7 +65,6 @@ private: private slots: void triggerSearch(); - void resetSearch(); void onSortingSelectionChanged(QString data); void onSelectionChanged(QModelIndex first, QModelIndex second); diff --git a/launcher/pages/modplatform/ftb/FtbPage.ui b/launcher/pages/modplatform/ftb/FtbPage.ui index dc800497..e9c783e3 100644 --- a/launcher/pages/modplatform/ftb/FtbPage.ui +++ b/launcher/pages/modplatform/ftb/FtbPage.ui @@ -36,12 +36,8 @@ Search and filter ... - - - - - - Reset + + true @@ -76,7 +72,6 @@ searchEdit - resetButton versionSelectionBox