[Kde-bindings] KDE/kdebindings/ruby/korundum
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Tue Sep 22 17:10:23 UTC 2009
SVN commit 1026822 by rdale:
* Fix broken KDE::ConfigGroup.readEntry method. Thanks to Paulo Capriotti
for reporting the bug
CCMAIL: kde-bindings at kde.org
M +4 -0 ChangeLog
M +11 -9 src/lib/KDE/korundum4.rb
--- trunk/KDE/kdebindings/ruby/korundum/ChangeLog #1026821:1026822
@@ -1,3 +1,7 @@
+2009-09-22 Richard Dale <richard.j.dale at gmail.com>
+ * Fix broken KDE::ConfigGroup.readEntry method. Thanks to Paulo Capriotti
+ for reporting the bug
+
2009-08-04 Richard Dale <richard.j.dale at gmail.com>
* Enable KDE::ConfigGroup.read_entry() and write_entry() methods to
automatically convert args to Qt::Variants as well as the camel case
--- trunk/KDE/kdebindings/ruby/korundum/src/lib/KDE/korundum4.rb #1026821:1026822
@@ -318,16 +318,18 @@
method_missing(:name, *args)
end
- def readEntry(key, default = nil)
- if default.kind_of?(String) || default.kind_of?(Qt::Variant)
- return super(key, default)
- else
- return super(key, Qt::Variant.new(default)).value
- end
- end
+ def readEntry(*args)
+ if args.length < 2
+ return super(*args)
+ elsif args[1].kind_of?(String) || args[1].kind_of?(Qt::Variant)
+ return super(*args)
+ else
+ return super(args[0], Qt::Variant.new(args[1])).value
+ end
+ end
- def read_entry(key, default = nil)
- readEntry(key, default)
+ def read_entry(*args)
+ readEntry(*args)
end
def writeEntry(key, value, pFlags = KDE::ConfigBase::Normal)
More information about the Kde-bindings
mailing list