[Kde-bindings] KDE/kdebindings/ruby/qtruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Thu Mar 19 14:13:43 UTC 2009
SVN commit 941431 by rdale:
* The rbqtap was calling 'each' on a string which no longer works in Ruby
1.9.1 as they aren't Enumerable. So use split instead so that the code
works on both Ruby 1.8.x and 1.9.1. Thanks to Youhei Kondou for the bug
report and fix.
* The inspect method for Qt::SizePolicy instances was wrong
CCMAIL: kde-bindings at kde.org
M +7 -0 ChangeLog
M +3 -4 bin/rbqtapi
M +2 -2 src/lib/Qt/qtruby4.rb
--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #941430:941431
@@ -1,3 +1,10 @@
+2009-03-19 Richard Dale <richard.j.dale at gmail.com>
+ * The rbqtap was calling 'each' on a string which no longer works in Ruby
+ 1.9.1 as they aren't Enumerable. So use split instead so that the code
+ works on both Ruby 1.8.x and 1.9.1. Thanks to Youhei Kondou for the bug
+ report and fix.
+ * The inspect method for Qt::SizePolicy instances was wrong
+
2009-03-16 Richard Dale <richard.j.dale at gmail.com>
* Make the dispose() method always return nil. Otherwise, when an instance
is deleted from within irb, it makes irb crash when it tries to run
--- trunk/KDE/kdebindings/ruby/qtruby/bin/rbqtapi #941430:941431
@@ -142,12 +142,11 @@
end
candidates.gsub!("\t", "")
-candidates.each do |candidate|
- if candidate =~ /~/ || candidate =~ /qt_metacall/ || candidate =~ /staticMetaObject/
+candidates.split($/).each do |candidate|
+ if candidate =~ /~|qt_metacall|staticMetaObject/
next
end
-
- print candidate.to_ruby_method(showOpt) if pattern.nil? || pattern =~ candidate
+ puts candidate.to_ruby_method(showOpt) if pattern.nil? || pattern =~ candidate
end
# kate: space-indent on; indent-width 2; replace-tabs on; mixed-indent off;
--- trunk/KDE/kdebindings/ruby/qtruby/src/lib/Qt/qtruby4.rb #941430:941431
@@ -1767,12 +1767,12 @@
class SizePolicy < Qt::Base
def inspect
str = super
- str.sub(/>$/, " horData=%d, verData=%d>" % [horData, verData])
+ str.sub(/>$/, " horizontalPolicy=%d, verticalPolicy=%d>" % [horizontalPolicy, verticalPolicy])
end
def pretty_print(pp)
str = to_s
- pp.text str.sub(/>$/, "\n horData=%d,\n verData=%d>" % [horData, verData])
+ pp.text str.sub(/>$/, "\n horizontalPolicy=%d,\n verticalPolicy=%d>" % [horizontalPolicy, verticalPolicy])
end
end
More information about the Kde-bindings
mailing list