[Kde-bindings] KDE/kdebindings/ruby/qtruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Thu Nov 12 15:14:29 UTC 2009
SVN commit 1048001 by rdale:
* Added a patch from 'Ruby Twiddler'. Qt::DBusInterface.call() didn't work
when the first argument is an enum. For example:
iface = Qt::DBusInterface.new(SERVICE_NAME, "", "",
Qt::DBusConnection.sessionBus)
msg = iface.call(Qt::DBus::BlockWithGui, "somemethod", param)
p msg # => nil
reply = Qt::DBusReply.new(msg) # => Error!
* Thanks to Twiddler for the patch
CCMAIL: kde-bindings at kde.org
CCBUGS: 208838
M +9 -0 ChangeLog
M +4 -0 src/lib/Qt/qtruby4.rb
--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #1048000:1048001
@@ -40,7 +40,16 @@
(it is in Ruby 1.9)
* Thanks to Davor for the patch
+ * Added a patch from 'Ruby Twiddler'. Qt::DBusInterface.call() didn't work
+ when the first argument is an enum. For example:
+ iface = Qt::DBusInterface.new(SERVICE_NAME, "", "",
+ Qt::DBusConnection.sessionBus)
+ msg = iface.call(Qt::DBus::BlockWithGui, "somemethod", param)
+ p msg # => nil
+ reply = Qt::DBusReply.new(msg) # => Error!
+ * Thanks to Twiddler for the patch
+
2009-08-19 Richard Dale <richard.j.dale at gmail.com>
* Added a patch from Youhei Kondou to make the is_a? and kind_of? methods
use the C++ class ancestors obtained from the smoke libary
--- trunk/KDE/kdebindings/ruby/qtruby/src/lib/Qt/qtruby4.rb #1048000:1048001
@@ -723,6 +723,10 @@
def call(method_name, *args)
if args.length == 0
return super(method_name)
+ elsif method_name.is_a? Qt::Enum
+ opt = args.shift
+ qdbusArgs = args.collect {|arg| qVariantFromValue(arg)}
+ return super(method_name, opt, *qdbusArgs)
else
# If the method is Qt::DBusInterface.call(), create an Array
# 'dbusArgs' of Qt::Variants from '*args'
More information about the Kde-bindings
mailing list