[Kde-bindings] Qyoto Custom Signal Arguments

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


Am Sonntag, 3. September 2006 19:13 schrieb Arno Rehn:
> 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?
Oh sorry, I forgot about 
"but you can't emit existing c++ signals in QtRuby like you can in Qyoto, only 
ruby signals."
Sorry again. Then I'll have to declare my own signals.

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list