<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Many thanks for the quick response Jim. Testing this out now.<br>
<br>
-Brian<br>
<br>
Jim Bublitz wrote:<br>
<blockquote type="cite"
cite="mid200407132010.09958.jbublitz@nwinternet.com">
<pre wrap="">On Tuesday 13 July 2004 17:42, Brian Thomason wrote:
</pre>
<blockquote type="cite">
<pre wrap="">In this old thread:
<a class="moz-txt-link-freetext" href="http://www.mail-archive.com/pykde@mats.imk.fraunhofer.de/msg01331.html">http://www.mail-archive.com/pykde@mats.imk.fraunhofer.de/msg01331.html</a>
A user is experiencing the exact same problem I've been seeing with
pykde 3.11 on both Linspire 4.5 and Debian SID. (at least to my feeble
mind it appears that way)
When overriding any type of pyqt event, khtml bombs out. (Even simply
importing khtml is a no go)
Just as the user stated (as tested on mandrake), 3.7 does not display
this behavior. I have attached a small, hoping some big brain (Jim :-)
) might have a solution to this problem.
</pre>
</blockquote>
<pre wrap=""><!---->
In sip/kparts/event.sip, comment out the ConvertToSubClassCode block as shown
below and recompile kparts (python configure.py -lkparts && make && su
-c"make install"). Works for me.
khtml (and the new kmdi module) would have the same problem because they both
depend on kparts. The only thing this change affects is "typecasting" of
KParts::Event subclasses - for example if a factory function creates a
KParts::GUIActivate even but returns KParts::Event, there is no way in Python
to "up-cast" to the subclass type (except via the commented out block).
I expect the "sipClass=NULL" stmt is causing the problem, but I'll have to
look into what to replace it with. I don't expect commenting this stuff out
will affect many people (if anybody), so I probably won't give it a high
priority unless someone has a problem with it.
I'll probably issue a patched tarball sometime around the time I release the
KDE 3.3.beta1 snapshot, which will be a week or two.
Thanks for re-activating this bug - it fell through the cracks. Let me know if
the problem persists.
Jim
class Event : QCustomEvent
{
%TypeHeaderCode
#include <event.h>
%End
public:
Event (const char*);
virtual const char* eventName () const;
static bool test (const QEvent*);
static bool test (const QEvent*, const char*);
//force
//%ConvertToSubClassCode
// const QString ev = ((KParts::Event *)sipCpp) -> eventName ();
// if (ev == "KParts/GUIActivate")
// sipClass = sipClass_KParts_GUIActivateEvent;
// else if (ev == "KParts/PartActivateEvent")
// sipClass = sipClass_KParts_PartActivateEvent;
// else if (ev == "KParts/PartSelectEvent")
// sipClass = sipClass_KParts_PartSelectEvent;
// else
// sipClass = NULL;
//%End
//end
}; // class Event
_______________________________________________
PyKDE mailing list <a class="moz-txt-link-abbreviated" href="mailto:PyKDE@mats.imk.fraunhofer.de">PyKDE@mats.imk.fraunhofer.de</a>
<a class="moz-txt-link-freetext" href="http://mats.imk.fraunhofer.de/mailman/listinfo/pykde">http://mats.imk.fraunhofer.de/mailman/listinfo/pykde</a>
</pre>
</blockquote>
</body>
</html>