Multiple main window support, and action-collections

Andreas Pakulat apaku at gmx.de
Sun Jul 26 21:38:06 UTC 2009


On 26.07.09 21:52:50, David Nolden wrote:
> Am Sonntag 26 Juli 2009 20:26:34 schrieb Andreas Pakulat:
> > One thing I'm not sure right now is wether a given KAction can be added
> > to multiple clients/action collections. IIRC KActionCollection does a
> > setParent (don't have the sources at hand), so we'd need need to "clone"
> > actions...
> No they cannot. That's exactly the problem I'm talking about. There is no way 
> around creating new actions for each mainwindow as it seems. That mainwindow 
> argument is not exactly needed while creating those actions, but I think it's 
> consistent giving it when a method is called "createActionsForMainWindow".

Looking at our track record with xmlgui, the fact that its basically
unmaintained and seldomly gets bugs fixed - let alone features
implemented - maybe its time to simply drop it? And I am serious on this.

> So what could be realistically done is adding a function 
> "createActionsForMainWindow(Sublime::MainWindow* window, QString& xmlFile, 
> KActionCollection& actions)" so that the KXMLGUIClient stuff can be handled in 
> background.

Yeah, might be the best option.

> But whether that would work for all usecases I don't know, so 
> maybe it could be created as an overloaded function, where the default 
> implementation of the other one does the standard stuff with the 
> KXMLGUIClient.

Hmm, I don't quite follow you on this.

Andreas

-- 
You will be a winner today.  Pick a fight with a four-year-old.




More information about the KDevelop-devel mailing list