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

Create remotecontentmenu

parent 458d6829
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
set(PIM_VERSION "5.16.46")
set(PIM_VERSION "5.16.47")
if (POLICY CMP0053)
cmake_policy(SET CMP0053 NEW)
......
......@@ -55,3 +55,8 @@ void RemoteContentMenu::clearUrls()
{
mUrls.clear();
}
void RemoteContentMenu::appendUrl(const QString &url)
{
mUrls.append(url);
}
......@@ -24,6 +24,7 @@ public:
void setUrls(const QStringList &urls);
void clearUrls();
void appendUrl(const QString &url);
private:
void initialize();
......
......@@ -147,6 +147,8 @@
#include "dkim-verify/dkimviewermenu.h"
#include "dkim-verify/dkimwidgetinfo.h"
#include "remote-content/remotecontentmenu.h"
using namespace boost;
using namespace MailTransport;
using namespace MessageViewer;
......@@ -183,6 +185,8 @@ ViewerPrivate::ViewerPrivate(Viewer *aParent, QWidget *mainWindow, KActionCollec
}
mMessageViewerRenderer = new MessageViewerRenderer;
mRemoteContentMenu = new MessageViewer::RemoteContentMenu(mMainWindow);
mDkimWidgetInfo = new MessageViewer::DKIMWidgetInfo(mMainWindow);
if (_k_attributeInitialized.testAndSetAcquire(0, 1)) {
Akonadi::AttributeFactory::registerAttribute<MessageViewer::MessageDisplayFormatAttribute>();
......@@ -932,6 +936,12 @@ void ViewerPrivate::initHtmlWidget()
void ViewerPrivate::slotUrlBlocked(const QUrl &url)
{
mRemoteContentMenu->appendUrl(url.toString());
}
RemoteContentMenu *ViewerPrivate::remoteContentMenu() const
{
return mRemoteContentMenu;
}
void ViewerPrivate::applyZoomValue(qreal factor, bool saveConfig)
......
......@@ -94,6 +94,7 @@ class MailSourceWebEngineViewer;
class MailTrackingWarningWidget;
class ShowNextMessageWidget;
class DeveloperToolDialog;
class RemoteContentMenu;
/**
\brief Private class for the Viewer, the main widget in the messageviewer library.
......@@ -441,6 +442,8 @@ public:
void setIdentityManager(KIdentityManagement::IdentityManager *ident);
void setFolderIdentity(uint folderIdentity);
RemoteContentMenu *remoteContentMenu() const;
private Q_SLOTS:
void slotActivatePlugin(MessageViewer::ViewerPluginInterface *interface);
void slotModifyItemDone(KJob *job);
......@@ -709,6 +712,7 @@ public:
MessageViewer::DKIMViewerMenu *mDkimViewerMenu = nullptr;
MessageViewer::MessageViewerRenderer *mMessageViewerRenderer = nullptr;
KIdentityManagement::IdentityManager *mIdentityManager = nullptr;
RemoteContentMenu *mRemoteContentMenu = nullptr;
};
}
......
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