diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 09:56:31 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 09:56:31 -0600 |
commit | c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch) | |
tree | 1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /lib/kross/ruby | |
parent | 94844816550ad672ccfcdc25659c625546239998 (diff) | |
download | koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'lib/kross/ruby')
-rw-r--r-- | lib/kross/ruby/rubyextension.cpp | 12 | ||||
-rw-r--r-- | lib/kross/ruby/rubyinterpreter.cpp | 6 | ||||
-rw-r--r-- | lib/kross/ruby/rubymodule.cpp | 4 | ||||
-rw-r--r-- | lib/kross/ruby/rubyscript.cpp | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/lib/kross/ruby/rubyextension.cpp b/lib/kross/ruby/rubyextension.cpp index 98474bf6..6c2cb40f 100644 --- a/lib/kross/ruby/rubyextension.cpp +++ b/lib/kross/ruby/rubyextension.cpp @@ -66,7 +66,7 @@ VALUE RubyExtension::call_method( Kross::Api::Object::Ptr object, int argc, VALU TQString funcname = rb_id2name(SYM2ID(argv[0])); TQValueList<Api::Object::Ptr> argsList; #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug(TQString("Building arguments list for function: %1 there are %2 arguments.").arg(funcname).arg(argc-1)); + krossdebug(TQString("Building arguments list for function: %1 there are %2 arguments.").tqarg(funcname).tqarg(argc-1)); #endif for(int i = 1; i < argc; i++) { @@ -79,13 +79,13 @@ VALUE RubyExtension::call_method( Kross::Api::Object::Ptr object, int argc, VALU Kross::Api::Callable* callable = dynamic_cast<Kross::Api::Callable*>(object.data()); if(callable && callable->hasChild(funcname)) { #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing name='%1' is a child object of '%2'.").arg(funcname).arg(object->getName()) ); + krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing name='%1' is a child object of '%2'.").tqarg(funcname).tqarg(object->getName()) ); #endif result = callable->getChild(funcname)->call(TQString(), new Api::List(argsList)); } else { #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing try to call function with name '%1' in object '%2'.").arg(funcname).arg(object->getName()) ); + krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing try to call function with name '%1' in object '%2'.").tqarg(funcname).tqarg(object->getName()) ); #endif result = object->call(funcname, new Api::List(argsList)); } @@ -184,7 +184,7 @@ VALUE RubyExtension::convertFromException(Kross::Api::Exception::Ptr exc) Kross::Api::Object::Ptr RubyExtension::toObject(VALUE value) { #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug(TQString("RubyExtension::toObject of type %1").arg(TYPE(value))); + krossdebug(TQString("RubyExtension::toObject of type %1").tqarg(TYPE(value))); #endif switch( TYPE( value ) ) { @@ -251,7 +251,7 @@ Kross::Api::Object::Ptr RubyExtension::toObject(VALUE value) case T_MODULE: case T_ICLASS: case T_CLASS: - krosswarning(TQString("This ruby type '%1' cannot be converted to a Kross::Api::Object").arg(TYPE(value))); + krosswarning(TQString("This ruby type '%1' cannot be converted to a Kross::Api::Object").tqarg(TYPE(value))); default: case T_NIL: return 0; @@ -329,7 +329,7 @@ VALUE RubyExtension::toVALUE(const TQVariant& variant) case TQVariant::ULongLong: return UINT2NUM((unsigned long)variant.toULongLong()); default: { - krosswarning( TQString("Kross::Ruby::RubyExtension::toVALUE(TQVariant) Not possible to convert the TQVariant type '%1' to a VALUE.").arg(variant.typeName()) ); + krosswarning( TQString("Kross::Ruby::RubyExtension::toVALUE(TQVariant) Not possible to convert the TQVariant type '%1' to a VALUE.").tqarg(variant.typeName()) ); return Qundef; } } diff --git a/lib/kross/ruby/rubyinterpreter.cpp b/lib/kross/ruby/rubyinterpreter.cpp index 6af8ecbe..4a4df32f 100644 --- a/lib/kross/ruby/rubyinterpreter.cpp +++ b/lib/kross/ruby/rubyinterpreter.cpp @@ -121,9 +121,9 @@ VALUE RubyInterpreter::require (VALUE obj, VALUE name) #endif TQString modname = StringValuePtr(name); if(modname.startsWith("kross")) { - krossdebug( TQString("RubyInterpreter::require() module=%1").arg(modname) ); + krossdebug( TQString("RubyInterpreter::require() module=%1").tqarg(modname) ); if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) { - krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").arg(modname) ); + krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) ); } else { Kross::Api::Module::Ptr module = Kross::Api::Manager::scriptManager()->loadModule(modname); @@ -136,7 +136,7 @@ VALUE RubyInterpreter::require (VALUE obj, VALUE name) // rb_define_variable( ("$" + modname).ascii(), & RubyInterpreter::d->m_modules.insert( mStrVALUE::value_type( modname, rm) ).first->second ); return Qtrue; } - krosswarning( TQString("Loading of Kross module '%1' failed.").arg(modname) ); + krosswarning( TQString("Loading of Kross module '%1' failed.").tqarg(modname) ); } } else { return rb_f_require(obj, name); diff --git a/lib/kross/ruby/rubymodule.cpp b/lib/kross/ruby/rubymodule.cpp index 948a10ee..73012b89 100644 --- a/lib/kross/ruby/rubymodule.cpp +++ b/lib/kross/ruby/rubymodule.cpp @@ -37,7 +37,7 @@ RubyModule::RubyModule(Kross::Api::Module::Ptr mod, TQString modname) : d(new Ru { d->m_module = mod; modname = modname.left(1).upper() + modname.right(modname.length() - 1 ); - krossdebug(TQString("Module: %1").arg(modname)); + krossdebug(TQString("Module: %1").tqarg(modname)); VALUE rmodule = rb_define_module(modname.ascii()); rb_define_module_function(rmodule,"method_missing", (VALUE (*)(...))RubyModule::method_missing, -1); VALUE rm = RubyExtension::toVALUE( mod.data() ); @@ -52,7 +52,7 @@ VALUE RubyModule::method_missing(int argc, VALUE *argv, VALUE self) { #ifdef KROSS_RUBY_MODULE_DEBUG TQString funcname = rb_id2name(SYM2ID(argv[0])); - krossdebug(TQString("Function %1 missing in a module").arg(funcname)); + krossdebug(TQString("Function %1 missing in a module").tqarg(funcname)); #endif VALUE rubyObjectModule = rb_funcall( self, rb_intern("const_get"), 1, ID2SYM(rb_intern("MODULEOBJ")) ); diff --git a/lib/kross/ruby/rubyscript.cpp b/lib/kross/ruby/rubyscript.cpp index 370d4aa7..dc0fbb16 100644 --- a/lib/kross/ruby/rubyscript.cpp +++ b/lib/kross/ruby/rubyscript.cpp @@ -87,7 +87,7 @@ void RubyScript::compile() #ifdef KROSS_RUBY_SCRIPT_DEBUG krossdebug("Compilation has failed"); #endif - setException( new Kross::Api::Exception(TQString("Failed to compile ruby code: %1").arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error + setException( new Kross::Api::Exception(TQString("Failed to compile ruby code: %1").tqarg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error d->m_compile = 0; } #ifdef KROSS_RUBY_SCRIPT_DEBUG @@ -133,7 +133,7 @@ Kross::Api::Object::Ptr RubyScript::execute() #endif setException( RubyExtension::convertToException( ruby_errinfo ) ); } else { - setException( new Kross::Api::Exception(TQString("Failed to execute ruby code: %1").arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error + setException( new Kross::Api::Exception(TQString("Failed to execute ruby code: %1").tqarg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error } } |