diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-01-16 18:20:32 +0100 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-01-17 16:46:47 +0100 |
commit | b3e1a8fb182ce0becebb24998b61ba4acc9dc318 (patch) | |
tree | 80cf8ae4de5a15670260a8b79d6e2982518e1e99 /examples/widgets/browser/tabwidget.cpp | |
parent | db2c0781218b7dfa03f7bc39b1e2115dbf4a0fb0 (diff) |
Cleanup QtWebEngineWidgets headers for the TP1 release
With this applications will get a compile error instead of a linking
error for methods currently without an implementation in cpp files.
Change-Id: I3fe5c1f127c57cd62a1eb401e8e3283e005a0344
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'examples/widgets/browser/tabwidget.cpp')
-rw-r--r-- | examples/widgets/browser/tabwidget.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/examples/widgets/browser/tabwidget.cpp b/examples/widgets/browser/tabwidget.cpp index 3c71b2d53..af18b5a37 100644 --- a/examples/widgets/browser/tabwidget.cpp +++ b/examples/widgets/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); |