diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-01-16 18:20:32 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-15 17:03:28 +0200 |
commit | beb4ff332ca5b8406a75e8b2146464c5b0a81abd (patch) | |
tree | cb949f8710876153acaa146eda29abf89447a9f4 /examples/webenginewidgets/browser/tabwidget.cpp | |
parent | 84ced937a0f9f2874e32e16c4c6ebf72b46904c9 (diff) |
Cleanup the QtWebEngineWidgets public headers and API
Headers were left intact to leave a trace of the evolution compared
to the QtWebKit API and to make it easier to work until we had a
basic subset of the API implemented.
With the upcoming release, this patch removes this convenience in the
aim of starting polishing the headers and the documentation for the
upcoming release.
Change-Id: Iae436b4ec041d771a7002575e122835802bc9f3e
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Diffstat (limited to 'examples/webenginewidgets/browser/tabwidget.cpp')
-rw-r--r-- | examples/webenginewidgets/browser/tabwidget.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/webenginewidgets/browser/tabwidget.cpp b/examples/webenginewidgets/browser/tabwidget.cpp index 3c71b2d53..af18b5a37 100644 --- a/examples/webenginewidgets/browser/tabwidget.cpp +++ b/examples/webenginewidgets/browser/tabwidget.cpp @@ -306,18 +306,26 @@ void TabWidget::currentChanged(int index) WebView *oldWebView = this->webView(m_lineEdits->currentIndex()); if (oldWebView) { +#if defined(QWEBENGINEVIEW_STATUSBARMESSAGE) disconnect(oldWebView, SIGNAL(statusBarMessage(QString)), this, SIGNAL(showStatusBarMessage(QString))); +#endif +#if defined(QWEBENGINEVIEW_LINKHOVERED) disconnect(oldWebView->page(), SIGNAL(linkHovered(QString,QString,QString)), this, SIGNAL(linkHovered(QString))); +#endif disconnect(oldWebView, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int))); } +#if defined(QWEBENGINEVIEW_STATUSBARMESSAGE) connect(webView, SIGNAL(statusBarMessage(QString)), this, SIGNAL(showStatusBarMessage(QString))); +#endif +#if defined(QWEBENGINEVIEW_LINKHOVERED) connect(webView->page(), SIGNAL(linkHovered(QString,QString,QString)), this, SIGNAL(linkHovered(QString))); +#endif connect(webView, SIGNAL(loadProgress(int)), this, SIGNAL(loadProgress(int))); @@ -450,8 +458,10 @@ WebView *TabWidget::newTab(bool makeCurrent) this, SLOT(webViewLoadStarted())); connect(webView, SIGNAL(loadFinished(bool)), this, SLOT(webViewIconChanged())); +#if defined(QWEBENGINEVIEW_ICONCHANGED) connect(webView, SIGNAL(iconChanged()), this, SLOT(webViewIconChanged())); +#endif connect(webView, SIGNAL(titleChanged(QString)), this, SLOT(webViewTitleChanged(QString))); connect(webView, SIGNAL(urlChanged(QUrl)), @@ -460,14 +470,22 @@ WebView *TabWidget::newTab(bool makeCurrent) this, SLOT(windowCloseRequested())); connect(webView->page(), SIGNAL(geometryChangeRequested(QRect)), this, SIGNAL(geometryChangeRequested(QRect))); +#if defined(QWEBENGINEPAGE_PRINTREQUESTED) connect(webView->page(), SIGNAL(printRequested(QWebEngineFrame*)), this, SIGNAL(printRequested(QWebEngineFrame*))); +#endif +#if defined(QWEBENGINEPAGE_MENUBARVISIBILITYCHANGEREQUESTED) connect(webView->page(), SIGNAL(menuBarVisibilityChangeRequested(bool)), this, SIGNAL(menuBarVisibilityChangeRequested(bool))); +#endif +#if defined(QWEBENGINEPAGE_STATUSBARVISIBILITYCHANGEREQUESTED) connect(webView->page(), SIGNAL(statusBarVisibilityChangeRequested(bool)), this, SIGNAL(statusBarVisibilityChangeRequested(bool))); +#endif +#if defined(QWEBENGINEPAGE_TOOLBARVISIBILITYCHANGEREQUESTED) connect(webView->page(), SIGNAL(toolBarVisibilityChangeRequested(bool)), this, SIGNAL(toolBarVisibilityChangeRequested(bool))); +#endif addTab(webView, tr("(Untitled)")); if (makeCurrent) setCurrentWidget(webView); |