[Kde-bindings] playground/bindings/kimono
Arno Rehn
arno at arnorehn.de
Mon Feb 26 21:38:56 UTC 2007
> [ cut ]
Ok, I found out why QDBusAbstractAdaptor doesn't work with the current way of
implementation. It seems like a call to 'staticMetaObject' via Smoke doesn't
return the same meta object as we would get when calling
QDBusAbstractAdaptor::staticMetaObject - I don't know what's going wrong
there, but the returned object is definitely an other one. I compared the
return value of meta->superClass() with
&QDBusAbstractAdaptor::staticMetaObject at the end of make_metaObject() in
both the revision of Qyoto in which it still worked and in the current one.
With the revision where it still worked, the pointers were the same,
currently they aren't.
The workaround itself is rather simple, look for the line
QMetaObject* parent = parent_meta_object(type);
in make_metaObject() and directly after that add
if (strcmp(parent->className(), "QDBusAbstractAdaptor") == 0) {
parent = (QMetaObject*) &QDBusAbstractAdaptor::staticMetaObject;
}
and voila, it should work. At least kind of, there still seem to be some
problems with QDBusVariants...
I don't know why this problem exists or why it is important 'which' meta
object is set as a parent, because the signals/slots/classinfos/whatever are
the same since it is a native Qt class and not a custom one created in C#.
Is there another way to obtain the static metaobject of an object than reading
staticMetaObject? I don't want to create an instance of every parent class to
pass to make_metaObject() as it would slow down the whole thing a lot, as
I've already said.
Any ideas?
--
Arno Rehn
arno at arnorehn.de
More information about the Kde-bindings
mailing list