Review Request 126759: Summary:preserve existing windowIcons via QIcon::fromTheme's fallback

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


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

(Updated Jan. 15, 2016, 5:19 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 ba2b190354c89230fce6e0e30caf1041f1be1d6f by René J.V. Bertin to branch master.


Repository: kdevelop


Description
-------

See https://git.reviewboard.kde.org/r/126757/

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
-----

  debuggers/gdb/disassemblewidget.cpp f75ef83 
  debuggers/gdb/gdboutputwidget.cpp e7a7039 
  debuggers/gdb/memviewdlg.cpp b9ff3c1 
  utils/okteta/oktetatoolviewfactory.cpp 702deda 

Diff: https://git.reviewboard.kde.org/r/126759/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/kdevelop-devel/attachments/20160115/ed05dfcf/attachment.html>


More information about the KDevelop-devel mailing list