Commit 22e8e2da authored by Laurent Montel's avatar Laurent Montel
Browse files

not necessary

parent 458482a1
......@@ -21,7 +21,6 @@
#include "messageviewer_debug.h"
#include "Gravatar/GravatarResolvUrlJob"
#include "gravatarsettings.h"
#include "PimCommon/NetworkUtil"
#include "settings/messageviewersettings.h"
#include <Akonadi/Contact/ContactSearchJob>
#include <kio/transferjob.h>
......@@ -106,21 +105,19 @@ void ContactDisplayMessageMemento::slotSearchJobFinished(KJob *job)
}
}
}
if (!PimCommon::NetworkUtil::self()->lowBandwidth()) {
if (mPhoto.isEmpty() && mPhoto.url().isEmpty()) {
// No url, no photo => search gravatar
if (Gravatar::GravatarSettings::self()->gravatarSupportEnabled()) {
Gravatar::GravatarResolvUrlJob *job = new Gravatar::GravatarResolvUrlJob(this);
job->setEmail(mEmailAddress);
job->setUseDefaultPixmap(
Gravatar::GravatarSettings::self()->gravatarUseDefaultImage());
if (job->canStart()) {
connect(job, &Gravatar::GravatarResolvUrlJob::finished, this,
&ContactDisplayMessageMemento::slotGravatarResolvUrlFinished);
job->start();
} else {
job->deleteLater();
}
if (mPhoto.isEmpty() && mPhoto.url().isEmpty()) {
// No url, no photo => search gravatar
if (Gravatar::GravatarSettings::self()->gravatarSupportEnabled()) {
Gravatar::GravatarResolvUrlJob *job = new Gravatar::GravatarResolvUrlJob(this);
job->setEmail(mEmailAddress);
job->setUseDefaultPixmap(
Gravatar::GravatarSettings::self()->gravatarUseDefaultImage());
if (job->canStart()) {
connect(job, &Gravatar::GravatarResolvUrlJob::finished, this,
&ContactDisplayMessageMemento::slotGravatarResolvUrlFinished);
job->start();
} else {
job->deleteLater();
}
}
}
......
......@@ -41,7 +41,6 @@
#include "viewerplugins/viewerplugintoolmanager.h"
#include <KContacts/VCardConverter>
#include "htmlwriter/webengineembedpart.h"
#include <PimCommon/NetworkUtil>
#include <unistd.h> // link()
//KDE includes
#include <QHBoxLayout>
......@@ -1978,8 +1977,7 @@ void ViewerPrivate::slotUrlOpen(const QUrl &url)
void ViewerPrivate::checkPhishingUrl()
{
if (!PimCommon::NetworkUtil::self()->lowBandwidth()
&& MessageViewer::MessageViewerSettings::self()->checkPhishingUrl()
if (MessageViewer::MessageViewerSettings::self()->checkPhishingUrl()
&& (mClickedUrl.scheme() != QLatin1String("mailto"))) {
mPhishingDatabase->checkUrl(mClickedUrl);
} else {
......
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