Commit ed60574f authored by Eugene Popov's avatar Eugene Popov Committed by Nate Graham
Browse files

Use default app font if there's no "font" entry

If the user didn't change default Plasma font, then the "font" entry will not be present in the ~/.config/kdeglobals and therefore font syncing will not work. With this patch, the default application font will be used in this case.

(cherry picked from commit 612dcd6f)
parent fc937324
...@@ -189,7 +189,7 @@ void SddmKcm::synchronizeSettings() ...@@ -189,7 +189,7 @@ void SddmKcm::synchronizeSettings()
// Syncing the font only works with SDDM >= 0.19, but will not have a negative effect with older versions // Syncing the font only works with SDDM >= 0.19, but will not have a negative effect with older versions
KConfig plasmaFontConfig(QStringLiteral("kdeglobals")); KConfig plasmaFontConfig(QStringLiteral("kdeglobals"));
KConfigGroup plasmaFontGroup(&plasmaFontConfig, "General"); KConfigGroup plasmaFontGroup(&plasmaFontConfig, "General");
QString plasmaFont = plasmaFontGroup.readEntry("font"); QString plasmaFont = plasmaFontGroup.readEntry("font", QApplication::font()toString());
// define paths // define paths
const QString fontconfigPath = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, QStringLiteral("fontconfig"), QStandardPaths::LocateDirectory); const QString fontconfigPath = QStandardPaths::locate(QStandardPaths::GenericConfigLocation, QStringLiteral("fontconfig"), QStandardPaths::LocateDirectory);
......
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