KApplication::icon & friends

Benjamin Meyer ben at meyerhome.net
Fri Oct 14 16:15:20 BST 2005

On Friday 14 October 2005 8:19 am, David Faure wrote:
> On Friday 14 October 2005 14:57, Benjamin Meyer wrote:
> > Attached is a patch to migrate away from KApplication storing the
> > application icon's sense QApplication now does that.
> s/sense/since/ :)
> Looks ok to me in general, but small details raise questions:
> Could the code in parseCommandLine be changed to only load the
> instanceName() icon if no -icon was specified? Currently it would load
> both one after the other, which seems like a waste of time.

Agreed, see below patch

> The code in the eventfilter for QEvent::Show looks a bit strange;
> I guess it's for the case where parseCommandLine wasn't called?
> Can this actually happen? If so, a boolean ("first show event")
> might be enough to know if we need to call setWindowIcon.
> Or if we always set an icon, w->windowIcon().isNull() is enough actually.
> In any case I don't see the need to keep the static QPixmap* ic.

Yup, was looking at that a moment ago.  That whole block of code isn't needed 
at all now (removed in the new patch) because widgets will grab the icon from 
qapplication.  Elsewhere in kde where KWin::setIcons() is called can be 
removed now too.

> > Along the same lines do we want to remove the mini-icon command line
> > option? In the desktop file the miniicon=bla has been deprecated for a
> > while.
> Yes, I don't think mini-icon is of any use anymore, this is a KDE-1.x
> thing...

Removed from kapplication in the patch, I will remove from kcmdlineargs too 
after this is done.

A new kapplication patch is attached

-Benjamin Meyer

aka icefox
Public Key: http://www.icefox.net/public_key.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdecore.diff
Type: text/x-diff
Size: 6621 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051014/545752e8/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051014/545752e8/attachment.sig>

More information about the kde-core-devel mailing list