NOISSUE Use Qt's clear button for modpacks.ch page

This replaces our 'Reset' button.
This commit is contained in:
Jamie Mansfield 2021-10-17 20:14:16 +01:00
parent 1869dd0de3
commit b93997501d
No known key found for this signature in database
GPG Key ID: 36F61598F39F67B0
3 changed files with 2 additions and 14 deletions

View File

@ -33,7 +33,6 @@ FtbPage::FtbPage(NewInstanceDialog* dialog, QWidget *parent)
ui->sortByBox->setCurrentText(filterModel->translateCurrentSorting()); ui->sortByBox->setCurrentText(filterModel->translateCurrentSorting());
connect(ui->searchEdit, &QLineEdit::textChanged, this, &FtbPage::triggerSearch); 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->sortByBox, &QComboBox::currentTextChanged, this, &FtbPage::onSortingSelectionChanged);
connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &FtbPage::onSelectionChanged); connect(ui->packView->selectionModel(), &QItemSelectionModel::currentChanged, this, &FtbPage::onSelectionChanged);
connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &FtbPage::onVersionSelectionChanged); connect(ui->versionSelectionBox, &QComboBox::currentTextChanged, this, &FtbPage::onVersionSelectionChanged);
@ -105,11 +104,6 @@ void FtbPage::triggerSearch()
filterModel->setSearchTerm(ui->searchEdit->text()); filterModel->setSearchTerm(ui->searchEdit->text());
} }
void FtbPage::resetSearch()
{
ui->searchEdit->setText("");
}
void FtbPage::onSortingSelectionChanged(QString data) void FtbPage::onSortingSelectionChanged(QString data)
{ {
auto toSet = filterModel->getAvailableSortings().value(data); auto toSet = filterModel->getAvailableSortings().value(data);

View File

@ -65,7 +65,6 @@ private:
private slots: private slots:
void triggerSearch(); void triggerSearch();
void resetSearch();
void onSortingSelectionChanged(QString data); void onSortingSelectionChanged(QString data);
void onSelectionChanged(QModelIndex first, QModelIndex second); void onSelectionChanged(QModelIndex first, QModelIndex second);

View File

@ -36,12 +36,8 @@
<property name="placeholderText"> <property name="placeholderText">
<string>Search and filter ...</string> <string>Search and filter ...</string>
</property> </property>
</widget> <property name="clearButtonEnabled">
</item> <bool>true</bool>
<item row="0" column="1">
<widget class="QPushButton" name="resetButton">
<property name="text">
<string>Reset</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -76,7 +72,6 @@
</widget> </widget>
<tabstops> <tabstops>
<tabstop>searchEdit</tabstop> <tabstop>searchEdit</tabstop>
<tabstop>resetButton</tabstop>
<tabstop>versionSelectionBox</tabstop> <tabstop>versionSelectionBox</tabstop>
</tabstops> </tabstops>
<resources/> <resources/>