summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-18 13:54:22 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-18 13:54:22 (GMT)
commit2a5a261a77c95ed0a97e6fa1e316016545d26672 (patch)
tree6fabca2e824f8fb20949ee1bfdb97536c76b0275
parent688c94c21492202df14d400ac0829a1b7ae96ef3 (diff)
Don't check phishing url when we have low bandwidth
-rw-r--r--messageviewer/src/viewer/viewer_p.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/messageviewer/src/viewer/viewer_p.cpp b/messageviewer/src/viewer/viewer_p.cpp
index 293e4e1..e891f51 100644
--- a/messageviewer/src/viewer/viewer_p.cpp
+++ b/messageviewer/src/viewer/viewer_p.cpp
@@ -49,6 +49,7 @@
#include <MimeMessagePart/FileHtmlWriter>
#include "htmlwriter/teehtmlwriter.h"
#endif
+#include <PimCommon/NetworkUtil>
#include <unistd.h> // link()
#include <errno.h>
//KDE includes
@@ -1973,7 +1974,7 @@ void ViewerPrivate::slotUrlOpen(const QUrl &url)
void ViewerPrivate::checkPhishingUrl()
{
- if (MessageViewer::MessageViewerSettings::self()->checkPhishingUrl() && (mClickedUrl.scheme() != QLatin1String("mailto"))) {
+ if (!PimCommon::NetworkUtil::self()->lowBandwidth() && MessageViewer::MessageViewerSettings::self()->checkPhishingUrl() && (mClickedUrl.scheme() != QLatin1String("mailto"))) {
WebEngineViewer::CheckPhishingUrlCache::UrlStatus status = WebEngineViewer::CheckPhishingUrlCache::self()->urlStatus(mClickedUrl);
if (status == WebEngineViewer::CheckPhishingUrlCache::UrlOk) {
executeRunner(mClickedUrl);