summaryrefslogtreecommitdiffstats
path: root/lib/kross/ruby
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:38:41 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:38:41 -0600
commitf0de9e167e289ab7dc33e57f077c1f04ec7c68c8 (patch)
tree1fc538e179833e62caec21956bfe47a252be5a72 /lib/kross/ruby
parent11191ef0b9908604d1d7aaca382b011ef22c454c (diff)
downloadkoffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.tar.gz
koffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.zip
Remove additional unneeded tq method conversions
Diffstat (limited to 'lib/kross/ruby')
-rw-r--r--lib/kross/ruby/rubyextension.cpp12
-rw-r--r--lib/kross/ruby/rubyinterpreter.cpp6
-rw-r--r--lib/kross/ruby/rubymodule.cpp4
-rw-r--r--lib/kross/ruby/rubyscript.cpp4
4 files changed, 13 insertions, 13 deletions
diff --git a/lib/kross/ruby/rubyextension.cpp b/lib/kross/ruby/rubyextension.cpp
index 6c2cb40f..98474bf6 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.").tqarg(funcname).tqarg(argc-1));
+ krossdebug(TQString("Building arguments list for function: %1 there are %2 arguments.").arg(funcname).arg(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'.").tqarg(funcname).tqarg(object->getName()) );
+ krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing name='%1' is a child object of '%2'.").arg(funcname).arg(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'.").tqarg(funcname).tqarg(object->getName()) );
+ krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing try to call function with name '%1' in object '%2'.").arg(funcname).arg(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").tqarg(TYPE(value)));
+ krossdebug(TQString("RubyExtension::toObject of type %1").arg(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").tqarg(TYPE(value)));
+ krosswarning(TQString("This ruby type '%1' cannot be converted to a Kross::Api::Object").arg(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.").tqarg(variant.typeName()) );
+ krosswarning( TQString("Kross::Ruby::RubyExtension::toVALUE(TQVariant) Not possible to convert the TQVariant type '%1' to a VALUE.").arg(variant.typeName()) );
return Qundef;
}
}
diff --git a/lib/kross/ruby/rubyinterpreter.cpp b/lib/kross/ruby/rubyinterpreter.cpp
index 4a4df32f..6af8ecbe 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").tqarg(modname) );
+ krossdebug( TQString("RubyInterpreter::require() module=%1").arg(modname) );
if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) {
- krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) );
+ krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").arg(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.").tqarg(modname) );
+ krosswarning( TQString("Loading of Kross module '%1' failed.").arg(modname) );
}
} else {
return rb_f_require(obj, name);
diff --git a/lib/kross/ruby/rubymodule.cpp b/lib/kross/ruby/rubymodule.cpp
index 73012b89..948a10ee 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").tqarg(modname));
+ krossdebug(TQString("Module: %1").arg(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").tqarg(funcname));
+ krossdebug(TQString("Function %1 missing in a module").arg(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 dc0fbb16..370d4aa7 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").tqarg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error
+ 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
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").tqarg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error
+ 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
}
}