Commit b80e1402 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Move in messageviewerutil

parent cd02080f
......@@ -47,6 +47,9 @@
#include "PimCommon/RenameFileDialog"
#include <Gravatar/GravatarCache>
#include <gravatar/gravatarsettings.h>
#include <AkonadiCore/item.h>
#include <kmbox/mbox.h>
......@@ -596,3 +599,12 @@ const QTextCodec *Util::codecForName(const QByteArray &_str)
const QByteArray codec = _str.toLower();
return KCharsets::charsets()->codecForName(QLatin1String(codec));
}
void Util::readGravatarConfig()
{
Gravatar::GravatarCache::self()->setMaximumSize(
Gravatar::GravatarSettings::self()->gravatarCacheSize());
if (!Gravatar::GravatarSettings::self()->gravatarSupportEnabled()) {
Gravatar::GravatarCache::self()->clear();
}
}
......@@ -55,6 +55,7 @@ Q_REQUIRED_RESULT KMime::Content::List allContents(const KMime::Content *message
Q_REQUIRED_RESULT bool saveContents(QWidget *parent, const KMime::Content::List &contents, QList<QUrl> &urlList);
Q_REQUIRED_RESULT bool saveContent(QWidget *parent, KMime::Content *content, const QUrl &url);
void addHelpTextAction(QAction *act, const QString &text);
void readGravatarConfig();
}
}
#endif
......@@ -35,8 +35,7 @@
#include "messageviewer/headerstyle.h"
#include "messageviewer/headerstrategy.h"
#include "kpimtextedit/slidecontainer.h"
#include <Gravatar/GravatarCache>
#include <gravatar/gravatarsettings.h>
#include "job/modifymessagedisplayformatjob.h"
#include "viewerplugins/viewerplugintoolmanager.h"
......@@ -1081,7 +1080,7 @@ void ViewerPrivate::readConfig()
mHtmlMailGlobalSetting = MessageViewer::MessageViewerSettings::self()->htmlMail();
readGravatarConfig();
MessageViewer::Util::readGravatarConfig();
if (mHeaderStyleMenuManager) {
mHeaderStyleMenuManager->readConfig();
}
......@@ -1109,16 +1108,6 @@ void ViewerPrivate::readConfig()
applyZoomValue(MessageViewer::MessageViewerSettings::self()->zoomFactor(), false);
}
//TODO move outside viewer_p.cpp
void ViewerPrivate::readGravatarConfig()
{
Gravatar::GravatarCache::self()->setMaximumSize(
Gravatar::GravatarSettings::self()->gravatarCacheSize());
if (!Gravatar::GravatarSettings::self()->gravatarSupportEnabled()) {
Gravatar::GravatarCache::self()->clear();
}
}
void ViewerPrivate::recreateCssHelper()
{
delete mCSSHelper;
......
......@@ -589,8 +589,6 @@ Q_SIGNALS:
private:
Q_REQUIRED_RESULT QString attachmentHtml() const;
void readGravatarConfig();
void replyMessageToAuthor(KMime::Content *atmNode);
void replyMessageToAll(KMime::Content *atmNode);
bool urlIsAMalwareButContinue();
......
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