Favicon stuff

This commit is contained in:
Fredrik Johansson
2018-12-29 11:40:46 +01:00
committed by wmayer
parent 724b565669
commit f03fe1ce91
2 changed files with 10 additions and 2 deletions

View File

@@ -105,7 +105,7 @@ public:
{
if (info.navigationType() == QWebEngineUrlRequestInfo::NavigationTypeLink) {
// invoke thread safe.
QMetaObject::invokeMethod(m_parent, "onLinkClicked",
QMetaObject::invokeMethod(m_parent, "urlFilter",
Q_ARG(QUrl, info.requestUrl()));
}
@@ -346,6 +346,9 @@ BrowserView::BrowserView(QWidget* parent)
interceptLinks = new WebEngineUrlRequestInterceptor(this);
profile->setRequestInterceptor(interceptLinks);
view->settings()->setAttribute(QWebEngineSettings::AutoLoadIconsForPage, true);
#endif
view->setAttribute(Qt::WA_OpaquePaintEvent, true);
@@ -386,7 +389,11 @@ BrowserView::~BrowserView()
delete view;
}
#ifdef QTWEBENGINE
void BrowserView::urlFilter(const QUrl &url)
#else
void BrowserView::onLinkClicked (const QUrl & url)
#endif
{
QString scheme = url.scheme();
QString host = url.host();