Plugins 3 It's working :)
Patrick Julien
freak at codepimps.org
Mon Feb 16 23:08:06 CET 2004
On February 16, 2004 04:40 pm, Cyrille Berger wrote:
> Hello,
> So it's working fine now, except that to avoid the problem of static object
> that are not accessible from the plugin, I made the following change to
> kistilemediator.h :
Yes, we will change the singleton instance... we won't use this technique.
Stay tuned....
>
> extern QMutex e_m_mutex;
> extern KisTileMediatorSingleton* e_m_instance;
> extern Q_INT32 e_m_ref;
>
> class KisTileMediator {
> public:
> KisTileMediator();
> ~KisTileMediator();
>
> void attach(KisTileSP tile, KisTileMgrSP mgr, Q_INT32 tilenum);
> void detach(KisTileSP tile, KisTileMgrSP mgr, Q_INT32 tilenum);
> void detachAll(KisTileMgr *mgr);
> Q_INT32 tileNum(KisTileSP tile, KisTileMgrSP mgr);
>
> private:
> KisTileMediator(const KisTileMediator&);
> KisTileMediator& operator=(const KisTileMediator&);
>
> private:
> QMutex* m_mutex;
> KisTileMediatorSingleton *m_instance;
> };
>
> When KisTileMediator is initialized, I will set the m_instance and m_mutex
> fields to the value of e_m_instance and e_m_mutex.
> Currently there is no problem, but if we create a KisTileMediator from a
> plugin, it will cause a problem because it's m_instance and m-mutex fields
> would be different from those of the kpart.
>
> Tell me if you see something wrong left within my code.
More information about the kimageshop
mailing list