Review Request 112279: Use qApp->setFont so we magically use QGuiApplication or QApplication

Kevin Ottens ervin at kde.org
Mon Aug 26 07:01:20 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112279/#review38577
-----------------------------------------------------------



staging/frameworkintegration/src/platformtheme/kfontsettingsdata.cpp
<http://git.reviewboard.kde.org/r/112279/#comment28524>

    It's much less dynamic than you make it sound. It's a macro which static casts to QApplication. And setFont being static on both classes there's no chance for polymorphism... so it's always the QApplication variant being called here.
    
    Looking at QApplication::setFont() it chains properly to QGuiApplication, but for the rest of the implementation there's a part I would suspect to create troubles in case of a QGuiApplication but I'm not sure (seems to read QApplicationPrivate fields without checking if we have a full fledged QApplication).
    
    Has this change been tested with an application having only a QGuiApplication?


- Kevin Ottens


On Aug. 25, 2013, 10:42 p.m., Àlex Fiestas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112279/
> -----------------------------------------------------------
> 
> (Updated Aug. 25, 2013, 10:42 p.m.)
> 
> 
> Review request for KDE Frameworks and Kevin Ottens.
> 
> 
> Description
> -------
> 
> Use QApplication::setFont or QGuiApplication::setFont depending on what qApp pointer is.
> 
> This makes font change events be propagated to widgets.
> 
> 
> Diffs
> -----
> 
>   staging/frameworkintegration/src/platformtheme/kfontsettingsdata.cpp 70c1d26 
> 
> Diff: http://git.reviewboard.kde.org/r/112279/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Àlex Fiestas
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130826/f56f39fb/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list