mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 22:35:27 +00:00
Make filter for filter criteria case insensitive
When opening the filter dialog we allow the user to filter the choices that are shown. The text that they enter in that filter for filter criteria should be treated as case insensitive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4029c87ec7
commit
3f34af4bed
1 changed files with 4 additions and 0 deletions
|
@ -513,6 +513,7 @@ TagFilter::TagFilter(QWidget *parent) : QWidget(parent)
|
|||
#endif
|
||||
QSortFilterProxyModel *filter = new QSortFilterProxyModel();
|
||||
filter->setSourceModel(TagFilterModel::instance());
|
||||
filter->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
connect(ui.filterInternalList, SIGNAL(textChanged(QString)), filter, SLOT(setFilterFixedString(QString)));
|
||||
ui.filterList->setModel(filter);
|
||||
}
|
||||
|
@ -539,6 +540,7 @@ BuddyFilter::BuddyFilter(QWidget *parent) : QWidget(parent)
|
|||
#endif
|
||||
QSortFilterProxyModel *filter = new QSortFilterProxyModel();
|
||||
filter->setSourceModel(BuddyFilterModel::instance());
|
||||
filter->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
connect(ui.filterInternalList, SIGNAL(textChanged(QString)), filter, SLOT(setFilterFixedString(QString)));
|
||||
ui.filterList->setModel(filter);
|
||||
}
|
||||
|
@ -564,6 +566,7 @@ LocationFilter::LocationFilter(QWidget *parent) : QWidget(parent)
|
|||
#endif
|
||||
QSortFilterProxyModel *filter = new QSortFilterProxyModel();
|
||||
filter->setSourceModel(LocationFilterModel::instance());
|
||||
filter->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
connect(ui.filterInternalList, SIGNAL(textChanged(QString)), filter, SLOT(setFilterFixedString(QString)));
|
||||
ui.filterList->setModel(filter);
|
||||
}
|
||||
|
@ -589,6 +592,7 @@ SuitFilter::SuitFilter(QWidget *parent) : QWidget(parent)
|
|||
#endif
|
||||
QSortFilterProxyModel *filter = new QSortFilterProxyModel();
|
||||
filter->setSourceModel(SuitsFilterModel::instance());
|
||||
filter->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
connect(ui.filterInternalList, SIGNAL(textChanged(QString)), filter, SLOT(setFilterFixedString(QString)));
|
||||
ui.filterList->setModel(filter);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue