[Kde-bindings] [Bug 208838] New: qtruby QDBus API return nil
ruby.twiddler at gmail.com
ruby.twiddler at gmail.com
Tue Sep 29 02:59:09 UTC 2009
https://bugs.kde.org/show_bug.cgi?id=208838
Summary: qtruby QDBus API return nil
Product: bindings
Version: unspecified
Platform: Mandriva RPMs
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: general
AssignedTo: kde-bindings at kde.org
ReportedBy: ruby.twiddler at gmail.com
Version: ruby-qt4-4.2.4 (using KDE 4.2.4)
OS: Linux
Installed from: Mandriva RPMs
QDBusAbstractInterface::call ( QDBus::CallMode mode, const QString &method,
..) doesn't return Qt::DBusMessage.
just return nil.
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!
/usr/lib/ruby/site_ruby/1.8/Qt/qtruby4.rb:2572:in `initialize': unresolved
constructor call Qt::DBusError (ArgumentError)
This snippet of code slightly changed from examples/qdbus/pingpon/ping.rb
provoke error.
attach a patch to remedy this problem.
*** qtruby4.rb.org 2009-09-29 10:26:43.000000000 +0900
--- qtruby4.rb 2009-09-29 10:30:21.000000000 +0900
*************** module Qt
*** 716,723 ****
def call(method_name, *args)
if args.length == 0
return super(method_name)
else
! # If the method is Qt::DBusInterface.call(), create an Array
# 'dbusArgs' of Qt::Variants from '*args'
qdbusArgs = args.collect {|arg| qVariantFromValue(arg)}
return super(method_name, *qdbusArgs)
--- 716,727 ----
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'
qdbusArgs = args.collect {|arg| qVariantFromValue(arg)}
return super(method_name, *qdbusArgs)
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Kde-bindings
mailing list