From 7360503f0123debb79fa0094f59445f801b229b7 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Sat, 7 May 2022 20:23:48 +0200 Subject: [PATCH] Make UrlFilter::CompleteUrlRegExp match case-insensitively Since it uses the pattern of UrlFilter::FullUrlRegExp, which should match case-insensitively. --- src/filterHotSpots/UrlFilter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/filterHotSpots/UrlFilter.cpp b/src/filterHotSpots/UrlFilter.cpp index ef58b86e..e93b9b41 100644 --- a/src/filterHotSpots/UrlFilter.cpp +++ b/src/filterHotSpots/UrlFilter.cpp @@ -68,7 +68,7 @@ const QRegularExpression UrlFilter::FullUrlRegExp( + LS1(query) + LS1(fragment) , QRegularExpression::CaseInsensitiveOption); -/* clang-format on */ + ///////////////////////////////////////////// @@ -77,9 +77,11 @@ const QRegularExpression UrlFilter::FullUrlRegExp( const QRegularExpression UrlFilter::EmailAddressRegExp(QStringLiteral("\\b(\\w|\\.|-|\\+)+@(\\w|\\.|-)+\\.\\w+\\b")); // matches full url or email address -const QRegularExpression UrlFilter::CompleteUrlRegExp(QLatin1Char('(') + FullUrlRegExp.pattern() + QLatin1Char('|') + EmailAddressRegExp.pattern() - + QLatin1Char(')')); +const QRegularExpression UrlFilter::CompleteUrlRegExp( + QLatin1Char('(') + FullUrlRegExp.pattern() + QLatin1Char('|') + EmailAddressRegExp.pattern()+ QLatin1Char(')'), + QRegularExpression::CaseInsensitiveOption); +/* clang-format on */ UrlFilter::UrlFilter() { setRegExp(CompleteUrlRegExp);