Commit 63556e81 authored by Laurent Montel's avatar Laurent Montel 😁

Don't show adblock qtwebkit element when we use qtwebengine

parent 795edcf2
......@@ -71,8 +71,10 @@ SecurityPage::SecurityPage(QWidget *parent)
//
mSMimeTab = new SMimeTab();
addTab(mSMimeTab, i18n("S/MIME Validation"));
#ifndef QTWEBENGINE_SUPPORT_OPTION
mSAdBlockTab = new SecurityPageAdBlockTab;
addTab(mSAdBlockTab, i18n("Ad block"));
#endif
}
QString SecurityPage::GeneralTab::helpAnchor() const
......@@ -145,6 +147,7 @@ void SecurityPage::GeneralTab::save()
}
//Adblock
#ifndef QTWEBENGINE_SUPPORT_OPTION
QString SecurityPageAdBlockTab::helpAnchor() const
{
......@@ -186,6 +189,7 @@ void SecurityPageAdBlockTab::doResetToDefaultsOther()
{
mWidget->doResetToDefaultsOther();
}
#endif
QString SecurityPage::MDNTab::helpAnchor() const
{
......
......@@ -19,6 +19,7 @@
#define CONFIGURESECURITYPAGE_H
#include "kmail_export.h"
#include "config-kdepim.h"
#include "configuredialog_p.h"
#include "ui_securitypagegeneraltab.h"
#include "ui_securitypagemdntab.h"
......@@ -138,6 +139,7 @@ private:
Kleo::CryptoConfig *mConfig;
};
#ifndef QTWEBENGINE_SUPPORT_OPTION
class SecurityPageAdBlockTab : public ConfigModuleTab
{
Q_OBJECT
......@@ -157,7 +159,7 @@ private:
private:
MessageViewer::AdBlockSettingWidget *mWidget;
};
#endif
class KMAIL_EXPORT SecurityPage : public ConfigModuleWithTabs
{
Q_OBJECT
......@@ -177,7 +179,9 @@ private:
ComposerCryptoTab *mComposerCryptoTab;
WarningTab *mWarningTab;
SMimeTab *mSMimeTab;
#ifndef QTWEBENGINE_SUPPORT_OPTION
SecurityPageAdBlockTab *mSAdBlockTab;
#endif
};
#endif // CONFIGURESECURITYPAGE_H
......@@ -2794,7 +2794,7 @@ void KMMainWidget::showMessagePopup(const Akonadi::Item &msg, const QUrl &url, c
menu->addAction(mMsgView->toggleMimePartTreeAction());
}
menu->addSeparator();
#ifdef MESSAGEVIEWER_USE_QTWEBENGINE
#ifdef QTWEBENGINE_SUPPORT_OPTION
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
menu->addAction(mMsgActions->printPreviewAction());
menu->addAction(mMsgActions->printAction());
......@@ -2834,7 +2834,7 @@ void KMMainWidget::showMessagePopup(const Akonadi::Item &msg, const QUrl &url, c
}
}
#ifdef MESSAGEVIEWER_USE_QTWEBENGINE
#ifdef QTWEBENGINE_SUPPORT_OPTION
//TODO use interceptorUrlActions
//QList<QAction *> mMsgActions->interceptorUrlActions(const MessageViewer::WebHitTestResult &result) const;
#endif
......
......@@ -619,7 +619,7 @@ void KMReaderMainWin::showMessagePopup(const Akonadi::Item &msg, const QUrl &url
}
menu->addSeparator();
#ifdef MESSAGEVIEWER_USE_QTWEBENGINE
#ifdef QTWEBENGINE_SUPPORT_OPTION
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
menu->addAction(mMsgActions->printPreviewAction());
menu->addAction(mMsgActions->printAction());
......
......@@ -902,7 +902,7 @@ void KMReaderWin::slotShareImage()
command->start();
}
#ifdef MESSAGEVIEWER_USE_QTWEBENGINE
#ifdef QTWEBENGINE_SUPPORT_OPTION
QList<QAction *> KMReaderWin::interceptorUrlActions(const MessageViewer::WebHitTestResult &result) const
{
return mViewer->interceptorUrlActions(result);
......
......@@ -177,7 +177,7 @@ public:
QList<QAction *> viewerPluginActionList(MessageViewer::ViewerPluginInterface::SpecificFeatureTypes features);
#ifdef MESSAGEVIEWER_USE_QTWEBENGINE
#ifdef QTWEBENGINE_SUPPORT_OPTION
QList<QAction *> interceptorUrlActions(const MessageViewer::WebHitTestResult &result) const;
#endif
......
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