Origin: upstream, 2bb3e383c12f46f0ad599386edc51972effc5930
From: "R.J.V. Bertin" <rjvbertin@gmail.com>
Date: Wed, 21 Feb 2018 23:15:24 +0100
Subject: migrate away from KGlobalSettings::*Font() methods

Differential revision: https://phabricator.kde.org/D10725
---
 qt5/style/qtcurve.cpp     | 2 +-
 qt5/style/qtcurve_api.cpp | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/qt5/style/qtcurve.cpp b/qt5/style/qtcurve.cpp
index 3b0a4e78..21a879aa 100644
--- a/qt5/style/qtcurve.cpp
+++ b/qt5/style/qtcurve.cpp
@@ -4311,7 +4311,7 @@ void Style::applyKdeSettings(bool pal)
         QApplication::setFont(mnu, "QMenuBar");
         QApplication::setFont(mnu, "QMenu");
         QApplication::setFont(mnu, "KPopupTitle");
-        QApplication::setFont(KGlobalSettings::toolBarFont(), "QToolBar");
+        QApplication::setFont(g.readEntry("toolBarFont", QApplication::font()), "QToolBar");
     }
 }
 #endif
diff --git a/qt5/style/qtcurve_api.cpp b/qt5/style/qtcurve_api.cpp
index 783dc541..442d0072 100644
--- a/qt5/style/qtcurve_api.cpp
+++ b/qt5/style/qtcurve_api.cpp
@@ -2570,7 +2570,7 @@ Style::drawControl(ControlElement element, const QStyleOption *option,
                 }
 #ifdef QTC_QT5_ENABLE_KDE
                 if (opts.dwtSettings & DWT_FONT_AS_PER_TITLEBAR) {
-                    painter->setFont(KGlobalSettings::windowTitleFont());
+                    painter->setFont(QFontDatabase::systemFont(QFontDatabase::TitleFont));
                 }
 #endif
                 QFontMetrics fm(painter->fontMetrics());
@@ -5560,7 +5560,7 @@ void Style::drawComplexControl(ComplexControl control, const QStyleOptionComplex
                 font.setBold(true);
                 painter->setFont(font);
 #else
-                painter->setFont(KGlobalSettings::windowTitleFont());
+                painter->setFont(QFontDatabase::systemFont(QFontDatabase::TitleFont));
 #endif

                 QFontMetrics fm(painter->fontMetrics());
