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

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sun Mar 2 17:20:22 UTC 2008


SVN commit 781340 by rdale:

* The QModelIndex::internalPointer() method was returning nil, as
  as result of the code change attempting to return nil if the C++
  pointer is 0. Thanks to CyrilleB for reportin the error

CCMAIL: kde-bindings at kde.org


 M  +6 -0      ChangeLog  
 M  +2 -1      src/Qt.cpp  


--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #781339:781340
@@ -1,3 +1,9 @@
+2008-03-02  Richard Dale  <rdale at foton.es>
+
+	* The QModelIndex::internalPointer() method was returning nil, as
+	  as result of the code change attempting to return nil if the C++
+	  pointer is 0. Thanks to CyrilleB for reportin the error
+
 2008-02-18  Richard Dale  <rdale at foton.es>
 
 	* Ignore the WebCore:: and std:: namespaces when loading classes
--- trunk/KDE/kdebindings/ruby/qtruby/src/Qt.cpp #781339:781340
@@ -1619,10 +1619,11 @@
 static VALUE
 qmodelindex_internalpointer(VALUE self)
 {
+
     smokeruby_object *o = value_obj_info(self);
 	QModelIndex * index = (QModelIndex *) o->ptr;
 	void * ptr = index->internalPointer();
-	return ptr == 0 ? (VALUE) ptr : Qnil;
+	return ptr != 0 ? (VALUE) ptr : Qnil;
 }
 
 static VALUE



More information about the Kde-bindings mailing list