mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-27 11:49:01 +03:00
Support wildcards for filtering torrent list and torrent content
This commit is contained in:
parent
23748547a2
commit
692cac1dc5
3 changed files with 2 additions and 3 deletions
|
@ -857,7 +857,7 @@ void PropertiesWidget::filteredFilesChanged() {
|
|||
}
|
||||
|
||||
void PropertiesWidget::filterText(const QString& filter) {
|
||||
PropListModel->setFilterFixedString(filter);
|
||||
PropListModel->setFilterRegExp(QRegExp(filter, Qt::CaseInsensitive, QRegExp::WildcardUnix));
|
||||
if (filter.isEmpty()) {
|
||||
filesList->collapseAll();
|
||||
filesList->expand(PropListModel->index(0, 0));
|
||||
|
|
|
@ -38,7 +38,6 @@ TorrentContentFilterModel::TorrentContentFilterModel(QObject *parent):
|
|||
connect(m_model, SIGNAL(filteredFilesChanged()), this, SIGNAL(filteredFilesChanged()));
|
||||
setSourceModel(m_model);
|
||||
// Filter settings
|
||||
setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
setFilterKeyColumn(TorrentContentModelItem::COL_NAME);
|
||||
setFilterRole(Qt::DisplayRole);
|
||||
setDynamicSortFilter(true);
|
||||
|
|
|
@ -874,7 +874,7 @@ void TransferListWidget::applyTrackerFilter(const QStringList &hashes)
|
|||
|
||||
void TransferListWidget::applyNameFilter(const QString& name)
|
||||
{
|
||||
nameFilterModel->setFilterRegExp(QRegExp(QRegExp::escape(name), Qt::CaseInsensitive));
|
||||
nameFilterModel->setFilterRegExp(QRegExp(name, Qt::CaseInsensitive, QRegExp::WildcardUnix));
|
||||
}
|
||||
|
||||
void TransferListWidget::applyStatusFilter(int f)
|
||||
|
|
Loading…
Reference in a new issue