[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: setInstance() question
From:       Anatoli Gorchetchnikov <anatoli () cns ! bu ! edu>
Date:       2001-12-13 19:11:03
[Download RAW message or body]

Is this fix for 3 only, or for 2_2_BRANCH also?

On Monday 10 December 2001 17:42, Simon Hausmann wrote:
> On Sat, Nov 24, 2001 at 12:50:03PM -0500, Anatoli Gorchetchnikov wrote:
> > > > > On loading KPart with plugin, if I have plugin factory and use
> > > > > setInstance() call in plugin constructor it sets it to plugin
> > > > > factory instance as I want it to. But after that the part gets
> > > > > initialized, and call of setInstance() there not only sets it for
> > > > > the part, but also resets it for plugin, so now plugin->instance()
> > > > > returns part's instance.
> > > > > Is it a bug or a feature? If feature, than what's the reason behind
> > > > > it?
> > > >
> > > > It was a bug fix, actually.  I needed Plugins to do a lot more work
> > > > in finding out their XML so that XML-GUI rebuilding would work
> > > > better.
> > > >
> > > > Can you send me your code?  Perhaps we can find a way for both the
> > > > toolbar editor and your app to get along :-)
> > >
> > > But forcing a KInstance object from outside on the plugin sounds
> > > conceptually wrong to me. An instance belongs to the component,
> >
> > I second this. As for my app I added instance to plugin factory and
> > access it directly from plugin to work around the problem for now.
>
> I fixed that behaviour now. A plugin's instance won't get overriden
> anymore now.
>
> The xmlgui file thing I solved by re-implementing xmlFile and
> localXMLFile in KParts::Plugin and changed them to return the
> absolute paths (constructed using the right parent instance name) .
>
> I gave it a quick shot with the validator plugin in konq with the
> toolbar editor and it works for me (like adding the 'css validate'
> action to the plugin's toolbar and pressing 'ok' adds the action
> correctly) .
>
> Simon
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic