KApplication::cut()....

Matt Rogers mattr at kde.org
Fri Sep 23 13:13:16 BST 2005


On Friday 23 September 2005 07:06 am, Benjamin Meyer wrote:
> On Thursday 22 September 2005 9:54 am, Simon Hausmann wrote:
> > On Thursday 22 September 2005 15:41, Scott Wheeler wrote:
> > > On Thursday 22 September 2005 14:40, Benjamin Meyer wrote:
> > > > Yah they looked like good ideas and was a little surprised that I
> > > > couldn't find anything looking through several of the modules.  What
> > > > do you think of moving them to KMainWindow?
> > >
> > > I'm not really sure that they belong in KMainWindow since they're not
> > > window specific.  They're tied to focusWidget() which is a feature of
> > > QApplication.
> > >
> > > Put the other way -- why would you like to see them in KMainWindow?
> > >
> > > (I also noticed on doing a grep that at least DataKiosk and KTorrent
> > > are using these methods as well.)
> >
> > Maybe we don't need those slots as publically accessible functions at all
> > and instead just need to provide methods that do what you already
> > pasted as the common way of using them:
> >
> > 	KStdAction::cut(kapp, SLOT(cut()), actionCollection);
> >
> > Perhaps something like:
> >
> > KMainWindow::createAutomaticCutAction(KActionCollection *collection =
> > actionCollection())
> >
> > The slot itself may not be related to the mainwindow, but the action is
> > bound to it after all. (strictly speaking only to the actioncollection
> > but hey, we're trying to simplify the common case :)
> >
> > Simon
>
> Attached is a patch to move cut,copy,paste,clear, and selectAll to
> KMainWindow.  Any objections to commiting?
>

Yes, i object. You didn't take into account any of the feedback from Simon and 
you don't justify why you they should be moved in to KMainWindow. I agree 
with Scott that things like cut, copy, and paste are not window specific but 
application specific so they shouldn't be in KMainWindow.

-- 
Matt




More information about the kde-core-devel mailing list