summaryrefslogtreecommitdiffstats
path: root/gui/dialogs/VersionSelectDialog.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-05-04 13:20:42 +0200
committerPetr Mrázek <peterix@gmail.com>2014-05-04 13:20:42 +0200
commit0902fd5bec9c151ad9098714325e163829d5b662 (patch)
tree16fe856ec879fb28c1c34977596d38442518958b /gui/dialogs/VersionSelectDialog.cpp
parentde48f102bd9fbb57594d2dca3edd093edd75cc13 (diff)
downloadMultiMC-0902fd5bec9c151ad9098714325e163829d5b662.tar
MultiMC-0902fd5bec9c151ad9098714325e163829d5b662.tar.gz
MultiMC-0902fd5bec9c151ad9098714325e163829d5b662.tar.lz
MultiMC-0902fd5bec9c151ad9098714325e163829d5b662.tar.xz
MultiMC-0902fd5bec9c151ad9098714325e163829d5b662.zip
Fix version select dialog filtering
Diffstat (limited to 'gui/dialogs/VersionSelectDialog.cpp')
-rw-r--r--gui/dialogs/VersionSelectDialog.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/gui/dialogs/VersionSelectDialog.cpp b/gui/dialogs/VersionSelectDialog.cpp
index f4d314b6..cae5a732 100644
--- a/gui/dialogs/VersionSelectDialog.cpp
+++ b/gui/dialogs/VersionSelectDialog.cpp
@@ -97,23 +97,16 @@ void VersionSelectDialog::on_refreshButton_clicked()
loadList();
}
-void VersionSelectDialog::setFilter(int column, QString filter)
+void VersionSelectDialog::setExactFilter(int column, QString filter)
{
m_proxyModel->setFilterKeyColumn(column);
// m_proxyModel->setFilterFixedString(filter);
m_proxyModel->setFilterRegExp(QRegExp(QString("^%1$").arg(filter.replace(".", "\\.")),
Qt::CaseInsensitive, QRegExp::RegExp));
- /*
- QStringList filteredTypes;
- if (!ui->filterSnapshotsCheckbox->isChecked())
- filteredTypes += "Snapshot";
- if (!ui->filterMCNostalgiaCheckbox->isChecked())
- filteredTypes += "Nostalgia";
-
- QString regexStr = "^.*$";
- if (filteredTypes.length() > 0)
- regexStr = QString("^((?!%1).)*$").arg(filteredTypes.join('|'));
-
- QLOG_DEBUG() << "Filter:" << regexStr;
- */
+}
+
+void VersionSelectDialog::setFuzzyFilter(int column, QString filter)
+{
+ m_proxyModel->setFilterKeyColumn(column);
+ m_proxyModel->setFilterWildcard(filter);
}