extragear/sdk/kdevplatform

David Nolden zwabel at googlemail.com
Sun Jan 17 10:37:57 UTC 2010


Am Sonntag 17 Januar 2010 02:54:00 schrieb Andreas Pakulat:
> On 17.01.10 00:07:18, David Nolden wrote:
> > SVN commit 1075910 by zwabel:
> >
> > Add a "bool ICore::shuttingDown()" function that allows determining
> > whether we're shutting down in a clean way.
> 
> This is wrong. Public API should be added because its useful, not to
> workaround problems in the design of certain components. And this
> function is potentially dangerous even, as plugin authors start to use
> that in all places they want to protect, instead of implementing a
> proper cleanup function.
> 
> Please revert and either fix this properly (without such a crude hack)
> or live with the deadlock.

KDevelop consists of tens of different components, and they all may depend on 
each other. When one thing does something (for example the cpp parser), then 
it needs a _proper_ way to know whether the application is still in a well-
defined state, or whether it is shutting down.

IMO this has to be public API, because the shutdown process is a part of the 
application runtime as well. Until now every plugin that needed this 
information has implemented some ugly hack to detect the "shutting down" state 
(like for example CppLaguageSupport::self() == 0), but this one is the only 
real solution. Why do you think it is a hack?




More information about the KDevelop-devel mailing list