diff --git a/src/plugins/help/helpviewer.h b/src/plugins/help/helpviewer.h index 4e0a7f7554b..3753300d2fb 100644 --- a/src/plugins/help/helpviewer.h +++ b/src/plugins/help/helpviewer.h @@ -51,7 +51,6 @@ public: explicit HelpViewer(QWidget *parent = nullptr); ~HelpViewer() override; - virtual QFont viewerFont() const = 0; virtual void setViewerFont(const QFont &font) = 0; virtual void setScale(qreal scale) = 0; diff --git a/src/plugins/help/litehtmlhelpviewer.cpp b/src/plugins/help/litehtmlhelpviewer.cpp index 30db13f5f26..44fda661076 100644 --- a/src/plugins/help/litehtmlhelpviewer.cpp +++ b/src/plugins/help/litehtmlhelpviewer.cpp @@ -89,11 +89,6 @@ LiteHtmlHelpViewer::LiteHtmlHelpViewer(QWidget *parent) LiteHtmlHelpViewer::~LiteHtmlHelpViewer() = default; -QFont LiteHtmlHelpViewer::viewerFont() const -{ - return m_viewer->defaultFont(); -} - void LiteHtmlHelpViewer::setViewerFont(const QFont &newFont) { m_viewer->setDefaultFont(newFont); diff --git a/src/plugins/help/litehtmlhelpviewer.h b/src/plugins/help/litehtmlhelpviewer.h index 99b1c723fe2..b287f215600 100644 --- a/src/plugins/help/litehtmlhelpviewer.h +++ b/src/plugins/help/litehtmlhelpviewer.h @@ -45,7 +45,6 @@ public: explicit LiteHtmlHelpViewer(QWidget *parent = nullptr); ~LiteHtmlHelpViewer() override; - QFont viewerFont() const override; void setViewerFont(const QFont &font) override; void setScale(qreal scale) override; diff --git a/src/plugins/help/macwebkithelpviewer.h b/src/plugins/help/macwebkithelpviewer.h index 98955cb070a..f6b2d9424d3 100644 --- a/src/plugins/help/macwebkithelpviewer.h +++ b/src/plugins/help/macwebkithelpviewer.h @@ -70,7 +70,6 @@ public: explicit MacWebKitHelpViewer(QWidget *parent = nullptr); ~MacWebKitHelpViewer() override; - QFont viewerFont() const override; void setViewerFont(const QFont &font) override; void setScale(qreal scale) override; diff --git a/src/plugins/help/macwebkithelpviewer.mm b/src/plugins/help/macwebkithelpviewer.mm index 05433328137..1cb2aa2596d 100644 --- a/src/plugins/help/macwebkithelpviewer.mm +++ b/src/plugins/help/macwebkithelpviewer.mm @@ -534,16 +534,6 @@ MacWebKitHelpViewer::~MacWebKitHelpViewer() } -QFont MacWebKitHelpViewer::viewerFont() const -{ - @autoreleasepool { - WebPreferences *preferences = m_widget->webView().preferences; - QString family = QString::fromNSString([preferences standardFontFamily]); - int size = [preferences defaultFontSize]; - return QFont(family, size); - } -} - void MacWebKitHelpViewer::setViewerFont(const QFont &font) { @autoreleasepool { diff --git a/src/plugins/help/textbrowserhelpviewer.cpp b/src/plugins/help/textbrowserhelpviewer.cpp index e5e6db26b99..e5188c1d25b 100644 --- a/src/plugins/help/textbrowserhelpviewer.cpp +++ b/src/plugins/help/textbrowserhelpviewer.cpp @@ -75,11 +75,6 @@ TextBrowserHelpViewer::TextBrowserHelpViewer(QWidget *parent) TextBrowserHelpViewer::~TextBrowserHelpViewer() = default; -QFont TextBrowserHelpViewer::viewerFont() const -{ - return m_textBrowser->font(); -} - void TextBrowserHelpViewer::setViewerFont(const QFont &newFont) { setFontAndScale(newFont, LocalHelpManager::fontZoom() / 100.0); diff --git a/src/plugins/help/textbrowserhelpviewer.h b/src/plugins/help/textbrowserhelpviewer.h index 60336635d19..ecdf3effbcf 100644 --- a/src/plugins/help/textbrowserhelpviewer.h +++ b/src/plugins/help/textbrowserhelpviewer.h @@ -43,7 +43,6 @@ public: explicit TextBrowserHelpViewer(QWidget *parent = nullptr); ~TextBrowserHelpViewer() override; - QFont viewerFont() const override; void setViewerFont(const QFont &font) override; void setScale(qreal scale) override; diff --git a/src/plugins/help/webenginehelpviewer.cpp b/src/plugins/help/webenginehelpviewer.cpp index 3766e551620..32c780113c3 100644 --- a/src/plugins/help/webenginehelpviewer.cpp +++ b/src/plugins/help/webenginehelpviewer.cpp @@ -159,13 +159,6 @@ WebEngineHelpViewer::WebEngineHelpViewer(QWidget *parent) : #endif } -QFont WebEngineHelpViewer::viewerFont() const -{ - QWebEngineSettings *webSettings = m_widget->settings(); - return QFont(webSettings->fontFamily(QWebEngineSettings::StandardFont), - webSettings->fontSize(QWebEngineSettings::DefaultFontSize)); -} - void WebEngineHelpViewer::setViewerFont(const QFont &font) { QWebEngineSettings *webSettings = m_widget->settings(); diff --git a/src/plugins/help/webenginehelpviewer.h b/src/plugins/help/webenginehelpviewer.h index 1869ac67027..aafb9a08c77 100644 --- a/src/plugins/help/webenginehelpviewer.h +++ b/src/plugins/help/webenginehelpviewer.h @@ -82,7 +82,6 @@ class WebEngineHelpViewer : public HelpViewer public: explicit WebEngineHelpViewer(QWidget *parent = nullptr); - QFont viewerFont() const override; void setViewerFont(const QFont &font) override; void setScale(qreal scale) override; QString title() const override;