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

Richard Dale Richard_Dale at tipitina.demon.co.uk
Mon May 19 18:10:59 UTC 2008


SVN commit 809896 by rdale:

* qtruby4.rb calls Kernel#y instead of Qt::Point#y on inspect and 
  pretty_print when the yaml gem is loaded.
  The attached patch fixes the problem by calling Qt::Point#y and 
  Qt::PointF#y explicitly. Thanks to Paolo Capriotti for the bug report
  and fix.

CCMAIL: kde-bindings at kde.org



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


--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #809895:809896
@@ -5,6 +5,11 @@
 	  was. This caused a crash. Why such a major problem hasn't caused any
 	  problems before is a mystery - it wasn't a result of the modular smoke
 	  changes.
+	* qtruby4.rb calls Kernel#y instead of Qt::Point#y on inspect and 
+	  pretty_print when the yaml gem is loaded.
+	  The attached patch fixes the problem by calling Qt::Point#y and 
+	  Qt::PointF#y explicitly. Thanks to Paolo Capriotti for the bug report
+	  and fix.
 
 2008-05-16  Arno Rehn  <arno at arnorehn.de>
 
--- trunk/KDE/kdebindings/ruby/qtruby/src/lib/Qt/qtruby4.rb #809895:809896
@@ -1265,24 +1265,24 @@
 	class Point < Qt::Base
 		def inspect
 			str = super
-			str.sub(/>$/, " x=%d, y=%d>" % [x, y])
+			str.sub(/>$/, " x=%d, y=%d>" % [self.x, self.y])
 		end
 		
 		def pretty_print(pp)
 			str = to_s
-			pp.text str.sub(/>$/, "\n x=%d,\n y=%d>" % [x, y])
+			pp.text str.sub(/>$/, "\n x=%d,\n y=%d>" % [self.x, self.y])
 		end
 	end
 	
 	class PointF < Qt::Base
 		def inspect
 			str = super
-			str.sub(/>$/, " x=%f, y=%f>" % [x, y])
+			str.sub(/>$/, " x=%f, y=%f>" % [self.x, self.y])
 		end
 		
 		def pretty_print(pp)
 			str = to_s
-			pp.text str.sub(/>$/, "\n x=%f,\n y=%f>" % [x, y])
+			pp.text str.sub(/>$/, "\n x=%f,\n y=%f>" % [self.x, self.y])
 		end
 	end
 



More information about the Kde-bindings mailing list