Remove unused viewerFont() method

Change-Id: I3da752d7f96162b7cd10e74667a6a3665cb12e14
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2021-01-15 10:55:02 +01:00
parent 0fe8089214
commit 700da528b8
9 changed files with 0 additions and 32 deletions

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {

View File

@@ -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);

View File

@@ -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;

View File

@@ -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();

View File

@@ -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;