summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebenginepage.cpp
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2016-04-12 17:35:19 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2016-05-04 12:27:20 +0000
commit240efee49a8e4402f2048a05c596605b2feadbd3 (patch)
tree8df93a1a1732bafe78192f70cfdb54bde8b1b3b5 /src/webenginewidgets/api/qwebenginepage.cpp
parent0bf8a13a4d0391339bae686e199fb922b64a1dcc (diff)
Combine candidate icons for a page into a single icon
For the Widget API the QIcon returned by QWebEnginePage::icon() function contains all the candidate icons for the current page. For the Quick API the QQuickWebEngineFaviconProvider provides the best quality icon for the requested size from the candidates. Task-number: QTBUG-51179 Change-Id: I42b8427f957e2f2fc745dd0111bedcc71b577216 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage.cpp')
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index 447c53ba9..e41271471 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -151,7 +151,7 @@ void QWebEnginePagePrivate::iconChanged(const QUrl &url)
return;
iconUrl = url;
Q_EMIT q->iconUrlChanged(iconUrl);
- Q_EMIT q->iconChanged(adapter->faviconManager()->getIcon(iconUrl));
+ Q_EMIT q->iconChanged(adapter->faviconManager()->getIcon());
}
void QWebEnginePagePrivate::loadProgressChanged(int progress)
@@ -1506,7 +1506,9 @@ QUrl QWebEnginePage::iconUrl() const
\brief the icon associated with the page currently viewed
\since 5.7
- By default, this property contains a null icon.
+ By default, this property contains a null icon. If the web page specifies more than one icon,
+ the \c{icon} property encapsulates the available candidate icons in a single,
+ scalable \c{QIcon}.
\sa iconChanged(), iconUrl(), iconUrlChanged()
*/
@@ -1517,7 +1519,7 @@ QIcon QWebEnginePage::icon() const
if (d->iconUrl.isEmpty())
return QIcon();
- return d->adapter->faviconManager()->getIcon(d->iconUrl);
+ return d->adapter->faviconManager()->getIcon();
}
qreal QWebEnginePage::zoomFactor() const