[Kde-bindings] KDE/kdebindings/ruby/qtruby
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Mon Sep 22 16:10:53 UTC 2008
SVN commit 863592 by rdale:
* Rename get_VALUEtype() as value_to_type_flag()
* Change the inspect() method for Qt::Rects and RectFs to use the
Qt4 convention of x, y, width, height
* module_method_missing() had the Qt:: module hard wired into it, and
so constants in other modules wouldn't be found
CCMAIL: kde-bindings at kde.org
M +8 -0 ChangeLog
M +4 -4 src/Qt.cpp
M +1 -0 src/handlers.cpp
M +4 -4 src/lib/Qt/qtruby4.rb
M +3 -3 src/qtruby.cpp
M +1 -1 src/qtruby.h
--- trunk/KDE/kdebindings/ruby/qtruby/ChangeLog #863591:863592
@@ -1,3 +1,11 @@
+2008-09-22 Richard Dale <richard.j.dale at gmail.com>
+
+ * Rename get_VALUEtype() as value_to_type_flag()
+ * Change the inspect() method for Qt::Rects and RectFs to use the
+ Qt4 convention of x, y, width, height
+ * module_method_missing() had the Qt:: module hard wired into it, and
+ so constants in other modules wouldn't be found
+
2008-08-22 Richard Dale <richard.j.dale at gmail.com>
* Argument types of 'unsigned short' were not being matched in the
--- trunk/KDE/kdebindings/ruby/qtruby/src/Qt.cpp #863591:863592
@@ -497,10 +497,10 @@
#endif
}
- if (!meth.index) {
+ if (meth.index == 0) {
return result;
// empty list
- } else if(meth.index > 0) {
+ } else if (meth.index > 0) {
Smoke::Index i = meth.smoke->methodMaps[meth.index].method;
if (i == 0) { // shouldn't happen
rb_raise(rb_eArgError, "Corrupt method %s::%s", c, name);
@@ -713,7 +713,7 @@
for(int i=4; i<argc ; i++)
{
*mcid += ';';
- *mcid += get_VALUEtype(argv[i]);
+ *mcid += value_to_type_flag(argv[i]);
}
Smoke::ModuleIndex *rcid = methcache.value(*mcid);
#ifdef DEBUG
@@ -1178,7 +1178,7 @@
}
const char *
-get_VALUEtype(VALUE ruby_value)
+value_to_type_flag(VALUE ruby_value)
{
const char * classname = rb_obj_classname(ruby_value);
const char *r = "";
--- trunk/KDE/kdebindings/ruby/qtruby/src/handlers.cpp #863591:863592
@@ -2218,6 +2218,7 @@
{ "long long int&", marshall_it<long long> },
{ "QDBusVariant", marshall_QDBusVariant },
{ "QDBusVariant&", marshall_QDBusVariant },
+ { "QList<QFileInfo>", marshall_QFileInfoList },
{ "QFileInfoList", marshall_QFileInfoList },
{ "QGradiantStops", marshall_QPairqrealQColor },
{ "QGradiantStops&", marshall_QPairqrealQColor },
--- trunk/KDE/kdebindings/ruby/qtruby/src/lib/Qt/qtruby4.rb #863591:863592
@@ -1451,24 +1451,24 @@
class Rect < Qt::Base
def inspect
str = super
- str.sub(/>$/, " left=%d, right=%d, top=%d, bottom=%d>" % [left, right, top, bottom])
+ str.sub(/>$/, " x=%d, y=%d, width=%d, height=%d>" % [x, y, width, height])
end
def pretty_print(pp)
str = to_s
- pp.text str.sub(/>$/, "\n left=%d,\n right=%d,\n top=%d,\n bottom=%d>" % [left, right, top, bottom])
+ pp.text str.sub(/>$/, "\n x=%d,\n y=%d,\n width=%d,\n height=%d>" % [x, y, width, height])
end
end
class RectF < Qt::Base
def inspect
str = super
- str.sub(/>$/, " left=%f, right=%f, top=%f, bottom=%f>" % [left, right, top, bottom])
+ str.sub(/>$/, " x=%f, y=%f, width=%f, height=%f>" % [x, y, width, height])
end
def pretty_print(pp)
str = to_s
- pp.text str.sub(/>$/, "\n left=%f,\n right=%f,\n top=%f,\n bottom=%f>" % [left, right, top, bottom])
+ pp.text str.sub(/>$/, "\n x=%f,\n y=%f,\n width=%f,\n height=%f>" % [x, y, width, height])
end
end
--- trunk/KDE/kdebindings/ruby/qtruby/src/qtruby.cpp #863591:863592
@@ -1196,9 +1196,9 @@
return rb_call_super(argc, argv);
}
-static VALUE module_method_missing(int argc, VALUE * argv, VALUE /*klass*/)
+static VALUE module_method_missing(int argc, VALUE * argv, VALUE klass)
{
- return class_method_missing(argc, argv, qt_module);
+ return class_method_missing(argc, argv, klass);
}
/*
@@ -1736,7 +1736,7 @@
static VALUE
get_value_type(VALUE /*self*/, VALUE ruby_value)
{
- return rb_str_new2(get_VALUEtype(ruby_value));
+ return rb_str_new2(value_to_type_flag(ruby_value));
}
static QMetaObject*
--- trunk/KDE/kdebindings/ruby/qtruby/src/qtruby.h #863591:863592
@@ -154,7 +154,7 @@
extern Q_DECL_EXPORT VALUE qobject_metaobject(VALUE self);
extern Q_DECL_EXPORT VALUE set_obj_info(const char * className, smokeruby_object * o);
extern Q_DECL_EXPORT VALUE kross2smoke(VALUE self, VALUE krobject, VALUE new_klass);
-extern Q_DECL_EXPORT const char* get_VALUEtype(VALUE ruby_value);
+extern Q_DECL_EXPORT const char* value_to_type_flag(VALUE ruby_value);
extern Q_DECL_EXPORT VALUE prettyPrintMethod(Smoke::Index id);
}
More information about the Kde-bindings
mailing list