[kdev 4] isn't this dangerous?
Andreas Pakulat
apaku at gmx.de
Fri Apr 20 17:17:38 UTC 2007
On 20.04.07 19:57:27, Andras Mantia wrote:
> On Friday 20 April 2007, Andreas Pakulat wrote:
> > Because the instances are not created by us. We can only give a
> > QObject to KServiceTypeTrader::createInstanceFromQuery as parent.
>
> Well, but shouldn't we do a dynamic_cast at least?
Well, if the dynamic_cast fails the plugin won't work and from the
plugin destructor I don't think we can abort the plugin creation (or can
we?).
Somehow I feel we should provide our own factory implementation for
kdevelop plugins, which checks the QObject* parameter using dynamic_cast
and returns 0 if its not Core/ICore.
Andreas
--
Is that really YOU that is reading this?
More information about the KDevelop-devel
mailing list