From c666ab062f290245869c80f86f05cef50833dfd0 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Sat, 26 Mar 2022 10:43:37 +0100 Subject: [PATCH] link hover --- src/librssguard/gui/litehtml/litehtmlviewer.cpp | 4 +++- src/librssguard/gui/webengine/webengineviewer.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/librssguard/gui/litehtml/litehtmlviewer.cpp b/src/librssguard/gui/litehtml/litehtmlviewer.cpp index c582a52e1..36866bb03 100755 --- a/src/librssguard/gui/litehtml/litehtmlviewer.cpp +++ b/src/librssguard/gui/litehtml/litehtmlviewer.cpp @@ -27,6 +27,9 @@ void LiteHtmlViewer::bindToBrowser(WebBrowser* browser) { browser->m_actionStop = new QAction(this); connect(this, &LiteHtmlViewer::zoomFactorChanged, browser, &WebBrowser::onZoomFactorChanged); + connect(this, &LiteHtmlViewer::linkHighlighted, browser, [browser](const QUrl& url) { + browser->onLinkHovered(url.toString()); + }); // TODO: změna ikon, změna stavu akcí. @@ -39,7 +42,6 @@ void LiteHtmlViewer::bindToBrowser(WebBrowser* browser) { connect(this, &WebEngineViewer::iconChanged, browser, &WebBrowser::onIconChanged); connect(page(), &WebEnginePage::windowCloseRequested, browser, &WebBrowser::closeRequested); - connect(page(), &WebEnginePage::linkHovered, browser, &WebBrowser::onLinkHovered); */ } diff --git a/src/librssguard/gui/webengine/webengineviewer.cpp b/src/librssguard/gui/webengine/webengineviewer.cpp index 1fbb6d79c..d8d42e996 100644 --- a/src/librssguard/gui/webengine/webengineviewer.cpp +++ b/src/librssguard/gui/webengine/webengineviewer.cpp @@ -286,6 +286,7 @@ void WebEngineViewer::bindToBrowser(WebBrowser* browser) { browser->m_actionReload = pageAction(QWebEnginePage::WebAction::Reload); browser->m_actionStop = pageAction(QWebEnginePage::WebAction::Stop); + connect(this, &WebEngineViewer::zoomFactorChanged, browser, &WebBrowser::onZoomFactorChanged); connect(this, &WebEngineViewer::urlChanged, browser, &WebBrowser::updateUrl); connect(this, &WebEngineViewer::loadStarted, browser, &WebBrowser::onLoadingStarted); connect(this, &WebEngineViewer::loadProgress, browser, &WebBrowser::onLoadingProgress);