summaryrefslogtreecommitdiff
path: root/examples/widgets/browser/tabwidget.cpp
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-08-06 17:45:07 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-08-20 18:15:21 +0200
commit68f3331b98d4d9996732117549cbdf4ea80cac70 (patch)
tree1a43dcad4e6f9f96852e113413cba065f9fd283b /examples/widgets/browser/tabwidget.cpp
parentccfeac7d1e474408e2cae169714326f6198eb17c (diff)
downloadqtwebengine-68f3331b98d4d9996732117549cbdf4ea80cac70.tar.gz
demo browser: Fix the compilation with QtWebEngine.
This makes the demo compile, but not link since most of the methods aren't implemented yet. Also disable downloads and printing since they require a bit more work to instead use the page directly. Change-Id: I59adfe07fda077c6909f70f12800a4cfa6a6dad2 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'examples/widgets/browser/tabwidget.cpp')
-rw-r--r--examples/widgets/browser/tabwidget.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/widgets/browser/tabwidget.cpp b/examples/widgets/browser/tabwidget.cpp
index e451b39d5..2a21cf33b 100644
--- a/examples/widgets/browser/tabwidget.cpp
+++ b/examples/widgets/browser/tabwidget.cpp
@@ -289,7 +289,7 @@ void TabWidget::moveTab(int fromIndex, int toIndex)
m_lineEdits->insertWidget(toIndex, lineEdit);
}
-void TabWidget::addWebAction(QAction *action, QWebPage::WebAction webAction)
+void TabWidget::addWebAction(QAction *action, QWebEnginePage::WebAction webAction)
{
if (!action)
return;
@@ -460,8 +460,8 @@ WebView *TabWidget::newTab(bool makeCurrent)
this, SLOT(windowCloseRequested()));
connect(webView->page(), SIGNAL(geometryChangeRequested(QRect)),
this, SIGNAL(geometryChangeRequested(QRect)));
- connect(webView->page(), SIGNAL(printRequested(QWebFrame*)),
- this, SIGNAL(printRequested(QWebFrame*)));
+ connect(webView->page(), SIGNAL(printRequested(QWebEngineFrame*)),
+ this, SIGNAL(printRequested(QWebEngineFrame*)));
connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)),
this, SIGNAL(menuBarVisibilityChangeRequested(bool)));
connect(webView->page(), SIGNAL(statusBarVisibilityChangeRequested(bool)),
@@ -562,8 +562,8 @@ void TabWidget::closeTab(int index)
}
hasFocus = tab->hasFocus();
- QWebSettings *globalSettings = QWebSettings::globalSettings();
- if (!globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled)) {
+ QWebEngineSettings *globalSettings = QWebEngineSettings::globalSettings();
+ if (!globalSettings->testAttribute(QWebEngineSettings::PrivateBrowsingEnabled)) {
m_recentlyClosedTabsAction->setEnabled(true);
m_recentlyClosedTabs.prepend(tab->url());
if (m_recentlyClosedTabs.size() >= TabWidget::m_recentlyClosedTabsSize)
@@ -757,7 +757,7 @@ bool TabWidget::restoreState(const QByteArray &state)
return true;
}
-WebActionMapper::WebActionMapper(QAction *root, QWebPage::WebAction webAction, QObject *parent)
+WebActionMapper::WebActionMapper(QAction *root, QWebEnginePage::WebAction webAction, QObject *parent)
: QObject(parent)
, m_currentParent(0)
, m_root(root)
@@ -787,7 +787,7 @@ void WebActionMapper::addChild(QAction *action)
connect(action, SIGNAL(changed()), this, SLOT(childChanged()));
}
-QWebPage::WebAction WebActionMapper::webAction() const
+QWebEnginePage::WebAction WebActionMapper::webAction() const
{
return m_webAction;
}
@@ -812,7 +812,7 @@ void WebActionMapper::childChanged()
}
}
-void WebActionMapper::updateCurrent(QWebPage *currentParent)
+void WebActionMapper::updateCurrent(QWebEnginePage *currentParent)
{
if (m_currentParent)
disconnect(m_currentParent, SIGNAL(destroyed(QObject*)),