Commit e0b2756b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Minor optimization

parent 26381464
Pipeline #55543 canceled with stage
in 40 minutes and 11 seconds
...@@ -23,9 +23,10 @@ BlockMailTrackingUrlInterceptor::~BlockMailTrackingUrlInterceptor() ...@@ -23,9 +23,10 @@ BlockMailTrackingUrlInterceptor::~BlockMailTrackingUrlInterceptor()
bool BlockMailTrackingUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info) bool BlockMailTrackingUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
{ {
const QUrl urlRequestUrl(info.requestUrl()); const QUrl urlRequestUrl(info.requestUrl());
for (int i = 0; i < mBackList.size(); ++i) { for (int i = 0, total = mBackList.size(); i < total; ++i) {
if (urlRequestUrl.url().startsWith(mBackList.at(i).mCompanyUrl)) { const auto blackListinfo{mBackList.at(i)};
Q_EMIT mailTrackingFound(mBackList.at(i)); if (urlRequestUrl.url().startsWith(blackListinfo.mCompanyUrl)) {
Q_EMIT mailTrackingFound(blackListinfo);
return true; return true;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment