--------------Boundary-00=_FDAPAWK1Z6KHAIMCDBTS Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit On Monday 29 October 2001 09:40 am, TAnGorN (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 is a bug-fix that creates it's own bug, it appears. Can you try the following patch on your copy of kparts? I'm not running 2.2 anymore so I can't easily test it there. In addition to your own app, can you please test Konqueror by changing the toolbar a number of times and make sure that the Tools menu updates correctly? -- Kurt Granroth | http://www.granroth.org KDE Developer/Evangelist | SuSE Labs Open Source Developer granroth@kde.org | granroth@suse.com KDE -- Conquer Your Desktop --------------Boundary-00=_FDAPAWK1Z6KHAIMCDBTS Content-Type: text/x-diff; charset="iso-8859-1"; name="plugin.diff" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="plugin.diff" Index: plugin.cpp =================================================================== RCS file: /home/kde/kdelibs/kparts/plugin.cpp,v retrieving revision 1.32 diff -b -u -u -r1.32 plugin.cpp --- plugin.cpp 2001/07/11 18:23:59 1.32 +++ plugin.cpp 2001/11/12 18:34:32 @@ -128,7 +128,7 @@ if ( plugin ) { - if ( instance ) + if ( instance && !plugin->instance() ) plugin->setInstance( (KInstance*)instance ); plugin->setXMLFile( (*pIt).m_relXMLFileName, false, false ); plugin->setDOMDocument( (*pIt).m_document ); --------------Boundary-00=_FDAPAWK1Z6KHAIMCDBTS-- >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<