From f4c5a81cc1050bc267359d1b2173e36392fe08a1 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Mon, 5 Aug 2013 14:56:59 +0200 Subject: Import QtWebKit public headers. This is the first step toward re-implementing part of the QWebView API on top of QtWebEngine. The plan is to import the complete headers to facilitate diffs and progress tracking. Changes squashed in this commit: - Use the QWebEngine prefix for class names - Strip out non-public members and directives - Allow building using those headers by disabling the Q_PROPERTY macros and by adding a dummy implementation for virtual methods directly in the header - Update the widgetsnanobrowser example to comply with the slight changes from the previous API Change-Id: Ia7efa5430f775d09b493544430a04856cc7928f6 Reviewed-by: Pierre Rossi Reviewed-by: Andras Becsi --- examples/widgets/widgetsnanobrowser/widgetwindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/widgets/widgetsnanobrowser') diff --git a/examples/widgets/widgetsnanobrowser/widgetwindow.cpp b/examples/widgets/widgetsnanobrowser/widgetwindow.cpp index 9f2ccbe6a..8d19cc2c8 100644 --- a/examples/widgets/widgetsnanobrowser/widgetwindow.cpp +++ b/examples/widgets/widgetsnanobrowser/widgetwindow.cpp @@ -42,6 +42,8 @@ #include "widgetwindow.h" #include "qwebengineview.h" +#include "qwebenginepage.h" +#include "qwebenginehistory.h" #include "../../common/util.h" #include @@ -120,7 +122,7 @@ void WidgetWindow::loadStarted() void WidgetWindow::loadFinished(bool success) { Q_UNUSED(success); - forwardButton->setEnabled(m_webView->canGoForward()); - backButton->setEnabled(m_webView->canGoBack()); + forwardButton->setEnabled(m_webView->page()->history()->canGoForward()); + backButton->setEnabled(m_webView->page()->history()->canGoBack()); reloadButton->setIcon(QIcon(":/icons/view-refresh.png")); } -- cgit v1.2.3