mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 13:11:25 -07:00
Merge pull request #6369 from magao/issue6367
Use Perl-compatible regexes for RSS rules. Closes #6367.
This commit is contained in:
commit
aa51907387
6 changed files with 112 additions and 42 deletions
|
@ -35,6 +35,7 @@
|
|||
#include <QCollator>
|
||||
#include <QtGlobal>
|
||||
#include <QLocale>
|
||||
#include <QRegExp>
|
||||
#ifdef Q_OS_MAC
|
||||
#include <QThreadStorage>
|
||||
#endif
|
||||
|
@ -178,3 +179,13 @@ bool Utils::String::slowEquals(const QByteArray &a, const QByteArray &b)
|
|||
|
||||
return (diff == 0);
|
||||
}
|
||||
|
||||
// This is marked as internal in QRegExp.cpp, but is exported. The alternative would be to
|
||||
// copy the code from QRegExp::wc2rx().
|
||||
QString qt_regexp_toCanonical(const QString &pattern, QRegExp::PatternSyntax patternSyntax);
|
||||
|
||||
QString Utils::String::wildcardToRegex(const QString &pattern)
|
||||
{
|
||||
return qt_regexp_toCanonical(pattern, QRegExp::Wildcard);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue