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

List:       kde-kimageshop
Subject:    Re: Plugins 3 It's working :)
From:       Patrick Julien <freak () codepimps ! org>
Date:       2004-02-16 22:08:06
Message-ID: 200402161708.06422.freak () codepimps ! org
[Download RAW message or body]

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.
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread] 

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