general request about setWindowIcon(QIcon::fromTheme())

René J.V. Bertin rjvbertin at gmail.com
Fri Jan 15 11:48:03 UTC 2016


Hi,

A bit of a general request about the use of setWindowIcon( QIcon::fromTheme(...) ) :
there are platforms on which QIcon::fromTheme() will basically 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 (I see this was done for KDevelop), chances are that at least some of the targets of the setWindowIcon() call have inherited the application on the that platform.

I think it's better to preserve that icon rather than replace it with an empty icon, so I'm adding local distribution patches  (for MacPorts) that provide 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; it's probably best to add an explicit fallback systematically.

I'm in the process of updating my patch for kdevplatform because a lot of the calls have been changed in a recent commit.
I could file a RR when it's complete (as well as one for KDevelop), but I'd also appreciate if you could simply add the explicit fallback in the next round of updates you're applying to this particular aspect. Provided of course people agree with the approach ...

Thanks,
René


More information about the KDevelop-devel mailing list