Commit 6259b0cb authored by Laurent Montel's avatar Laurent Montel 😁

Make it compiles with QtWebEngine

parent 2a7ccedc
......@@ -23,7 +23,11 @@
#include "bilbobrowser.h"
#ifdef QTWEBENGINE_SUPPORT_OPTION
#include <QWebEngineView>
#else
#include <KWebView>
#endif
#include <QProgressBar>
#include <qstatusbar.h>
#include <kmessagebox.h>
......@@ -44,15 +48,22 @@
BilboBrowser::BilboBrowser(QWidget *parent)
: QWidget(parent)
{
#ifdef QTWEBENGINE_SUPPORT_OPTION
mWebView = new QWebEngineView(this);
#else
mWebView = new KWebView(this);
#endif
createUi(parent);
#ifdef QTWEBENGINE_SUPPORT_OPTION
//TODO
#else
connect(mWebView, &QWebView::loadProgress,
browserProgress, &QProgressBar::setValue);
connect(mWebView, &KWebView::loadFinished, this, &BilboBrowser::slotCompleted);
connect(mWebView, &QWebView::statusBarMessage, this,
&BilboBrowser::slotSetStatusBarText);
#endif
}
BilboBrowser::~BilboBrowser()
......
......@@ -26,10 +26,14 @@
#define BILBOBROWSER_H
#include <QWidget>
#include "config-kdepim.h"
class QCheckBox;
class QProgressBar;
#ifdef QTWEBENGINE_SUPPORT_OPTION
class QWebEngineView;
#else
class KWebView;
#endif
class QPushButton;
class QStatusBar;
......@@ -86,8 +90,11 @@ protected Q_SLOTS:
private:
void createUi(QWidget *parent);
#ifdef QTWEBENGINE_SUPPORT_OPTION
QWebEngineView *mWebView;
#else
KWebView *mWebView;
#endif
QCheckBox *viewInBlogStyle;
QPushButton *btnGetStyle;
QProgressBar *browserProgress;
......
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