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

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon Nov 24 17:14:02 UTC 2008


SVN commit 888498 by rdale:

* The YAML library was adding a y() method to Kernel, which was messing
  up the inspect() methods for Qt::Rects and Qt::RectFs. So instead of
  calling y(), call self.y() instead. Thanks to Stefano Crocco for the
  bug report and fix.

CCMAIL: kde-bindings at kde.org



 M  +4 -0      ChangeLog  
 M  +4 -4      src/lib/Qt/qtruby4.rb  


--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #888497:888498
@@ -1,6 +1,10 @@
 2008-11-24  Richard Dale  <richard.j.dale at gmail.com>
 	* Added a DEF_MAP_MARSHALLER() macro for defining marshallers for
 	  QMaps with QString keys and value types as the values
+	* The YAML library was adding a y() method to Kernel, which was messing
+	  up the inspect() methods for Qt::Rects and Qt::RectFs. So instead of
+	  calling y(), call self.y() instead. Thanks to Stefano Crocco for the
+	  bug report and fix.
 
 2008-11-17  Richard Dale  <richard.j.dale at gmail.com>
 	* Comparisons between Qt instances and nil were causing QtRuby to
--- trunk/KDE/kdebindings/ruby/qtruby/src/lib/Qt/qtruby4.rb #888497:888498
@@ -1465,24 +1465,24 @@
 	class Rect < Qt::Base
 		def inspect
 			str = super
-			str.sub(/>$/, " x=%d, y=%d, width=%d, height=%d>" % [x, y, width, height])
+			str.sub(/>$/, " x=%d, y=%d, width=%d, height=%d>" % [self.x, self.y, width, height])
 		end
 		
 		def pretty_print(pp)
 			str = to_s
-			pp.text str.sub(/>$/, "\n x=%d,\n y=%d,\n width=%d,\n height=%d>" % [x, y, width, height])
+			pp.text str.sub(/>$/, "\n x=%d,\n y=%d,\n width=%d,\n height=%d>" % [self.x, self.y, width, height])
 		end
 	end
 	
 	class RectF < Qt::Base
 		def inspect
 			str = super
-			str.sub(/>$/, " x=%f, y=%f, width=%f, height=%f>" % [x, y, width, height])
+			str.sub(/>$/, " x=%f, y=%f, width=%f, height=%f>" % [self.x, self.y, width, height])
 		end
 		
 		def pretty_print(pp)
 			str = to_s
-			pp.text str.sub(/>$/, "\n x=%f,\n y=%f,\n width=%f,\n height=%f>" % [x, y, width, height])
+			pp.text str.sub(/>$/, "\n x=%f,\n y=%f,\n width=%f,\n height=%f>" % [self.x, self.y, width, height])
 		end
 	end
 



More information about the Kde-bindings mailing list