[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: setInstance() question
From: Kurt Granroth <granroth () suse ! com>
Date: 2001-11-12 18:36:51
[Download RAW message or body]
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
["plugin.diff" (text/x-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 );
>> 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