mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Use QRegularExpression instead of deprecated QRegExp
Now it follows closely the definition of wildcard for glob patterns. The backslash (\) character is not an escape char in this context. In order to match one of the special characters, place it in square brackets (for example, [?]).
This commit is contained in:
@@ -825,7 +825,8 @@ void PropertiesWidget::filteredFilesChanged()
|
||||
|
||||
void PropertiesWidget::filterText(const QString &filter)
|
||||
{
|
||||
m_propListModel->setFilterRegExp(QRegExp(filter, Qt::CaseInsensitive, QRegExp::WildcardUnix));
|
||||
const QString pattern = Utils::String::wildcardToRegexPattern(filter);
|
||||
m_propListModel->setFilterRegularExpression(QRegularExpression(pattern, QRegularExpression::CaseInsensitiveOption));
|
||||
if (filter.isEmpty())
|
||||
{
|
||||
m_ui->filesList->collapseAll();
|
||||
|
||||
Reference in New Issue
Block a user