[Kde-bindings] kdebindings/qtruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Sat Oct 16 12:09:14 UTC 2004
CVS commit by rdale:
* Until super has been called in an initialize() method, Qt methods can't be called on
it. An exception is now thrown 'Instance not initialized', instead of it causing a seg fault.
* For instance:
class MyWidget < Qt::ComboBox
def initialize
# Must call super first
insertItem('abc')
super
end
end
* Fixes problem reported by Han Holl
CCMAIL: kde-bindings at kde.org
M +17 -0 ChangeLog 1.134
M +5 -0 rubylib/qtruby/Qt.cpp 1.98
--- kdebindings/qtruby/rubylib/qtruby/Qt.cpp #1.97:1.98
@@ -357,4 +357,9 @@ public:
_cur(-1), _smoke(smoke), _method(method), _target(target), _current_object(0), _sp(sp), _items(items), _called(false)
{
+
+ if (TYPE(_target) != T_DATA && _target != Qnil) {
+ rb_raise(rb_eArgError, "Instance not initialized");
+ }
+
if (_target != Qnil) {
smokeruby_object *o = value_obj_info(_target);
--- kdebindings/qtruby/ChangeLog #1.133:1.134
@@ -1,4 +1,21 @@
2004-10-16 Richard Dale <Richard_Dale at tipitina.demon.co.uk>
+ * Until super has been called in an initialize() method, Qt methods can't be called on
+ it. An exception is now thrown 'Instance not initialized', instead of it causing a seg fault.
+ * For instance:
+
+ class MyWidget < Qt::ComboBox
+ def initialize
+ # Must call super first
+ insertItem('abc')
+ super
+ end
+ end
+
+ * Fixes problem reported by Han Holl
+ CCMAIL: kde-bindings at kde.org
+
+2004-10-16 Richard Dale <Richard_Dale at tipitina.demon.co.uk>
+
* Upped the version to 1.0.4 for the RubyForge release
* Added some names to AUTHORS from the ChangeLog
More information about the Kde-bindings
mailing list