|
Lines 805-811
Link Here
|
| 805 |
// isn't in the Smoke runtime |
805 |
// isn't in the Smoke runtime |
| 806 |
QValueList<DCOPRef> windowList; |
806 |
QValueList<DCOPRef> windowList; |
| 807 |
|
807 |
|
| 808 |
for (long i = 0; i < RARRAY(result)->len; i++) { |
808 |
for (long i = 0; i < RARRAY_LEN(result); i++) { |
| 809 |
VALUE item = rb_ary_entry(result, i); |
809 |
VALUE item = rb_ary_entry(result, i); |
| 810 |
smokeruby_object *o = value_obj_info(item); |
810 |
smokeruby_object *o = value_obj_info(item); |
| 811 |
if( !o || !o->ptr) |
811 |
if( !o || !o->ptr) |
|
Lines 822-828
Link Here
|
| 822 |
// And special case this type too |
822 |
// And special case this type too |
| 823 |
QValueList<QCString> propertyList; |
823 |
QValueList<QCString> propertyList; |
| 824 |
|
824 |
|
| 825 |
for (long i = 0; i < RARRAY(result)->len; i++) { |
825 |
for (long i = 0; i < RARRAY_LEN(result); i++) { |
| 826 |
VALUE item = rb_ary_entry(result, i); |
826 |
VALUE item = rb_ary_entry(result, i); |
| 827 |
propertyList.append(QCString(StringValuePtr(item))); |
827 |
propertyList.append(QCString(StringValuePtr(item))); |
| 828 |
} |
828 |
} |
|
Lines 836-842
Link Here
|
| 836 |
// Convert the ruby hash to an array of key/value arrays |
836 |
// Convert the ruby hash to an array of key/value arrays |
| 837 |
VALUE temp = rb_funcall(result, rb_intern("to_a"), 0); |
837 |
VALUE temp = rb_funcall(result, rb_intern("to_a"), 0); |
| 838 |
|
838 |
|
| 839 |
for (long i = 0; i < RARRAY(temp)->len; i++) { |
839 |
for (long i = 0; i < RARRAY_LEN(temp); i++) { |
| 840 |
VALUE action = rb_ary_entry(rb_ary_entry(temp, i), 0); |
840 |
VALUE action = rb_ary_entry(rb_ary_entry(temp, i), 0); |
| 841 |
VALUE item = rb_ary_entry(rb_ary_entry(temp, i), 1); |
841 |
VALUE item = rb_ary_entry(rb_ary_entry(temp, i), 1); |
| 842 |
|
842 |
|
|
Lines 926-932
Link Here
|
| 926 |
{ |
926 |
{ |
| 927 |
VALUE dcopObject = rb_funcall(kde_module, rb_intern("createDCOPObject"), 1, self); |
927 |
VALUE dcopObject = rb_funcall(kde_module, rb_intern("createDCOPObject"), 1, self); |
| 928 |
|
928 |
|
| 929 |
TQString signalname(rb_id2name(rb_frame_last_func())); |
929 |
TQString signalname(rb_id2name(rb_frame_this_func())); |
| 930 |
VALUE args = getdcopinfo(self, signalname); |
930 |
VALUE args = getdcopinfo(self, signalname); |
| 931 |
|
931 |
|
| 932 |
if(args == Qnil) return Qfalse; |
932 |
if(args == Qnil) return Qfalse; |
|
Lines 1020-1026
Link Here
|
| 1020 |
|
1020 |
|
| 1021 |
if (rb_funcall(kde_module, rb_intern("hasDCOPSignals"), 1, klass) == Qtrue) { |
1021 |
if (rb_funcall(kde_module, rb_intern("hasDCOPSignals"), 1, klass) == Qtrue) { |
| 1022 |
VALUE signalNames = rb_funcall(kde_module, rb_intern("getDCOPSignalNames"), 1, klass); |
1022 |
VALUE signalNames = rb_funcall(kde_module, rb_intern("getDCOPSignalNames"), 1, klass); |
| 1023 |
for (long index = 0; index < RARRAY(signalNames)->len; index++) { |
1023 |
for (long index = 0; index < RARRAY_LEN(signalNames); index++) { |
| 1024 |
VALUE signal = rb_ary_entry(signalNames, index); |
1024 |
VALUE signal = rb_ary_entry(signalNames, index); |
| 1025 |
rb_define_method(klass, StringValuePtr(signal), (VALUE (*) (...)) k_dcop_signal, -1); |
1025 |
rb_define_method(klass, StringValuePtr(signal), (VALUE (*) (...)) k_dcop_signal, -1); |
| 1026 |
} |
1026 |
} |
|
Lines 1088-1096
Link Here
|
| 1088 |
TQStrList *args = new TQStrList; |
1088 |
TQStrList *args = new TQStrList; |
| 1089 |
|
1089 |
|
| 1090 |
if (value_args != Qnil) { |
1090 |
if (value_args != Qnil) { |
| 1091 |
for (long i = 0; i < RARRAY(value_args)->len; i++) { |
1091 |
for (long i = 0; i < RARRAY_LEN(value_args); i++) { |
| 1092 |
VALUE item = rb_ary_entry(value_args, i); |
1092 |
VALUE item = rb_ary_entry(value_args, i); |
| 1093 |
args->append(TQString::fromLatin1(StringValuePtr(item), RSTRING(item)->len)); |
1093 |
args->append(TQString::fromLatin1(StringValuePtr(item), RSTRING_LEN(item))); |
| 1094 |
} |
1094 |
} |
| 1095 |
} |
1095 |
} |
| 1096 |
|
1096 |
|