mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -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:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user