summaryrefslogtreecommitdiffstats
path: root/src/core/favicon_manager.h
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/core/favicon_manager.h
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/core/favicon_manager.h')
-rw-r--r--src/core/favicon_manager.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/favicon_manager.h b/src/core/favicon_manager.h
index dc702a0da..e351831c2 100644
--- a/src/core/favicon_manager.h
+++ b/src/core/favicon_manager.h
@@ -46,6 +46,7 @@
#include <QtCore/QObject>
#include <QtCore/QSize>
#include <QtCore/QUrl>
+#include <QtGui/QIcon>
#include "web_engine_settings.h"
@@ -85,7 +86,7 @@ class QWEBENGINE_EXPORT FaviconManager : public QObject {
public:
~FaviconManager();
- QIcon getIcon(const QUrl &) const;
+ QIcon getIcon(const QUrl &url = QUrl()) const;
FaviconInfo getFaviconInfo(const QUrl &) const;
QList<FaviconInfo> getFaviconInfoList(bool) const;
@@ -97,8 +98,12 @@ private:
void resetCandidates();
bool hasCandidate() const;
+ QUrl candidateIconUrl(bool touchIconsEnabled) const;
+ void generateCandidateIcon(bool touchIconsEnabled);
+
QMap<QUrl, FaviconInfo> m_faviconInfoMap;
- bool m_hasCandidate;
+ int m_candidateCount;
+ QIcon m_candidateIcon;
Q_DISABLE_COPY(FaviconManager)
Q_DECLARE_PRIVATE(FaviconManager)