From beb4ff332ca5b8406a75e8b2146464c5b0a81abd Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Thu, 16 Jan 2014 18:20:32 +0100 Subject: 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 --- examples/webenginewidgets/browser/tabwidget.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'examples/webenginewidgets/browser/tabwidget.cpp') 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); -- cgit v1.2.3