diff options
Diffstat (limited to 'qtruby/rubylib/qtruby/handlers.cpp')
-rw-r--r-- | qtruby/rubylib/qtruby/handlers.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/qtruby/rubylib/qtruby/handlers.cpp b/qtruby/rubylib/qtruby/handlers.cpp index ae952c0e..1c1733c6 100644 --- a/qtruby/rubylib/qtruby/handlers.cpp +++ b/qtruby/rubylib/qtruby/handlers.cpp @@ -184,15 +184,15 @@ smokeruby_free(void * p) unmapPointer(o, o->classId, 0); object_count --; - if ( qstrcmp(className, "TQObject") == 0 - || qstrcmp(className, "TQListBoxItem") == 0 - || qstrcmp(className, "TQStyleSheetItem") == 0 - || qstrcmp(className, "KCommand") == 0 - || qstrcmp(className, "KNamedCommand") == 0 - || qstrcmp(className, "KMacroCommand") == 0 - || qstrcmp(className, "KAboutData") == 0 - || qstrcmp(className, "KCmdLineArgs") == 0 - || qstrcmp(className, "TQSqlCursor") == 0 ) + if ( tqstrcmp(className, "TQObject") == 0 + || tqstrcmp(className, "TQListBoxItem") == 0 + || tqstrcmp(className, "TQStyleSheetItem") == 0 + || tqstrcmp(className, "KCommand") == 0 + || tqstrcmp(className, "KNamedCommand") == 0 + || tqstrcmp(className, "KMacroCommand") == 0 + || tqstrcmp(className, "KAboutData") == 0 + || tqstrcmp(className, "KCmdLineArgs") == 0 + || tqstrcmp(className, "TQSqlCursor") == 0 ) { // Don't delete instances of these classes for now free(o); @@ -203,19 +203,19 @@ smokeruby_free(void * p) free(o); return; } - } else if (qstrcmp(className, "TQIconViewItem") == 0) { + } else if (tqstrcmp(className, "TQIconViewItem") == 0) { TQIconViewItem * item = (TQIconViewItem *) o->ptr; if (item->iconView() != 0) { free(o); return; } - } else if (qstrcmp(className, "TQCheckListItem") == 0) { + } else if (tqstrcmp(className, "TQCheckListItem") == 0) { TQCheckListItem * item = (TQCheckListItem *) o->ptr; if (item->parent() != 0 || item->listView() != 0) { free(o); return; } - } else if (qstrcmp(className, "TQListViewItem") == 0) { + } else if (tqstrcmp(className, "TQListViewItem") == 0) { TQListViewItem * item = (TQListViewItem *) o->ptr; if (item->parent() != 0 || item->listView() != 0) { free(o); @@ -227,7 +227,7 @@ smokeruby_free(void * p) free(o); return; } - } else if (qstrcmp(className, "TQPopupMenu") == 0) { + } else if (tqstrcmp(className, "TQPopupMenu") == 0) { TQPopupMenu * item = (TQPopupMenu *) o->ptr; if (item->parentWidget(false) != 0) { free(o); @@ -401,7 +401,7 @@ matches_arg(Smoke *smoke, Smoke::Index meth, Smoke::Index argidx, const char *ar { Smoke::Index *arg = smoke->argumentList + smoke->methods[meth].args + argidx; SmokeType type = SmokeType(smoke, *arg); - return type.name() && qstrcmp(type.name(), argtype) == 0; + return type.name() && tqstrcmp(type.name(), argtype) == 0; } void * @@ -809,9 +809,9 @@ static void init_codec() { VALUE temp = rb_gv_get("$KCODE"); KCODE = StringValuePtr(temp); - if (qstrcmp(KCODE, "EUC") == 0) { + if (tqstrcmp(KCODE, "EUC") == 0) { codec = TQTextCodec::codecForName("eucJP"); - } else if (qstrcmp(KCODE, "SJIS") == 0) { + } else if (tqstrcmp(KCODE, "SJIS") == 0) { codec = TQTextCodec::codecForName("Shift-JIS"); } } @@ -823,13 +823,13 @@ qstringFromRString(VALUE rstring) { } TQString * s; - if (qstrcmp(KCODE, "UTF8") == 0) + if (tqstrcmp(KCODE, "UTF8") == 0) s = new TQString(TQString::fromUtf8(StringValuePtr(rstring), RSTRING(rstring)->len)); - else if (qstrcmp(KCODE, "EUC") == 0) + else if (tqstrcmp(KCODE, "EUC") == 0) s = new TQString(codec->toUnicode(StringValuePtr(rstring))); - else if (qstrcmp(KCODE, "SJIS") == 0) + else if (tqstrcmp(KCODE, "SJIS") == 0) s = new TQString(codec->toUnicode(StringValuePtr(rstring))); - else if(qstrcmp(KCODE, "NONE") == 0) + else if(tqstrcmp(KCODE, "NONE") == 0) s = new TQString(TQString::fromLatin1(StringValuePtr(rstring))); else s = new TQString(TQString::fromLocal8Bit(StringValuePtr(rstring), RSTRING(rstring)->len)); @@ -842,13 +842,13 @@ rstringFromTQString(TQString * s) { init_codec(); } - if (qstrcmp(KCODE, "UTF8") == 0) + if (tqstrcmp(KCODE, "UTF8") == 0) return rb_str_new2(s->utf8()); - else if (qstrcmp(KCODE, "EUC") == 0) + else if (tqstrcmp(KCODE, "EUC") == 0) return rb_str_new2(codec->fromUnicode(*s)); - else if (qstrcmp(KCODE, "SJIS") == 0) + else if (tqstrcmp(KCODE, "SJIS") == 0) return rb_str_new2(codec->fromUnicode(*s)); - else if (qstrcmp(KCODE, "NONE") == 0) + else if (tqstrcmp(KCODE, "NONE") == 0) return rb_str_new2(s->latin1()); else return rb_str_new2(s->local8Bit()); @@ -1779,7 +1779,7 @@ void marshall_ValueItemList(Marshall *m) { smokeruby_object *o = value_obj_info(item); // Special case for the TQValueList<TQVariant> type - if ( qstrcmp(ItemSTR, "TQVariant") == 0 + if ( tqstrcmp(ItemSTR, "TQVariant") == 0 && (!o || !o->ptr || o->classId != o->smoke->idClass("TQVariant")) ) { // If the value isn't a TQt::Variant, then try and construct |