[Qgis-developer] odd calls to classFactory for python plugins

Borys Jurgiel borysiasty at aster.pl
Mon Mar 16 11:50:53 EDT 2009


Monday 16 March 2009 16:39:38 Martin Dobias napisał(a):
> On Fri, Mar 13, 2009 at 6:43 PM, Barry Rowlingson
> <b.rowlingson at lancaster.ac.uk> wrote:
> >
> > When not enabled, I saw a message that the classFactory __init__ had
> > been called. The print didn't happen immediately, it seems to wait for
> > an event (menu item, canvas redraw).
> >
> > On enabling the plugin from the manager and OK'ing, I get a
> > classFactory __init__ and a .initGui as expected.
> >
> >  Some of us on #irc tracked down plugin loading to a few places, but
> > we got a bit lost and it's Friday evening... Anyone else want to
> > figure this out? We don't think classFactory should be called for
> > non-loaded plugins (even though in this case it must be failing for
> > some reason since otherwise the initGui method would run --
> > QgsPythonUtilsImpl::startPlugin runs them both in quick succession.
> 
> AFAIK this loading on startup is done by plugin installer (after
> downloading the list of plugins from repositories). Maybe Borys will
> know more about it :)

Yes, the Installer loads them all in order to check them out. For example, if 
one of installed plugins has unfulfilled dependencies, the installer is that one 
responsible for an user-friendly explanation. Probably we should move this 
functionality to the core qgis (you know, add some explanation to the present 
error messages). 

I'll look at this issue. If it may be the reason of the instability, I can 
disable that functionality for now. I'm in a little hurry now, so I'll read this 
topic more carefully tomorrow (or on the HackFest;)
B.


More information about the Qgis-developer mailing list