[KDE/Mac] Review Request 126757: preserve existing windowIcons via QIcon::fromTheme's fallback

Aleix Pol Gonzalez aleixpol at kde.org
Fri Jan 15 16:01:36 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126757/#review91154
-----------------------------------------------------------


Ship it!




Ship It!

- Aleix Pol Gonzalez


On Jan. 15, 2016, 4:30 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126757/
> -----------------------------------------------------------
> 
> (Updated Jan. 15, 2016, 4:30 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X and KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> There are platforms on which `QIcon::fromTheme()` will almost always return the fallback icon (empty by default) because icon themes are not supported "out of the box" by Qt.
> If however the application was endowed with an icon at build time, chances are that at least some of the targets of the `setWindowIcon()` call have inherited the application on the that platform.
> 
> I propose to preserve that icon rather than replace it with an empty icon when a lookup-from-theme fails, by providing an explicit fallback to all those `QIcon::fromTheme()` calls:
> 
> `setWindowIcon( QIcon::fromTheme(name, windowIcon()) )`
> 
> I haven't tried to verify to what extent this indeed has an effect for all calls. I think however that it's probably best to add this explicit fallback systematically.
> 
> 
> Diffs
> -----
> 
>   debugger/breakpoint/breakpointwidget.cpp df8851e 
>   debugger/framestack/framestackwidget.cpp 04bf8da 
>   debugger/variable/variablewidget.cpp 0bd5ab8 
>   documentation/documentationview.cpp 216ee32 
>   plugins/classbrowser/classwidget.cpp 4a8db5c 
>   plugins/contextbrowser/contextbrowserview.cpp d1dba72 
>   plugins/documentview/kdevdocumentview.cpp 3a32636 
>   plugins/externalscript/externalscriptview.cpp a7d2e7a 
>   plugins/filemanager/filemanager.cpp 1afe763 
>   plugins/grepview/grepoutputview.cpp ab991ce 
>   plugins/konsole/kdevkonsoleview.cpp de4445e 
>   plugins/outlineview/outlinewidget.cpp 8a49cd6 
>   plugins/problemreporter/problemsview.cpp e4fd505 
>   plugins/projectmanagerview/projectmanagerview.cpp fd8bc02 
>   plugins/testview/testview.cpp 12a9a8b 
>   plugins/vcschangesview/vcschangesview.cpp 5d9b26b 
> 
> Diff: https://git.reviewboard.kde.org/r/126757/diff/
> 
> 
> Testing
> -------
> 
> On OS X 10.9.5 and Kubuntu 14.04, both with Qt 5.5.1 and KF5 Frameworks 5.17.0 installed into /opt/local .
> 
> The patch has no noticeable effect on my Linux system where `QIcon::fromTheme()` works normally. On OS S, KDevelop will appear with a default application icon in the Dock and App Switcher when this patch isn't applied (and the plugins from the `frameworkintegration` framework aren't loaded).
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20160115/5046b526/attachment-0001.html>


More information about the kde-mac mailing list