diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-08-05 14:56:59 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-08-20 17:42:53 +0200 |
commit | f4c5a81cc1050bc267359d1b2173e36392fe08a1 (patch) | |
tree | a3b42f13ed36302842c35d97d156e2ac5f6fa073 /examples | |
parent | 9a3641f43572ce9e77dd6770f0029e82bd92d70c (diff) |
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 <pierre.rossi@gmail.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/widgets/widgetsnanobrowser/widgetwindow.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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 <QShortcut> @@ -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")); } |