mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-08 06:00:59 -07: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:
parent
ea1c4a8fc8
commit
61d2ff359b
11 changed files with 53 additions and 32 deletions
|
@ -719,10 +719,14 @@ void AutomatedRssDownloader::updateMustLineValidity()
|
|||
{
|
||||
QStringList tokens;
|
||||
if (isRegex)
|
||||
{
|
||||
tokens << text;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const QString &token : asConst(text.split('|')))
|
||||
tokens << Utils::String::wildcardToRegex(token);
|
||||
tokens << Utils::String::wildcardToRegexPattern(token);
|
||||
}
|
||||
|
||||
for (const QString &token : asConst(tokens))
|
||||
{
|
||||
|
@ -762,10 +766,14 @@ void AutomatedRssDownloader::updateMustNotLineValidity()
|
|||
{
|
||||
QStringList tokens;
|
||||
if (isRegex)
|
||||
{
|
||||
tokens << text;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const QString &token : asConst(text.split('|')))
|
||||
tokens << Utils::String::wildcardToRegex(token);
|
||||
tokens << Utils::String::wildcardToRegexPattern(token);
|
||||
}
|
||||
|
||||
for (const QString &token : asConst(tokens))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue