From 0a4b9df53f0ede439435b0408558e1038c619a67 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Thu, 3 Mar 2016 17:28:52 +0100 Subject: Add icon property and iconChanged signal to QWebEnginePage The new API makes possible to access downloaded icons via QWebEnginePage. Thus the QNAM usage for downloading favicons and the corresponding workaround due to authentication are removed from the demobrowser. Change-Id: I9fdcc7ee7673f7caa239d932f20a51c74b24763f Task-number: QTBUG-51179 Reviewed-by: Leena Miettinen Reviewed-by: Kai Koehne --- examples/webenginewidgets/demobrowser/tabwidget.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'examples/webenginewidgets/demobrowser/tabwidget.cpp') diff --git a/examples/webenginewidgets/demobrowser/tabwidget.cpp b/examples/webenginewidgets/demobrowser/tabwidget.cpp index a3352d4a2..99aecf816 100644 --- a/examples/webenginewidgets/demobrowser/tabwidget.cpp +++ b/examples/webenginewidgets/demobrowser/tabwidget.cpp @@ -597,8 +597,8 @@ WebView *TabWidget::newTab(bool makeCurrent) urlLineEdit->setWebView(webView); connect(webView, SIGNAL(loadStarted()), this, SLOT(webViewLoadStarted())); - connect(webView, SIGNAL(iconChanged()), - this, SLOT(webViewIconChanged())); + connect(webView, SIGNAL(iconChanged(QIcon)), + this, SLOT(webViewIconChanged(QIcon))); connect(webView, SIGNAL(titleChanged(QString)), this, SLOT(webViewTitleChanged(QString))); connect(webView->page(), SIGNAL(audioMutedChanged(bool)), @@ -736,14 +736,12 @@ void TabWidget::webViewLoadStarted() } } -void TabWidget::webViewIconChanged() +void TabWidget::webViewIconChanged(const QIcon &icon) { WebView *webView = qobject_cast(sender()); int index = webViewIndex(webView); - if (-1 != index) { - QIcon icon = webView->icon(); + if (-1 != index) setTabIcon(index, icon); - } } void TabWidget::webViewTitleChanged(const QString &title) -- cgit v1.2.3