Make UrlFilter::CompleteUrlRegExp match case-insensitively

Since it uses the pattern of UrlFilter::FullUrlRegExp, which should match
case-insensitively.
wilder
Ahmad Samir 4 years ago committed by Kurt Hindenburg
parent 40b1fcf487
commit 7360503f01
  1. 8
      src/filterHotSpots/UrlFilter.cpp

@ -68,7 +68,7 @@ const QRegularExpression UrlFilter::FullUrlRegExp(
+ LS1(query) + LS1(query)
+ LS1(fragment) + LS1(fragment)
, QRegularExpression::CaseInsensitiveOption); , QRegularExpression::CaseInsensitiveOption);
/* clang-format on */
///////////////////////////////////////////// /////////////////////////////////////////////
@ -77,9 +77,11 @@ const QRegularExpression UrlFilter::FullUrlRegExp(
const QRegularExpression UrlFilter::EmailAddressRegExp(QStringLiteral("\\b(\\w|\\.|-|\\+)+@(\\w|\\.|-)+\\.\\w+\\b")); const QRegularExpression UrlFilter::EmailAddressRegExp(QStringLiteral("\\b(\\w|\\.|-|\\+)+@(\\w|\\.|-)+\\.\\w+\\b"));
// matches full url or email address // matches full url or email address
const QRegularExpression UrlFilter::CompleteUrlRegExp(QLatin1Char('(') + FullUrlRegExp.pattern() + QLatin1Char('|') + EmailAddressRegExp.pattern() const QRegularExpression UrlFilter::CompleteUrlRegExp(
+ QLatin1Char(')')); QLatin1Char('(') + FullUrlRegExp.pattern() + QLatin1Char('|') + EmailAddressRegExp.pattern()+ QLatin1Char(')'),
QRegularExpression::CaseInsensitiveOption);
/* clang-format on */
UrlFilter::UrlFilter() UrlFilter::UrlFilter()
{ {
setRegExp(CompleteUrlRegExp); setRegExp(CompleteUrlRegExp);

Loading…
Cancel
Save