Do not hard code font sizes or names

Also, avoid constructing a font in the first place. This might help
for the (original) bug 198294, where Plasma::Theme::font() crashes
in widget creation.

CCBUG: 198294

svn path=/trunk/KDE/kdelibs/; revision=1143197
This commit is contained in:
Christoph Feck 2010-06-26 20:55:52 +00:00
parent d4016c881f
commit 9699d16a19

View File

@ -756,7 +756,7 @@ QFont Theme::font(FontRole role) const
case DesktopFont: case DesktopFont:
{ {
KConfigGroup cg(KGlobal::config(), "General"); KConfigGroup cg(KGlobal::config(), "General");
return cg.readEntry("desktopFont", QFont("Sans Serif", 10)); return cg.readEntry("desktopFont", d->generalFont);
} }
break; break;
case DefaultFont: case DefaultFont: