----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/112277/#review38568 -----------------------------------------------------------
Ship it! Makes sense to me, good catch! - Aleix Pol Gonzalez On Aug. 25, 2013, 8:38 p.m., Àlex Fiestas wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/112277/ > ----------------------------------------------------------- > > (Updated Aug. 25, 2013, 8:38 p.m.) > > > Review request for KDE Frameworks and Kevin Ottens. > > > Description > ------- > > While writing tests for KFontSettingsData I found this deadlock: > http://paste.kde.org/p1fada663/ > > Shorter version of the deadlock by calling QFont::QFont in > KFontSettingsData::font() > http://paste.kde.org/pda7fc276/ > > Basically: > QApplicationPrivate::initializeWidgetFontHash > KFontSettingsData::font > QVariant magic, which calls QFont::QFont > (http://qt.gitorious.org/qt/qtbase/blobs/stable/src/gui/text/qfont.cpp#line677) > QFont::QFont > QGuiApplication::font > KFontSettingsData::font > QFont::QFont > QGuiApplication::font > And lock takes place > > So the patch simply avoids calling QFont::QFont by reusing the QFont we > already have (initialized with the default values) and using > QFont::fromString in case we have data to set to it. > > To reproduce simply set fonts in kdeglobals: > [General] > desktopFont=Ubuntu,9,-1,5,50,0,0,0,0,0 > fixed=Ubuntu Mono,10,-1,5,50,0,0,0,0,0 > font=Ubuntu,9,-1,5,50,0,0,0,0,0 > menuFont=Ubuntu,9,-1,5,50,0,0,0,0,0 > smallestReadableFont=Ubuntu,8,-1,5,50,0,0,0,0,0 > taskbarFont=Ubuntu,9,-1,5,50,0,0,0,0,0 > toolBarFont=Ubuntu,8,-1,5,50,0,0,0,0,0 > > and then execute QApplication. > > > Diffs > ----- > > staging/frameworkintegration/src/platformtheme/kfontsettingsdata.cpp > 70c1d26 > > Diff: http://git.reviewboard.kde.org/r/112277/diff/ > > > Testing > ------- > > Tested in different app's using qpa plus the kfontsettingsdata test I'm > writing. > > > Thanks, > > Àlex Fiestas > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel