summaryrefslogtreecommitdiffstats
path: root/examples/webenginewidgets/demobrowser/tabwidget.cpp
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2016-03-03 17:28:52 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2016-03-31 07:40:15 +0000
commit0a4b9df53f0ede439435b0408558e1038c619a67 (patch)
tree0c285ad9a68f90257d013e2df7996ac45b1b4bae /examples/webenginewidgets/demobrowser/tabwidget.cpp
parent76c61aa1400ef2def204c3732e30e08e40631e8d (diff)
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 <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'examples/webenginewidgets/demobrowser/tabwidget.cpp')
-rw-r--r--examples/webenginewidgets/demobrowser/tabwidget.cpp10
1 files changed, 4 insertions, 6 deletions
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<WebView*>(sender());
int index = webViewIndex(webView);
- if (-1 != index) {
- QIcon icon = webView->icon();
+ if (-1 != index)
setTabIcon(index, icon);
- }
}
void TabWidget::webViewTitleChanged(const QString &title)