[Kde-bindings] Qyoto Custom Signal Arguments

Arno Rehn arno at arnorehn.de
Sun Sep 3 17:13:58 UTC 2006


Am Samstag, 2. September 2006 17:48 schrieb Richard Dale:
> On Saturday 02 September 2006 16:42, Arno Rehn wrote:
> >
> > [blablabla]
> >
> > Should be no problem. But I wonder, when do you need slot return values?
> > I've never seen a slot that returns anything. They are all of type void,
> > or am I wrong?
>
> For QDBus slots, I haven't seen any slots with return values in Qt itself.

Coming back to the original topic:
I've ported my test app to ruby and it works. Fine. Now I modified 
EmitSignal::emitSignal() in Qt.cpp to print the number of args. That didn't 
work. I modified it to print anything at all, but it doesn't.
Here is the code:

void 
EmitSignal::emitSignal() 
{
	//printf("items: %d\n", _items);
	printf("something to print\n");
	if (_called) return;
	_called = true;
	void ** o = new void*[_items];
	smokeStackToQtStack(_stack, o + 1, _items - 1, _args + 1);
	_obj->metaObject()->activate(_obj, _id, o);
	
	if (_args[0].argType != xmoc_void) {
		SignalReturnValue r(o, _result, _args);
	}
	delete[] o;
}

Ruby program attached.
Why isn't emitSignal() called?

-- 
Arno Rehn
arno at arnorehn.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.rb
Type: application/x-ruby
Size: 557 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20060903/f7aaa94b/attachment.bin>


More information about the Kde-bindings mailing list