[Kde-bindings] KDE/kdebindings/ruby/qtruby

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Jun 30 09:59:27 UTC 2008


SVN commit 826284 by rdale:

* When a ruby value was marshalled to C++, and the actual type of
  the C++ instance was cast to the type of the return value, it
  was working correctly if the target type for the cast wasn't in
  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.

CCMAIL: kde-bindings at kde.org


 M  +9 -0      ChangeLog  
 M  +2 -2      src/marshall_basetypes.h  


--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #826283:826284
@@ -1,3 +1,12 @@
+2008-06-30  Richard Dale  <richard.j.dale at gmail.com>
+
+	* When a ruby value was marshalled to C++, and the actual type of
+	  the C++ instance was cast to the type of the return value, it
+	  was working correctly if the target type for the cast wasn't in
+	  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.
+
 2008-06-28  Arno Rehn  <arno at arnorehn.de>
 
 	* Special case QDBusVariants in SlotReturnValue and make it behave
--- trunk/KDE/kdebindings/ruby/qtruby/src/marshall_basetypes.h #826283:826284
@@ -119,9 +119,9 @@
 	ptr = o->smoke->cast(
 		ptr,				// pointer
 		o->classId,				// from
-		o->smoke->idClass(cl.className).index	// to
+		o->smoke->idClass(cl.className, true).index	// to
 		);
-				
+
 	m->item().s_class = ptr;
 	return;
 }



More information about the Kde-bindings mailing list