From 2db9af9251c54cfc6eab46df5b77559f3c8c0a0b Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 19 Aug 2014 11:40:46 +0200 Subject: Add iconUrl() to QWebEngineHistoryItem Change-Id: I61bda1aafc7513acdaeda99ef493ce50363d352e Reviewed-by: Jocelyn Turcotte --- src/core/web_contents_adapter.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/web_contents_adapter.cpp') diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index a4a8bbe23..0bed6b038 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -592,6 +592,16 @@ QDateTime WebContentsAdapter::getNavigationEntryTimestamp(int index) return entry ? toQt(entry->GetTimestamp()) : QDateTime(); } +QUrl WebContentsAdapter::getNavigationEntryIconUrl(int index) +{ + Q_D(WebContentsAdapter); + content::NavigationEntry *entry = d->webContents->GetController().GetEntryAtIndex(index); + if (!entry) + return QUrl(); + content::FaviconStatus favicon = entry->GetFavicon(); + return favicon.valid ? toQt(favicon.url) : QUrl(); +} + void WebContentsAdapter::clearNavigationHistory() { Q_D(WebContentsAdapter); -- cgit v1.2.3