UI-less kdevplatform

Alexander Dymo dymo at ukrpost.ua
Thu Aug 7 15:58:04 UTC 2008


On Thursday 07 August 2008 18:23:46 Aleix wrote:
> The other solution would be to have a ui less shell, but I think it would
> be a bit of a mess since we would need then to have the double of plugins
> (if i am correct), one for each shell which is not a good idea either.
Yeah, still not good enough.

> But anyway my idea was to leverage the more possible the shell when working
> without UI.
> > I think the easiest way would be to just run the application without
> > showing
> > the mainwindow.
> Shouldn't this be the last chance?

Maybe not. Let me elaborate. UiController doesn't give any guarantees for 
plugins (and shell) that the mainwindow exists. 
For example, IUiController::activeMainWindow() can return 0 and that's 
documented. 
So what we need to do is to keep using UiController that we have and simply do 
not create mainwindow. I haven't looked deep enough into the code to 
understand what can break but ideally nothing should break under this 
situation. So maybe your flag needs to be used in UiControllerPrivate 
constructor to avoid creating default main window?

Other than that, UiController itself is quite cheap (it just initializes area 
and mainwindow). Area is cheap as well, so if we don't create mainwindow, 
we'll have fast enough cmdline shell.





More information about the KDevelop-devel mailing list