[Kde-bindings] KDE/kdebindings/csharp/qyoto

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Jun 30 13:42:22 UTC 2008


SVN commit 826332 by rdale:

* Fixed a similar bug to the above description, but for where the target
  of a method call was being cast to the correct class. For instance,
  a call of parentWidget() on a Plasma::Applet() needed the correct cast
  to a QWidget for it to work.

CCMAIL: kde-bindings at kde.org


 M  +4 -0      ChangeLog  
 M  +6 -1      src/methodcall.cpp  


--- trunk/KDE/kdebindings/csharp/qyoto/ChangeLog #826331:826332
@@ -6,6 +6,10 @@
 	  the same smoke module as the type of the instance. For instance,
 	  an instance of type Plasma::Applet wasn't being correctly cast
 	  to a QGraphicsLayoutItem, which caused a crash.
+	* Fixed a similar bug to the above description, but for where the target
+	  of a method call was being cast to the correct class. For instance,
+	  a call of parentWidget() on a Plasma::Applet() needed the correct cast
+	  to a QWidget for it to work.
 
 2008-06-20  Richard Dale  <richard.j.dale at gmail.com>
 
--- trunk/KDE/kdebindings/csharp/qyoto/src/methodcall.cpp #826331:826332
@@ -64,8 +64,13 @@
 	_called = true;
 	Smoke::ClassFn fn = _smoke->classes[method().classId].classFn;
 	void *ptr = 0;
+
 	if (_o != 0 && _o->ptr != 0) {
-		ptr = _smoke->cast(_o->ptr, _o->classId, method().classId);
+		const Smoke::Class &cl = _smoke->classes[method().classId];
+
+		ptr = _o->smoke->cast(	_o->ptr,
+								_o->classId,
+								_o->smoke->idClass(cl.className, true).index );
 	}
 	_items = -1;
 	



More information about the Kde-bindings mailing list