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
......@@ -248,8 +248,6 @@ void CentralWidget::setLastShownPages()
}
setSource(url);
}
updateBrowserFont();
}
bool CentralWidget::hasSelection() const
......@@ -407,24 +405,6 @@ void CentralWidget::setSourceInNewTab(const QUrl &url)
tabWidget->setCurrentIndex(tabWidget->addTab(viewer,
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();
}
......@@ -612,36 +592,6 @@ bool CentralWidget::eventFilter(QObject *object, QEvent *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 incremental)
{
......
......@@ -85,7 +85,7 @@ public:
void activateTab(bool onlyHelpViewer = false);
bool find(const QString &txt, QTextDocument::FindFlags findFlags, bool incremental);
void setLastShownPages();
static CentralWidget *instance();
public slots:
......@@ -98,7 +98,6 @@ public slots:
void print();
void pageSetup();
void printPreview();
void updateBrowserFont();
void setSource(const QUrl &url);
void setSourceInNewTab(const QUrl &url);
HelpViewer *newEmptyTab();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment