[Kde-bindings] playground/bindings/kimono

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sun Oct 22 23:40:36 UTC 2006


SVN commit 598235 by rdale:

* When a QMetaObject was constructed, the parent was wrongly being
  set to the superclass of the superclass, rather than just the
  superclass

CCMAIL: kde-bindings at kde.org



 M  +6 -0      ChangeLog  
 M  +6 -10     qyoto.cpp  


--- trunk/playground/bindings/kimono/ChangeLog #598234:598235
@@ -1,3 +1,9 @@
+2006-10-23  Richard Dale  <rdale at foton.es>
+
+	* When a QMetaObject was constructed, the parent was wrongly being
+	  set to the superclass of the superclass, rather than just the
+	  superclass
+
 2006-10-22  Arno Rehn  <arno at arnorehn.de>
 
 	* Currect return value for QyotoSmokeBinding::callMethod() where
--- trunk/playground/bindings/kimono/qyoto.cpp #598234:598235
@@ -849,7 +849,7 @@
 		}
 		
 		void * overridenMethod = (*OverridenMethod)(obj, (const char *) signature);
-		if (overridenMethod == 0 || signature == "metaObject() const") {
+		if (overridenMethod == 0) {
 			return false;
 		}
 
@@ -1155,20 +1155,16 @@
 #endif
 	smokeqyoto_object* o = value_obj_info(obj);
 	Smoke::Index nameId = o->smoke->idMethodName("metaObject");
-	Smoke::Index parent_index = o->smoke->classes[o->classId].parents;
-	if (!parent_index)
+	Smoke::Index meth = o->smoke->findMethod(o->classId, nameId);
+	if (meth <= 0) {
+		// Should never happen..
 		return 0;
+	}
 
-	Smoke::Index parentId = o->smoke->inheritanceList[parent_index];
-	Smoke::Index meth = o->smoke->findMethod(parentId, nameId);
-	if (meth <= 0)
-		return 0;
-		
 	Smoke::Method &methodId = o->smoke->methods[o->smoke->methodMaps[meth].method];
 	Smoke::ClassFn fn = o->smoke->classes[methodId.classId].classFn;
 	Smoke::StackItem i[1];
 	(*fn)(methodId.method, o->ptr, i);
-	
 	return (QMetaObject*) i[0].s_voidp;
 }
 
@@ -1194,7 +1190,7 @@
 	*meta = tmp;
 
 #ifdef DEBUG
-	printf("make_metaObject() superdata: %p\n", meta->d.superdata);
+	printf("make_metaObject() superdata: %p %s\n", meta->d.superdata, parent->className());
 	printf("stringdata: ");
 	for (int j = 0; j < stringdata_count; j++) {
 		if (meta->d.stringdata[j] == 0) {



More information about the Kde-bindings mailing list