Commit 6c5fc4b8 authored by Laurent Montel's avatar Laurent Montel 😁

Fix scancheck

parent 0d4173cb
......@@ -69,7 +69,6 @@ void WebEnginePartHtmlWriter::end()
mHtml.clear();
resolveCidUrls();
mHtmlView->scamCheck();
mHtmlView->setUpdatesEnabled(true);
mHtmlView->update();
mState = Ended;
......
......@@ -163,6 +163,7 @@ void ScamDetectionWebEngine::handleScanPage(const QVariant &result)
}
#endif
d->mDetails += QLatin1String("</ul>");
//qDebug()<<" d->mDetails "<< d->mDetails;
if (foundScam) {
Q_EMIT messageMayBeAScam();
}
......
......@@ -80,6 +80,7 @@ MailWebEngineView::MailWebEngineView(KActionCollection *ac, QWidget *parent)
d->mScamDetection = new ScamDetectionWebEngine(this);
connect(d->mScamDetection, &ScamDetectionWebEngine::messageMayBeAScam, this, &MailWebEngineView::messageMayBeAScam);
connect(d->mWebViewAccessKey, &MailWebEngineAccessKey::openUrl, this, &MailWebEngineView::openUrl);
connect(this, &MailWebEngineView::loadFinished, this, &MailWebEngineView::slotLoadFinished);
d->mNetworkAccessManager = new MessageViewer::NetworkAccessManagerWebEngine(this, ac, this);
d->mExternalReference = new MessageViewer::LoadExternalReferencesUrlInterceptor(this);
......@@ -328,3 +329,13 @@ void MailWebEngineView::setAllowExternalContent(bool b)
reload();
}
}
QList<QAction *> MailWebEngineView::interceptorUrlActions() const
{
return d->mNetworkAccessManager->actions();
}
void MailWebEngineView::slotLoadFinished()
{
scamCheck();
}
......@@ -59,6 +59,7 @@ public:
void setAllowExternalContent(bool b);
QList<QAction *> interceptorUrlActions() const;
public Q_SLOTS:
void slotZoomChanged(qreal zoom);
void slotShowDetails();
......
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