forked from qt-creator/qt-creator
Remove unused viewerFont() method
Change-Id: I3da752d7f96162b7cd10e74667a6a3665cb12e14 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -51,7 +51,6 @@ public:
|
|||||||
explicit HelpViewer(QWidget *parent = nullptr);
|
explicit HelpViewer(QWidget *parent = nullptr);
|
||||||
~HelpViewer() override;
|
~HelpViewer() override;
|
||||||
|
|
||||||
virtual QFont viewerFont() const = 0;
|
|
||||||
virtual void setViewerFont(const QFont &font) = 0;
|
virtual void setViewerFont(const QFont &font) = 0;
|
||||||
|
|
||||||
virtual void setScale(qreal scale) = 0;
|
virtual void setScale(qreal scale) = 0;
|
||||||
|
@@ -89,11 +89,6 @@ LiteHtmlHelpViewer::LiteHtmlHelpViewer(QWidget *parent)
|
|||||||
|
|
||||||
LiteHtmlHelpViewer::~LiteHtmlHelpViewer() = default;
|
LiteHtmlHelpViewer::~LiteHtmlHelpViewer() = default;
|
||||||
|
|
||||||
QFont LiteHtmlHelpViewer::viewerFont() const
|
|
||||||
{
|
|
||||||
return m_viewer->defaultFont();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LiteHtmlHelpViewer::setViewerFont(const QFont &newFont)
|
void LiteHtmlHelpViewer::setViewerFont(const QFont &newFont)
|
||||||
{
|
{
|
||||||
m_viewer->setDefaultFont(newFont);
|
m_viewer->setDefaultFont(newFont);
|
||||||
|
@@ -45,7 +45,6 @@ public:
|
|||||||
explicit LiteHtmlHelpViewer(QWidget *parent = nullptr);
|
explicit LiteHtmlHelpViewer(QWidget *parent = nullptr);
|
||||||
~LiteHtmlHelpViewer() override;
|
~LiteHtmlHelpViewer() override;
|
||||||
|
|
||||||
QFont viewerFont() const override;
|
|
||||||
void setViewerFont(const QFont &font) override;
|
void setViewerFont(const QFont &font) override;
|
||||||
|
|
||||||
void setScale(qreal scale) override;
|
void setScale(qreal scale) override;
|
||||||
|
@@ -70,7 +70,6 @@ public:
|
|||||||
explicit MacWebKitHelpViewer(QWidget *parent = nullptr);
|
explicit MacWebKitHelpViewer(QWidget *parent = nullptr);
|
||||||
~MacWebKitHelpViewer() override;
|
~MacWebKitHelpViewer() override;
|
||||||
|
|
||||||
QFont viewerFont() const override;
|
|
||||||
void setViewerFont(const QFont &font) override;
|
void setViewerFont(const QFont &font) override;
|
||||||
|
|
||||||
void setScale(qreal scale) override;
|
void setScale(qreal scale) override;
|
||||||
|
@@ -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)
|
void MacWebKitHelpViewer::setViewerFont(const QFont &font)
|
||||||
{
|
{
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
|
@@ -75,11 +75,6 @@ TextBrowserHelpViewer::TextBrowserHelpViewer(QWidget *parent)
|
|||||||
|
|
||||||
TextBrowserHelpViewer::~TextBrowserHelpViewer() = default;
|
TextBrowserHelpViewer::~TextBrowserHelpViewer() = default;
|
||||||
|
|
||||||
QFont TextBrowserHelpViewer::viewerFont() const
|
|
||||||
{
|
|
||||||
return m_textBrowser->font();
|
|
||||||
}
|
|
||||||
|
|
||||||
void TextBrowserHelpViewer::setViewerFont(const QFont &newFont)
|
void TextBrowserHelpViewer::setViewerFont(const QFont &newFont)
|
||||||
{
|
{
|
||||||
setFontAndScale(newFont, LocalHelpManager::fontZoom() / 100.0);
|
setFontAndScale(newFont, LocalHelpManager::fontZoom() / 100.0);
|
||||||
|
@@ -43,7 +43,6 @@ public:
|
|||||||
explicit TextBrowserHelpViewer(QWidget *parent = nullptr);
|
explicit TextBrowserHelpViewer(QWidget *parent = nullptr);
|
||||||
~TextBrowserHelpViewer() override;
|
~TextBrowserHelpViewer() override;
|
||||||
|
|
||||||
QFont viewerFont() const override;
|
|
||||||
void setViewerFont(const QFont &font) override;
|
void setViewerFont(const QFont &font) override;
|
||||||
|
|
||||||
void setScale(qreal scale) override;
|
void setScale(qreal scale) override;
|
||||||
|
@@ -159,13 +159,6 @@ WebEngineHelpViewer::WebEngineHelpViewer(QWidget *parent) :
|
|||||||
#endif
|
#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)
|
void WebEngineHelpViewer::setViewerFont(const QFont &font)
|
||||||
{
|
{
|
||||||
QWebEngineSettings *webSettings = m_widget->settings();
|
QWebEngineSettings *webSettings = m_widget->settings();
|
||||||
|
@@ -82,7 +82,6 @@ class WebEngineHelpViewer : public HelpViewer
|
|||||||
public:
|
public:
|
||||||
explicit WebEngineHelpViewer(QWidget *parent = nullptr);
|
explicit WebEngineHelpViewer(QWidget *parent = nullptr);
|
||||||
|
|
||||||
QFont viewerFont() const override;
|
|
||||||
void setViewerFont(const QFont &font) override;
|
void setViewerFont(const QFont &font) override;
|
||||||
void setScale(qreal scale) override;
|
void setScale(qreal scale) override;
|
||||||
QString title() const override;
|
QString title() const override;
|
||||||
|
Reference in New Issue
Block a user