mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 21:52:32 -06:00
Use Perl-compatible regexes for RSS rules. Closes #6367.
--HG-- branch : magao-dev
This commit is contained in:
committed by
sledgehammer999
parent
02c96fa5e2
commit
8d11af94f2
@@ -38,6 +38,7 @@
|
||||
#ifdef QBT_USES_QT5
|
||||
#include <QCollator>
|
||||
#endif
|
||||
#include <QRegExp>
|
||||
#ifdef Q_OS_MAC
|
||||
#include <QThreadStorage>
|
||||
#endif
|
||||
@@ -238,3 +239,13 @@ QString Utils::String::toHtmlEscaped(const QString &str)
|
||||
return rich;
|
||||
#endif
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ namespace Utils
|
||||
|
||||
bool naturalCompareCaseSensitive(const QString &left, const QString &right);
|
||||
bool naturalCompareCaseInsensitive(const QString &left, const QString &right);
|
||||
|
||||
QString wildcardToRegex(const QString &pattern);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user