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