[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] sip SIGNAL/proxy problem
From: Jim Bublitz <jbublitz () nwinternet ! com>
Date: 2003-12-21 21:26:40
[Download RAW message or body]
There appears to be a sip problem as described in the following
PyKDE list thread:
[PyKDE] un-connectable signals (probably sip bug)
Basically the situation is this (WId is just an example of the
general problem):
WId is defined in qwindowdefs_x11.sip as:
typedef unsigned long WId;
In kdecore/KWinModule, the *signal*:
void windowAdded (WId);
is defined.
kdecore proxies unsigned long, so the following should work :
wm = KWinModule ()
wm.connect (wm, SIGNAL ("windowAdded (unsigned long)"),
someSlot)
However, when sip looks, it doesn't find windowAdded (unsigned
long) in KWinModule (I assume it's a text search). kdecore has
no proxy slot using WId, so replacing unsigned long in the
connect stmt above causes a failure on that end. As was pointed
out in the original thread, it wouldn't be possible to have two
proxy slots that vary only by base type vs derived type either.
Is this a sip problem, or am I missing something? Can it be fixed
(on the signal lookup side?) ? There are other places in PyKDE
where this occurs as well. The generated sipEmit code parses the
arg as unsigned long already. It would be preferable to be able
to use WId in the connect stmt, but I could "patch" that in the
docs if unsigned long was necessary.
A temporary workaround would be to modify kwinmodule.sip:
class KWinModule
{
%HeaderCode
#define WId unsigned long
#include <kwinmodule.h>
%End
I can also modify presip to build in a workaround by substituting
the base type for a derived type if that's more desireable (not
looking forward to doing that though, but I imagine it's no more
difficult there than in sip).
Jim
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic