summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-03-31 21:27:35 +0200
committerMontel Laurent <[email protected]>2016-03-31 21:28:21 +0200
commit6c5fc4b82a8ca6fce9547e05ebfe1b48e9850505 (patch)
treea4be605b0f1d71eb8bf8251111f8a1cec0621b00
parent0d4173cbc18cc218df2e403bb14326be544ec17f (diff)
Fix scancheck
-rw-r--r--messageviewer/src/htmlwriter/webengineparthtmlwriter.cpp1
-rw-r--r--messageviewer/src/scamdetection/scamdetectionwebengine.cpp1
-rw-r--r--messageviewer/src/viewer/webengine/mailwebengineview.cpp11
-rw-r--r--messageviewer/src/viewer/webengine/mailwebengineview.h1
4 files changed, 13 insertions, 1 deletions
diff --git a/messageviewer/src/htmlwriter/webengineparthtmlwriter.cpp b/messageviewer/src/htmlwriter/webengineparthtmlwriter.cpp
index 633563e..0aa81ad 100644
--- a/messageviewer/src/htmlwriter/webengineparthtmlwriter.cpp
+++ b/messageviewer/src/htmlwriter/webengineparthtmlwriter.cpp
@@ -69,7 +69,6 @@ void WebEnginePartHtmlWriter::end()
mHtml.clear();
resolveCidUrls();
- mHtmlView->scamCheck();
mHtmlView->setUpdatesEnabled(true);
mHtmlView->update();
mState = Ended;
diff --git a/messageviewer/src/scamdetection/scamdetectionwebengine.cpp b/messageviewer/src/scamdetection/scamdetectionwebengine.cpp
index d80b257..2e9a6ad 100644
--- a/messageviewer/src/scamdetection/scamdetectionwebengine.cpp
+++ b/messageviewer/src/scamdetection/scamdetectionwebengine.cpp
@@ -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();
}
diff --git a/messageviewer/src/viewer/webengine/mailwebengineview.cpp b/messageviewer/src/viewer/webengine/mailwebengineview.cpp
index 3dc2a35..dee815d 100644
--- a/messageviewer/src/viewer/webengine/mailwebengineview.cpp
+++ b/messageviewer/src/viewer/webengine/mailwebengineview.cpp
@@ -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();
+}
diff --git a/messageviewer/src/viewer/webengine/mailwebengineview.h b/messageviewer/src/viewer/webengine/mailwebengineview.h
index 3e3e8e0..b0a7650 100644
--- a/messageviewer/src/viewer/webengine/mailwebengineview.h
+++ b/messageviewer/src/viewer/webengine/mailwebengineview.h
@@ -59,6 +59,7 @@ public:
void setAllowExternalContent(bool b);
+ QList<QAction *> interceptorUrlActions() const;
public Q_SLOTS:
void slotZoomChanged(qreal zoom);
void slotShowDetails();