Plugins 3 It's working :)
Cyrille Berger
cyb at lepi.org
Mon Feb 16 22:40:17 CET 2004
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 :
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.
--
--- Cyrille Berger ---
-------------- next part --------------
A non-text attachment was scrubbed...
Name: exampleplugin20040216.diff
Type: text/x-diff
Size: 10925 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20040216/0a89587b/exampleplugin20040216-0001.bin
More information about the kimageshop
mailing list