StatusBar in KMainWindow

Benjamin Meyer ben at meyerhome.net
Thu Mar 13 18:36:26 GMT 2003


On Thursday 13 March 2003 1:08 pm, David Faure wrote:
> On Thursday 13 March 2003 19:01, Benjamin Meyer wrote:
> > On Thursday 13 March 2003 12:47 pm, Simon Hausmann wrote:
> > > On Thu, Mar 13, 2003 at 12:03:21PM -0500, Benjamin Meyer wrote:
> > > > On Thursday 13 March 2003 11:28 am, Simon Hausmann wrote:
> > > > > On Thu, Mar 13, 2003 at 10:00:52AM -0500, Benjamin Meyer wrote:
> > > > > > Attached is the new diff which has the new function that is used
> > > > > > to create the Action.
> > > > >
> > > > > I like that approach, for its consistency with the toolbar
> > > > > handling.
> > > > >
> > > > > Three minor things though:
> > > > >
> > > > > 1) The set method should take a bool and it should also handle the
> > > > >    case where it's called with false IMHO. Hmm, not terribly easy
> > > > >    though, maybe this should be done simliar to the toolbar
> > > > >    handling, except for using an actionlist instead of a whole
> > > > >    guiclient component.
> > > >
> > > > Can I simply call delete on the KAction?  Will everything be ok?
> > >
> > > Nope, that would make the xmlgui engine end up with a dangling
> > > pointer and leave the action plugged in the GUI.
> >
> > Would also calling this be enough?
> > actionCollection()->remove(action);
>
> No, action->unplugAll(). See latest commit to kaction.h for docu ;)
>
> > The KActionCollection::remove function is not documented.
>
> You don't ever need to call it. ~KAction does it.

After talking on irc I have removed the bool again because we couldn't think 
of a reason why you would ever call false, gave the functions better names, 
and improved the comment a little bit to make the function a little bit more 
clear.  Unless anyone objects I will commit to cvs. (and once it is in then 
the multi-hour fun of going through apps and letting them use it can begin!)

-Benjamin Meyer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: text/x-diff
Size: 3655 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030313/703410f9/attachment.diff>


More information about the kde-core-devel mailing list