Skip to content
Snippets Groups Projects
Commit 549ad43a authored by Patrick Star's avatar Patrick Star
Browse files

Fixes: - nothing

Task:     - none
RevBy:    - Thorbjoern
AutoTest: - compile
Details:  - remove font settings stuff, since we overwrite it in coreplugin
parent e4e26a91
No related branches found
No related tags found
No related merge requests found
...@@ -248,8 +248,6 @@ void CentralWidget::setLastShownPages() ...@@ -248,8 +248,6 @@ void CentralWidget::setLastShownPages()
} }
setSource(url); setSource(url);
} }
updateBrowserFont();
} }
bool CentralWidget::hasSelection() const bool CentralWidget::hasSelection() const
...@@ -407,24 +405,6 @@ void CentralWidget::setSourceInNewTab(const QUrl &url) ...@@ -407,24 +405,6 @@ void CentralWidget::setSourceInNewTab(const QUrl &url)
tabWidget->setCurrentIndex(tabWidget->addTab(viewer, tabWidget->setCurrentIndex(tabWidget->addTab(viewer,
quoteTabTitle(viewer->documentTitle()))); quoteTabTitle(viewer->documentTitle())));
#if defined(QT_NO_WEBKIT)
QFont font = qApp->font();
if (helpEngine->customValue(QLatin1String("useBrowserFont")).toBool())
font = qVariantValue<QFont>(helpEngine->customValue(QLatin1String("browserFont")));
viewer->setFont(font);
#else
QWebView* view = qobject_cast<QWebView*> (viewer);
if (view) {
QWebSettings* settings = QWebSettings::globalSettings();
int fontSize = settings->fontSize(QWebSettings::DefaultFontSize);
QString fontFamily = settings->fontFamily(QWebSettings::StandardFont);
settings = view->settings();
settings->setFontSize(QWebSettings::DefaultFontSize, fontSize);
settings->setFontFamily(QWebSettings::StandardFont, fontFamily);
}
#endif
connectSignals(); connectSignals();
} }
...@@ -612,36 +592,6 @@ bool CentralWidget::eventFilter(QObject *object, QEvent *e) ...@@ -612,36 +592,6 @@ bool CentralWidget::eventFilter(QObject *object, QEvent *e)
return QWidget::eventFilter(object, e); return QWidget::eventFilter(object, e);
} }
void CentralWidget::updateBrowserFont()
{
#if defined(QT_NO_WEBKIT)
QFont font = qApp->font();
if (helpEngine->customValue(QLatin1String("useBrowserFont")).toBool())
font = qVariantValue<QFont>(helpEngine->customValue(QLatin1String("browserFont")));
QWidget* widget = 0;
for (int i = 0; i < tabWidget->count(); ++i) {
widget = tabWidget->widget(i);
if (widget->font() != font)
widget->setFont(font);
}
#else
QWebSettings* settings = QWebSettings::globalSettings();
int fontSize = settings->fontSize(QWebSettings::DefaultFontSize);
QString fontFamily = settings->fontFamily(QWebSettings::StandardFont);
QWebView* widget = 0;
for (int i = 0; i < tabWidget->count(); ++i) {
widget = qobject_cast<QWebView*> (tabWidget->widget(i));
if (widget) {
settings = widget->settings();
settings->setFontSize(QWebSettings::DefaultFontSize, fontSize);
settings->setFontFamily(QWebSettings::StandardFont, fontFamily);
}
}
#endif
}
bool CentralWidget::find(const QString &txt, QTextDocument::FindFlags findFlags, bool CentralWidget::find(const QString &txt, QTextDocument::FindFlags findFlags,
bool incremental) bool incremental)
{ {
......
...@@ -85,7 +85,7 @@ public: ...@@ -85,7 +85,7 @@ public:
void activateTab(bool onlyHelpViewer = false); void activateTab(bool onlyHelpViewer = false);
bool find(const QString &txt, QTextDocument::FindFlags findFlags, bool incremental); bool find(const QString &txt, QTextDocument::FindFlags findFlags, bool incremental);
void setLastShownPages(); void setLastShownPages();
static CentralWidget *instance(); static CentralWidget *instance();
public slots: public slots:
...@@ -98,7 +98,6 @@ public slots: ...@@ -98,7 +98,6 @@ public slots:
void print(); void print();
void pageSetup(); void pageSetup();
void printPreview(); void printPreview();
void updateBrowserFont();
void setSource(const QUrl &url); void setSource(const QUrl &url);
void setSourceInNewTab(const QUrl &url); void setSourceInNewTab(const QUrl &url);
HelpViewer *newEmptyTab(); HelpViewer *newEmptyTab();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment