diff --git a/examples/quick/quicknanobrowser/quickwindow.h b/examples/quick/quicknanobrowser/quickwindow.h index 3f1f944caa3d6a72739f0984767227ed3a31af8e..ed25a23b8bac16d96d60f0e78671cd24360f4af0 100644 --- a/examples/quick/quicknanobrowser/quickwindow.h +++ b/examples/quick/quicknanobrowser/quickwindow.h @@ -44,7 +44,7 @@ #include <QQmlApplicationEngine> -class QWebContentsView; +class QWebEngineView; class ApplicationEngine : public QQmlApplicationEngine { Q_OBJECT diff --git a/examples/quick/quicknanobrowser/quickwindow.qml b/examples/quick/quicknanobrowser/quickwindow.qml index 9086d26fa6d453d408f174a0272026d5062a1c33..bec301e6d11f241bedb706867afa2802c7dd759e 100644 --- a/examples/quick/quicknanobrowser/quickwindow.qml +++ b/examples/quick/quicknanobrowser/quickwindow.qml @@ -48,7 +48,7 @@ ApplicationWindow { height: 600 width: 800 visible: true - title: webContentsView.title + title: webEngineView.title // Focus and select text in URL bar Action { @@ -68,32 +68,32 @@ ApplicationWindow { ToolButton { id: backButton iconSource: "icons/go-previous.png" - onClicked: webContentsView.goBack() - enabled: webContentsView.canGoBack + onClicked: webEngineView.goBack() + enabled: webEngineView.canGoBack } ToolButton { id: forwardButton iconSource: "icons/go-next.png" - onClicked: webContentsView.goForward() - enabled: webContentsView.canGoForward + onClicked: webEngineView.goForward() + enabled: webEngineView.canGoForward } ToolButton { id: reloadButton - iconSource: webContentsView.loading ? "icons/process-stop.png" : "icons/view-refresh.png" - onClicked: webContentsView.reload() + iconSource: webEngineView.loading ? "icons/process-stop.png" : "icons/view-refresh.png" + onClicked: webEngineView.reload() } TextField { id: addressBar focus: true Layout.fillWidth: true - onAccepted: webContentsView.url = utils.fromUserInput(text) + onAccepted: webEngineView.url = utils.fromUserInput(text) } } } - WebContentsView { - id: webContentsView + WebEngineView { + id: webEngineView focus: true anchors.fill: parent url: utils.initialUrl() diff --git a/examples/widgets/widgetsnanobrowser/widgetwindow.cpp b/examples/widgets/widgetsnanobrowser/widgetwindow.cpp index 1b83e89dd6125e70b8512d2fb07f73b86069465d..9f2ccbe6a213008c2b59ecbf5a4f1df2dc7c2171 100644 --- a/examples/widgets/widgetsnanobrowser/widgetwindow.cpp +++ b/examples/widgets/widgetsnanobrowser/widgetwindow.cpp @@ -41,7 +41,7 @@ #include "widgetwindow.h" -#include "qwebcontentsview.h" +#include "qwebengineview.h" #include "../../common/util.h" #include <QShortcut> @@ -49,7 +49,7 @@ static const int margin = 1; WidgetWindow::WidgetWindow() -: m_webView(new QWebContentsView) +: m_webView(new QWebEngineView) , addressLineEdit(0) { setGeometry(0, 0, 800, 600); diff --git a/examples/widgets/widgetsnanobrowser/widgetwindow.h b/examples/widgets/widgetsnanobrowser/widgetwindow.h index 863e8a73f8bce800163641554f0aa5959f97acd1..d11f946e939c4f7207a0ec22cfe4e7fc541c493e 100644 --- a/examples/widgets/widgetsnanobrowser/widgetwindow.h +++ b/examples/widgets/widgetsnanobrowser/widgetwindow.h @@ -45,7 +45,7 @@ #include <QtWidgets> #include <QScopedPointer> -class QWebContentsView; +class QWebEngineView; class WidgetWindow : public QWidget { Q_OBJECT @@ -60,7 +60,7 @@ private Q_SLOTS: void loadFinished(bool); private: - QScopedPointer<QWebContentsView> m_webView; + QScopedPointer<QWebEngineView> m_webView; QLineEdit* addressLineEdit; QToolButton* forwardButton; QToolButton* backButton; diff --git a/lib/quick/plugin.cpp b/lib/quick/plugin.cpp index b2e332c91dfde750b3b505f3769c002b85c56b75..e1da73cca75b3a3d4b324c49fdf08e4fc1c02116 100644 --- a/lib/quick/plugin.cpp +++ b/lib/quick/plugin.cpp @@ -41,7 +41,7 @@ #include <QtQml/qqmlextensionplugin.h> -#include "qquickwebcontentsview_p.h" +#include "qquickwebengineview_p.h" QT_BEGIN_NAMESPACE @@ -55,7 +55,7 @@ public: Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWebEngine")); Q_UNUSED(uri); - qmlRegisterType<QQuickWebContentsView>(uri, 1, 0, "WebContentsView"); + qmlRegisterType<QQuickWebEngineView>(uri, 1, 0, "WebEngineView"); } }; diff --git a/lib/quick/qquickwebcontentsview.cpp b/lib/quick/qquickwebengineview.cpp similarity index 63% rename from lib/quick/qquickwebcontentsview.cpp rename to lib/quick/qquickwebengineview.cpp index 48ba0fb60b8813927ad722385e4fec80b210a476..5879066983a8bd3ece3c654c7c9e9079cea33ff8 100644 --- a/lib/quick/qquickwebcontentsview.cpp +++ b/lib/quick/qquickwebengineview.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#include "qquickwebcontentsview_p.h" -#include "qquickwebcontentsview_p_p.h" +#include "qquickwebengineview_p.h" +#include "qquickwebengineview_p_p.h" #include "web_contents_adapter.h" #include "render_widget_host_view_qt_delegate_quick.h" @@ -48,126 +48,126 @@ #include <QUrl> -QQuickWebContentsViewPrivate::QQuickWebContentsViewPrivate() +QQuickWebEngineViewPrivate::QQuickWebEngineViewPrivate() : adapter(new WebContentsAdapter(this)) { } -RenderWidgetHostViewQtDelegate *QQuickWebContentsViewPrivate::CreateRenderWidgetHostViewQtDelegate() +RenderWidgetHostViewQtDelegate *QQuickWebEngineViewPrivate::CreateRenderWidgetHostViewQtDelegate() { return new RenderWidgetHostViewQtDelegateQuick; } -void QQuickWebContentsViewPrivate::titleChanged(const QString &title) +void QQuickWebEngineViewPrivate::titleChanged(const QString &title) { - Q_Q(QQuickWebContentsView); + Q_Q(QQuickWebEngineView); Q_UNUSED(title); Q_EMIT q->titleChanged(); } -void QQuickWebContentsViewPrivate::urlChanged(const QUrl &url) +void QQuickWebEngineViewPrivate::urlChanged(const QUrl &url) { - Q_Q(QQuickWebContentsView); + Q_Q(QQuickWebEngineView); Q_UNUSED(url); Q_EMIT q->urlChanged(); } -void QQuickWebContentsViewPrivate::loadingStateChanged() +void QQuickWebEngineViewPrivate::loadingStateChanged() { - Q_Q(QQuickWebContentsView); + Q_Q(QQuickWebEngineView); Q_EMIT q->loadingStateChanged(); } -QRectF QQuickWebContentsViewPrivate::viewportRect() const +QRectF QQuickWebEngineViewPrivate::viewportRect() const { - Q_Q(const QQuickWebContentsView); + Q_Q(const QQuickWebEngineView); return QRectF(q->x(), q->y(), q->width(), q->height()); } -void QQuickWebContentsViewPrivate::loadFinished(bool success) +void QQuickWebEngineViewPrivate::loadFinished(bool success) { - Q_Q(QQuickWebContentsView); + Q_Q(QQuickWebEngineView); Q_UNUSED(success); Q_EMIT q->loadingStateChanged(); } -void QQuickWebContentsViewPrivate::focusContainer() +void QQuickWebEngineViewPrivate::focusContainer() { - Q_Q(QQuickWebContentsView); + Q_Q(QQuickWebEngineView); q->forceActiveFocus(); } -QQuickWebContentsView::QQuickWebContentsView() - : d_ptr(new QQuickWebContentsViewPrivate) +QQuickWebEngineView::QQuickWebEngineView() + : d_ptr(new QQuickWebEngineViewPrivate) { d_ptr->q_ptr = this; } -QQuickWebContentsView::~QQuickWebContentsView() +QQuickWebEngineView::~QQuickWebEngineView() { } -QUrl QQuickWebContentsView::url() const +QUrl QQuickWebEngineView::url() const { - Q_D(const QQuickWebContentsView); + Q_D(const QQuickWebEngineView); return d->adapter->activeUrl(); } -void QQuickWebContentsView::setUrl(const QUrl& url) +void QQuickWebEngineView::setUrl(const QUrl& url) { - Q_D(QQuickWebContentsView); + Q_D(QQuickWebEngineView); d->adapter->load(url); } -void QQuickWebContentsView::goBack() +void QQuickWebEngineView::goBack() { - Q_D(QQuickWebContentsView); + Q_D(QQuickWebEngineView); d->adapter->navigateHistory(-1); } -void QQuickWebContentsView::goForward() +void QQuickWebEngineView::goForward() { - Q_D(QQuickWebContentsView); + Q_D(QQuickWebEngineView); d->adapter->navigateHistory(1); } -void QQuickWebContentsView::reload() +void QQuickWebEngineView::reload() { - Q_D(QQuickWebContentsView); + Q_D(QQuickWebEngineView); d->adapter->reload(); } -void QQuickWebContentsView::stop() +void QQuickWebEngineView::stop() { - Q_D(QQuickWebContentsView); + Q_D(QQuickWebEngineView); d->adapter->stop(); } -bool QQuickWebContentsView::isLoading() const +bool QQuickWebEngineView::isLoading() const { - Q_D(const QQuickWebContentsView); + Q_D(const QQuickWebEngineView); return d->adapter->isLoading(); } -QString QQuickWebContentsView::title() const +QString QQuickWebEngineView::title() const { - Q_D(const QQuickWebContentsView); + Q_D(const QQuickWebEngineView); return d->adapter->pageTitle(); } -bool QQuickWebContentsView::canGoBack() const +bool QQuickWebEngineView::canGoBack() const { - Q_D(const QQuickWebContentsView); + Q_D(const QQuickWebEngineView); return d->adapter->canGoBack(); } -bool QQuickWebContentsView::canGoForward() const +bool QQuickWebEngineView::canGoForward() const { - Q_D(const QQuickWebContentsView); + Q_D(const QQuickWebEngineView); return d->adapter->canGoForward(); } -void QQuickWebContentsView::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) +void QQuickWebEngineView::geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) { QQuickItem::geometryChanged(newGeometry, oldGeometry); diff --git a/lib/quick/qquickwebcontentsview_p.h b/lib/quick/qquickwebengineview_p.h similarity index 88% rename from lib/quick/qquickwebcontentsview_p.h rename to lib/quick/qquickwebengineview_p.h index 61aca128e04da4764ec3c445df955779e3113fbe..2aa34c0333d26534b5fa8f6d8900d65efc8c0787 100644 --- a/lib/quick/qquickwebcontentsview_p.h +++ b/lib/quick/qquickwebengineview_p.h @@ -39,15 +39,15 @@ ** ****************************************************************************/ -#ifndef QQUICKWEBCONTESTSVIEW_P_H -#define QQUICKWEBCONTESTSVIEW_P_H +#ifndef QQUICKWEBENGINEVIEW_P_H +#define QQUICKWEBENGINEVIEW_P_H #include <QQuickItem> #include <QScopedPointer> -class QQuickWebContentsViewPrivate; +class QQuickWebEngineViewPrivate; -class QQuickWebContentsView : public QQuickItem { +class QQuickWebEngineView : public QQuickItem { Q_OBJECT Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) Q_PROPERTY(bool loading READ isLoading NOTIFY loadingStateChanged) @@ -56,8 +56,8 @@ class QQuickWebContentsView : public QQuickItem { Q_PROPERTY(bool canGoForward READ canGoForward NOTIFY loadingStateChanged) public: - QQuickWebContentsView(); - ~QQuickWebContentsView(); + QQuickWebEngineView(); + ~QQuickWebEngineView(); QUrl url() const; void setUrl(const QUrl&); @@ -81,11 +81,11 @@ protected: void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry); private: - Q_DECLARE_PRIVATE(QQuickWebContentsView) + Q_DECLARE_PRIVATE(QQuickWebEngineView) // Hides QObject::d_ptr allowing us to use the convenience macros. - QScopedPointer<QQuickWebContentsViewPrivate> d_ptr; + QScopedPointer<QQuickWebEngineViewPrivate> d_ptr; }; -QML_DECLARE_TYPE(QQuickWebContentsView) +QML_DECLARE_TYPE(QQuickWebEngineView) -#endif // QQUICKWEBCONTESTSVIEW_P_H +#endif // QQUICKWEBENGINEVIEW_P_H diff --git a/lib/quick/qquickwebcontentsview_p_p.h b/lib/quick/qquickwebengineview_p_p.h similarity index 89% rename from lib/quick/qquickwebcontentsview_p_p.h rename to lib/quick/qquickwebengineview_p_p.h index 51f8058817d1e55cc2ca9760fadad472b730bf84..0997fe08c251523a9b1cffc73ad9f05e5f7c3921 100644 --- a/lib/quick/qquickwebcontentsview_p_p.h +++ b/lib/quick/qquickwebengineview_p_p.h @@ -39,23 +39,23 @@ ** ****************************************************************************/ -#ifndef QQUICKWEBCONTENTSVIEW_P_P_H -#define QQUICKWEBCONTENTSVIEW_P_P_H +#ifndef QQUICKWEBENGINEVIEW_P_P_H +#define QQUICKWEBENGINEVIEW_P_P_H #include "web_contents_adapter_client.h" #include <QScopedPointer> -class QQuickWebContentsView; +class QQuickWebEngineView; class RenderWidgetHostViewQtDelegateQuick; class WebContentsAdapter; -class QQuickWebContentsViewPrivate : public WebContentsAdapterClient +class QQuickWebEngineViewPrivate : public WebContentsAdapterClient { - QQuickWebContentsView *q_ptr; - Q_DECLARE_PUBLIC(QQuickWebContentsView) + QQuickWebEngineView *q_ptr; + Q_DECLARE_PUBLIC(QQuickWebEngineView) public: - QQuickWebContentsViewPrivate(); + QQuickWebEngineViewPrivate(); virtual RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegate() Q_DECL_OVERRIDE; virtual void titleChanged(const QString&) Q_DECL_OVERRIDE; @@ -69,4 +69,4 @@ public: friend class RenderWidgetHostViewQtDelegateQuick; }; -#endif // QQUICKWEBCONTENTSVIEW_P_P_H +#endif // QQUICKWEBENGINEVIEW_P_P_H diff --git a/lib/quick/quick.pro b/lib/quick/quick.pro index e2eec55dc9f1dc12a3dec305b5d52dc7ffea1723..bb6acc179e097a32e26e589e6b60ab30d01e2891 100644 --- a/lib/quick/quick.pro +++ b/lib/quick/quick.pro @@ -16,13 +16,13 @@ QMAKE_RPATHDIR += $$LIBPATH #DESTDIR = $$LIBPATH SOURCES = \ - qquickwebcontentsview.cpp \ + qquickwebengineview.cpp \ plugin.cpp \ render_widget_host_view_qt_delegate_quick.cpp HEADERS = \ - qquickwebcontentsview_p.h \ - qquickwebcontentsview_p_p.h \ + qquickwebengineview_p.h \ + qquickwebengineview_p_p.h \ render_widget_host_view_qt_delegate_quick.h load(qml_plugin) diff --git a/lib/quick/render_widget_host_view_qt_delegate_quick.cpp b/lib/quick/render_widget_host_view_qt_delegate_quick.cpp index 5610beabb38128c326c9b8bc9a81965db231455c..87c1794d6e0afa483e497a092544fba5bb053e6d 100644 --- a/lib/quick/render_widget_host_view_qt_delegate_quick.cpp +++ b/lib/quick/render_widget_host_view_qt_delegate_quick.cpp @@ -41,8 +41,8 @@ #include "render_widget_host_view_qt_delegate_quick.h" -#include "qquickwebcontentsview_p.h" -#include "qquickwebcontentsview_p_p.h" +#include "qquickwebengineview_p.h" +#include "qquickwebengineview_p_p.h" #include <QQuickWindow> #include <QWindow> @@ -55,7 +55,7 @@ RenderWidgetHostViewQtDelegateQuick::RenderWidgetHostViewQtDelegateQuick(QQuickI void RenderWidgetHostViewQtDelegateQuick::initAsChild(WebContentsAdapterClient* container) { - QQuickWebContentsViewPrivate *viewPrivate = static_cast<QQuickWebContentsViewPrivate *>(container); + QQuickWebEngineViewPrivate *viewPrivate = static_cast<QQuickWebEngineViewPrivate *>(container); setParentItem(viewPrivate->q_func()); } diff --git a/lib/widgets/Api/qwebcontentsview.cpp b/lib/widgets/Api/qwebengineview.cpp similarity index 70% rename from lib/widgets/Api/qwebcontentsview.cpp rename to lib/widgets/Api/qwebengineview.cpp index dff1ebf43b3e8ae2a4f7aab86918da2f93a40130..a7a135fc81a61925c513ca9fdc10d78c0b1be60a 100644 --- a/lib/widgets/Api/qwebcontentsview.cpp +++ b/lib/widgets/Api/qwebengineview.cpp @@ -39,8 +39,8 @@ ** ****************************************************************************/ -#include "qwebcontentsview.h" -#include "qwebcontentsview_p.h" +#include "qwebengineview.h" +#include "qwebengineview_p.h" #include "render_widget_host_view_qt_delegate_widget.h" #include "web_contents_adapter.h" @@ -48,25 +48,25 @@ #include <QStackedLayout> #include <QUrl> -QWebContentsViewPrivate::QWebContentsViewPrivate() +QWebEngineViewPrivate::QWebEngineViewPrivate() : m_isLoading(false) , adapter(new WebContentsAdapter(this)) { } -void QWebContentsViewPrivate::titleChanged(const QString &title) +void QWebEngineViewPrivate::titleChanged(const QString &title) { Q_EMIT q_ptr->titleChanged(title); } -void QWebContentsViewPrivate::urlChanged(const QUrl &url) +void QWebEngineViewPrivate::urlChanged(const QUrl &url) { Q_EMIT q_ptr->urlChanged(url); } -void QWebContentsViewPrivate::loadingStateChanged() +void QWebEngineViewPrivate::loadingStateChanged() { - Q_Q(QWebContentsView); + Q_Q(QWebEngineView); const bool wasLoading = m_isLoading; m_isLoading = adapter->isLoading(); if (m_isLoading != wasLoading) { @@ -75,82 +75,82 @@ void QWebContentsViewPrivate::loadingStateChanged() } } -QRectF QWebContentsViewPrivate::viewportRect() const +QRectF QWebEngineViewPrivate::viewportRect() const { - Q_Q(const QWebContentsView); + Q_Q(const QWebEngineView); return q->geometry(); } -void QWebContentsViewPrivate::loadFinished(bool success) +void QWebEngineViewPrivate::loadFinished(bool success) { - Q_Q(QWebContentsView); + Q_Q(QWebEngineView); m_isLoading = adapter->isLoading(); Q_EMIT q->loadFinished(success); } -void QWebContentsViewPrivate::focusContainer() +void QWebEngineViewPrivate::focusContainer() { - Q_Q(QWebContentsView); + Q_Q(QWebEngineView); q->setFocus(); } -RenderWidgetHostViewQtDelegate *QWebContentsViewPrivate::CreateRenderWidgetHostViewQtDelegate() +RenderWidgetHostViewQtDelegate *QWebEngineViewPrivate::CreateRenderWidgetHostViewQtDelegate() { return new RenderWidgetHostViewQtDelegateWidget; } -QWebContentsView::QWebContentsView() - : d_ptr(new QWebContentsViewPrivate) +QWebEngineView::QWebEngineView() + : d_ptr(new QWebEngineViewPrivate) { d_ptr->q_ptr=this; // This causes the child RenderWidgetHostViewQtDelegateWidgets to fill this widget. setLayout(new QStackedLayout); } -QWebContentsView::~QWebContentsView() +QWebEngineView::~QWebEngineView() { } -void QWebContentsView::load(const QUrl& url) +void QWebEngineView::load(const QUrl& url) { - Q_D(QWebContentsView); + Q_D(QWebEngineView); d->adapter->load(url); } -bool QWebContentsView::canGoBack() const +bool QWebEngineView::canGoBack() const { - Q_D(const QWebContentsView); + Q_D(const QWebEngineView); return d->adapter->canGoBack(); } -bool QWebContentsView::canGoForward() const +bool QWebEngineView::canGoForward() const { - Q_D(const QWebContentsView); + Q_D(const QWebEngineView); return d->adapter->canGoForward(); } -void QWebContentsView::back() +void QWebEngineView::back() { - Q_D(QWebContentsView); + Q_D(QWebEngineView); d->adapter->navigateHistory(-1); } -void QWebContentsView::forward() +void QWebEngineView::forward() { - Q_D(QWebContentsView); + Q_D(QWebEngineView); d->adapter->navigateHistory(1); } -void QWebContentsView::reload() +void QWebEngineView::reload() { - Q_D(QWebContentsView); + Q_D(QWebEngineView); d->adapter->reload(); } -void QWebContentsView::stop() +void QWebEngineView::stop() { - Q_D(QWebContentsView); + Q_D(QWebEngineView); d->adapter->stop(); } -#include "moc_qwebcontentsview.cpp" +#include "moc_qwebengineview.cpp" diff --git a/lib/widgets/Api/qwebcontentsview.h b/lib/widgets/Api/qwebengineview.h similarity index 88% rename from lib/widgets/Api/qwebcontentsview.h rename to lib/widgets/Api/qwebengineview.h index 4db8e4b5692c3d62eda44806e243ae5ca737bde6..a86218538ce618f30ca81888c95aa13bea42be1e 100644 --- a/lib/widgets/Api/qwebcontentsview.h +++ b/lib/widgets/Api/qwebengineview.h @@ -39,21 +39,21 @@ ** ****************************************************************************/ -#ifndef QWEBCONTESTSVIEW_H -#define QWEBCONTESTSVIEW_H +#ifndef QWEBENGINEVIEW_H +#define QWEBENGINEVIEW_H #include <qtwebenginewidgetsglobal.h> #include <QWidget> #include <QScopedPointer> -class QWebContentsViewPrivate; +class QWebEngineViewPrivate; -class QWEBENGINEWIDGETS_EXPORT QWebContentsView : public QWidget { +class QWEBENGINEWIDGETS_EXPORT QWebEngineView : public QWidget { Q_OBJECT public: - QWebContentsView(); - ~QWebContentsView(); + QWebEngineView(); + ~QWebEngineView(); void load(const QUrl& url); bool canGoBack() const; @@ -72,8 +72,8 @@ Q_SIGNALS: void urlChanged(const QUrl& url); private: - Q_DECLARE_PRIVATE(QWebContentsView); - QScopedPointer<QWebContentsViewPrivate> d_ptr; + Q_DECLARE_PRIVATE(QWebEngineView); + QScopedPointer<QWebEngineViewPrivate> d_ptr; }; -#endif // QWEBCONTESTSVIEW_H +#endif // QWEBENGINEVIEW_H diff --git a/lib/widgets/Api/qwebcontentsview_p.h b/lib/widgets/Api/qwebengineview_p.h similarity index 91% rename from lib/widgets/Api/qwebcontentsview_p.h rename to lib/widgets/Api/qwebengineview_p.h index 6fb60c33e0fff283dd6eeb90ce96925ba591e207..5c623a0978a013c3a9b861ed8ffb2d0949a9ece5 100644 --- a/lib/widgets/Api/qwebcontentsview_p.h +++ b/lib/widgets/Api/qwebengineview_p.h @@ -39,24 +39,24 @@ ** ****************************************************************************/ -#ifndef QWEBCONTESTSVIEWPRIVATE_H -#define QWEBCONTESTSVIEWPRIVATE_H +#ifndef QWEBENGINEVIEWPRIVATE_H +#define QWEBENGINEVIEWPRIVATE_H #include "web_contents_adapter_client.h" #include <QScopedPointer> -class QWebContentsView; +class QWebEngineView; class RenderWidgetHostViewQtDelegate; class WebContentsAdapter; -class QWebContentsViewPrivate : public WebContentsAdapterClient +class QWebEngineViewPrivate : public WebContentsAdapterClient { - Q_DECLARE_PUBLIC(QWebContentsView) - QWebContentsView *q_ptr; + Q_DECLARE_PUBLIC(QWebEngineView) + QWebEngineView *q_ptr; public: - QWebContentsViewPrivate(); + QWebEngineViewPrivate(); virtual RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegate() Q_DECL_OVERRIDE; virtual void titleChanged(const QString&) Q_DECL_OVERRIDE; diff --git a/lib/widgets/render_widget_host_view_qt_delegate_widget.cpp b/lib/widgets/render_widget_host_view_qt_delegate_widget.cpp index 05b8a16e8ce9d1d3fd793ceaf1b1898f6cf61d74..507471a78472d0b1013917e9e2e3aa583e230fa6 100644 --- a/lib/widgets/render_widget_host_view_qt_delegate_widget.cpp +++ b/lib/widgets/render_widget_host_view_qt_delegate_widget.cpp @@ -41,8 +41,8 @@ #include "render_widget_host_view_qt_delegate_widget.h" -#include "qwebcontentsview.h" -#include "qwebcontentsview_p.h" +#include "qwebengineview.h" +#include "qwebengineview_p.h" #include <QtGlobal> #include <QLayout> #include <QResizeEvent> @@ -75,7 +75,7 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(QWidg void RenderWidgetHostViewQtDelegateWidget::initAsChild(WebContentsAdapterClient* container) { - QWebContentsViewPrivate *viewPrivate = static_cast<QWebContentsViewPrivate *>(container); + QWebEngineViewPrivate *viewPrivate = static_cast<QWebEngineViewPrivate *>(container); viewPrivate->q_func()->layout()->addWidget(this); } diff --git a/lib/widgets/widgets.pro b/lib/widgets/widgets.pro index fddfa4945a286f54a2ba42bc83f6dc79e2db5449..9a5591b826bd897f8eb24a634f4645279fbfd1a8 100644 --- a/lib/widgets/widgets.pro +++ b/lib/widgets/widgets.pro @@ -22,13 +22,13 @@ DESTDIR = $$LIBPATH INCLUDEPATH += Api ../ SOURCES = \ - Api/qwebcontentsview.cpp\ + Api/qwebengineview.cpp\ render_widget_host_view_qt_delegate_widget.cpp HEADERS = \ Api/qtwebenginewidgetsglobal.h \ - Api/qwebcontentsview.h \ - Api/qwebcontentsview_p.h \ + Api/qwebengineview.h \ + Api/qwebengineview_p.h \ render_widget_host_view_qt_delegate_widget.h load(qt_module)