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

Build it

parent 67798217
......@@ -39,10 +39,17 @@ set(ksieveui_vacation_LIB_SRCS
vacation/legacy/vacationutils.cpp
vacation/legacy/vacationscriptextractor.cpp
)
set(ksieveui_webpageeditor_LIB_SRCS
editor/sieveeditorwebview.cpp
)
if (QTWEBENGINE_EXPERIMENTAL_OPTION)
set(ksieveui_webpageeditor_LIB_SRCS
editor/sieveeditorwebengineview.cpp
)
set(ksieveui_web_LIB Qt5::WebEngineWidgets)
else()
set(ksieveui_webpageeditor_LIB_SRCS
editor/sieveeditorwebview.cpp
)
set(ksieveui_web_LIB Qt5::WebKitWidgets)
endif()
set(ksieveui_editor_LIB_SRCS
${ksieveui_webpageeditor_LIB_SRCS}
......@@ -215,7 +222,7 @@ target_link_libraries(KF5KSieveUi
KF5::KIOWidgets
KF5::NewStuff
KF5::WindowSystem
Qt5::WebKitWidgets
${ksieveui_web_LIB}
KF5::PimTextEdit
)
......
......@@ -17,7 +17,13 @@
#include "sieveeditorhelphtmlwidget.h"
#include "sieveeditorloadprogressindicator.h"
#ifdef QTWEBENGINE_EXPERIMENTAL_OPTION
#include "sieveeditorwebengineview.h"
#else
#include "sieveeditorwebview.h"
#endif
#include <QVBoxLayout>
using namespace KSieveUi;
......@@ -34,10 +40,17 @@ SieveEditorHelpHtmlWidget::SieveEditorHelpHtmlWidget(QWidget *parent)
mProgressIndicator = new SieveEditorLoadProgressIndicator(this);
connect(mProgressIndicator, &SieveEditorLoadProgressIndicator::pixmapChanged, this, &SieveEditorHelpHtmlWidget::slotPixmapChanged);
connect(mProgressIndicator, &SieveEditorLoadProgressIndicator::loadFinished, this, &SieveEditorHelpHtmlWidget::slotLoadFinished);
#ifdef QTWEBENGINE_EXPERIMENTAL_OPTION
mWebView = new SieveEditorWebEngineView;
connect(mWebView, &SieveEditorWebEngineView::titleChanged, this, &SieveEditorHelpHtmlWidget::slotTitleChanged);
connect(mWebView, &SieveEditorWebEngineView::loadStarted, this, &SieveEditorHelpHtmlWidget::slotLoadStarted);
connect(mWebView, &SieveEditorWebEngineView::loadFinished, this, &SieveEditorHelpHtmlWidget::slotFinished);
#else
mWebView = new SieveEditorWebView;
connect(mWebView, &SieveEditorWebView::titleChanged, this, &SieveEditorHelpHtmlWidget::slotTitleChanged);
connect(mWebView, &SieveEditorWebView::loadStarted, this, &SieveEditorHelpHtmlWidget::slotLoadStarted);
connect(mWebView, &SieveEditorWebView::loadFinished, this, &SieveEditorHelpHtmlWidget::slotFinished);
#endif
QVBoxLayout *lay = new QVBoxLayout;
lay->addWidget(mWebView);
setLayout(lay);
......
......@@ -20,10 +20,15 @@
#include <QWidget>
#include <QUrl>
#include <config-libksieve.h>
namespace KSieveUi
{
#ifdef QTWEBENGINE_EXPERIMENTAL_OPTION
class SieveEditorWebEngineView;
#else
class SieveEditorWebView;
#endif
class SieveEditorLoadProgressIndicator;
class SieveEditorHelpHtmlWidget : public QWidget
{
......@@ -54,7 +59,11 @@ private Q_SLOTS:
void slotLoadFinished(bool success);
private:
QString mTitle;
#ifdef QTWEBENGINE_EXPERIMENTAL_OPTION
SieveEditorWebEngineView *mWebView;
#else
SieveEditorWebView *mWebView;
#endif
SieveEditorLoadProgressIndicator *mProgressIndicator;
qreal mZoomFactor;
};
......
......@@ -16,6 +16,7 @@
*/
#include "sieveeditorwebengineview.h"
#include <QContextMenuEvent>
#include <QMenu>
using namespace KSieveUi;
......
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