diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-08-19 11:40:46 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-08-19 13:27:58 +0200 |
commit | 2db9af9251c54cfc6eab46df5b77559f3c8c0a0b (patch) | |
tree | 0c4023d547d9bff58a008d870c39864f5373999a /src/core | |
parent | 1643f41cfb0ec46faa7bf411088b6f74d9339fff (diff) |
Add iconUrl() to QWebEngineHistoryItem
Change-Id: I61bda1aafc7513acdaeda99ef493ce50363d352e
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 10 | ||||
-rw-r--r-- | src/core/web_contents_adapter.h | 1 |
2 files changed, 11 insertions, 0 deletions
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); diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h index ee8ed0aea..3adec2141 100644 --- a/src/core/web_contents_adapter.h +++ b/src/core/web_contents_adapter.h @@ -95,6 +95,7 @@ public: QUrl getNavigationEntryUrl(int index); QString getNavigationEntryTitle(int index); QDateTime getNavigationEntryTimestamp(int index); + QUrl getNavigationEntryIconUrl(int index); void clearNavigationHistory(); void serializeNavigationHistory(QDataStream &output); void setZoomFactor(qreal); |