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()
bool BlockMailTrackingUrlInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
{
const QUrl urlRequestUrl(info.requestUrl());
for (int i = 0; i < mBackList.size(); ++i) {
if (urlRequestUrl.url().startsWith(mBackList.at(i).mCompanyUrl)) {
Q_EMIT mailTrackingFound(mBackList.at(i));
for (int i = 0, total = mBackList.size(); i < total; ++i) {
const auto blackListinfo{mBackList.at(i)};
if (urlRequestUrl.url().startsWith(blackListinfo.mCompanyUrl)) {
Q_EMIT mailTrackingFound(blackListinfo);
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