[Kde-bindings] KDE/kdebindings/ruby/qtruby
Arno Rehn
kde at arnorehn.de
Fri May 16 11:23:37 UTC 2008
SVN commit 808330 by arnorehn:
* Bring qtruby.cpp up to date with the branch-version.
CCMAIL: kde-bindings at kde.org
M +4 -0 ChangeLog
M +8 -17 src/qtruby.cpp
--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #808329:808330
@@ -1,3 +1,7 @@
+2008-05-16 Arno Rehn <arno at arnorehn.de>
+
+ * Bring qtruby.cpp up to date with the branch-version.
+
2008-05-16 Richard Dale <richard.j.dale at gmail.com>
* Rename the 'modules' global variable qtruby_modules to reduce the chances
--- trunk/KDE/kdebindings/ruby/qtruby/src/qtruby.cpp #808329:808330
@@ -878,8 +878,6 @@
return class_method_missing(argc, argv, qt_module);
}
-extern VALUE mapObject(VALUE self, VALUE obj);
-
/*
class LCDRange < Qt::Widget
@@ -1211,13 +1209,16 @@
{
VALUE parents_list = rb_ary_new();
+ int id = NUM2INT(rb_funcall(classId, rb_intern("index"), 0));
+ Smoke* smoke = smokeList[NUM2INT(rb_funcall(classId, rb_intern("smoke"), 0))];
+
Smoke::Index *parents =
- qt_Smoke->inheritanceList +
- qt_Smoke->classes[NUM2INT(classId)].parents;
+ smoke->inheritanceList +
+ smoke->classes[id].parents;
while(*parents) {
//logger("\tparent: %s", qt_Smoke->classes[*parents].className);
- rb_ary_push(parents_list, rb_str_new2(qt_Smoke->classes[*parents++].className));
+ rb_ary_push(parents_list, rb_str_new2(smoke->classes[*parents++].className));
}
return parents_list;
}
@@ -1626,16 +1627,6 @@
}
VALUE
-mapObject(VALUE self, VALUE obj)
-{
- smokeruby_object *o = value_obj_info(obj);
- if(!o)
- return Qnil;
- mapPointer(obj, o, o->classId, 0);
- return self;
-}
-
-static VALUE
isQObject(VALUE /*self*/, VALUE c)
{
const char* classname = strdup(StringValuePtr(c));
@@ -1652,8 +1643,8 @@
smokeruby_object *o = value_obj_info(instance);
if(!o)
return Qnil;
-
- return INT2NUM(o->classId);
+
+ return rb_funcall(moduleindex_class, rb_intern("new"), 2, INT2NUM(smokeList.indexOf(o->smoke)), INT2NUM(o->classId));
}
static VALUE
More information about the Kde-bindings
mailing list