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

René J.V. Bertin rjvbertin at gmail.com
Fri Jan 15 16:13:50 UTC 2016


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

(Updated Jan. 15, 2016, 4:13 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Software on Mac OS X and KDevelop.


Changes
-------

Submitted with commit 50cda3f8071b53105f037b19b4bec92ad3076f9c by René J.V. Bertin to branch master.


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/845ee729/attachment.html>


More information about the kde-mac mailing list