[Kde-bindings] Qyoto Custom Signal Arguments
Richard_Dale at tipitina.demon.co.uk
Thu Aug 24 18:24:35 UTC 2006
On Thursday 24 August 2006 19:07, Arno Rehn wrote:
> OK, now as the more serious bugs are fixed the bindings are really close to
> getting useful.
Yes, I'll try and update to TODO list and we can discuss anything we can think
of that needs doing. More marshalling code and improving the Makefiles/build
system are the most important I think.
> But there's still one problem: arguments for custom signals don't work. I
> took a quick look at the way it is done in qt4-qtruby and it seems to be
> nearly the same.
> When I watch the variables in the EmitSignal class, there is something
> passed to the class. But apparently it isn't processed correctly or so.
> Am I right, that QMetaObject::activate() emits a signal?
> I don't find any documentation about this method on the Net or in the Qt
> docs and it doesn't appear in any of the header-files.
> Any ideas what to do?
Q_EMIT is set up in QObject.cs like this:
Type proxyInterface = Qyoto.GetSignalsInterface(GetType());
SignalInvocation realProxy = new SignalInvocation(proxyInterface, this);
Q_EMIT = realProxy.GetTransparentProxy();
SignalInvocation.Invoke() in SmokeInvocation.cs calls the C method:
SignalEmit() in qyoto.cpp:
SignalEmit(signature, (IntPtr) instanceHandle, (IntPtr) stackPtr,
That then uses the C++ class EmitSignal to actually invoke the signal:
EmitSignal signal(qobj, i, items, args, sp);
EmitSignal::emitSignal() calls the undocumented Qt internal method activate()
to actually invoke the slots connected to the signal:
_qobj->metaObject()->activate(_qobj, _id, o);
The code to emit signals used to work, and so if it's now stopped it problably
is only something minor, and it's a matter of tracing the code through the
above steps to see where it goes wrong.
I think I've changed the QtRuby code a bit since I copied it to use it Qyoto,
so it might be worth having a look at it and updating Qyoto. But it's
probably best to try and track down the bug first.
More information about the Kde-bindings