From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/kross/ruby/rubyinterpreter.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/kross/ruby/rubyinterpreter.cpp') diff --git a/lib/kross/ruby/rubyinterpreter.cpp b/lib/kross/ruby/rubyinterpreter.cpp index 805ae722a..d1fbec012 100644 --- a/lib/kross/ruby/rubyinterpreter.cpp +++ b/lib/kross/ruby/rubyinterpreter.cpp @@ -20,7 +20,7 @@ #include -#include +#include #include #include @@ -61,7 +61,7 @@ extern "C" namespace Kross { namespace Ruby { -typedef std::map mStrVALUE; +typedef std::map mStrVALUE; typedef mStrVALUE::iterator mStrVALUE_it; typedef mStrVALUE::const_iterator mStrVALUE_cit; class RubyInterpreterPrivate { @@ -119,11 +119,11 @@ VALUE RubyInterpreter::require (VALUE obj, VALUE name) #ifdef KROSS_RUBY_INTERPRETER_DEBUG krossdebug("RubyInterpreter::require(obj,name)"); #endif - QString modname = StringValuePtr(name); + TQString modname = StringValuePtr(name); if(modname.startsWith("kross")) { - krossdebug( QString("RubyInterpreter::require() module=%1").arg(modname) ); - if( modname.find( QRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) { - krosswarning( QString("Denied import of Kross module '%1' cause of untrusted chars.").arg(modname) ); + krossdebug( TQString("RubyInterpreter::require() module=%1").tqarg(modname) ); + if( modname.tqfind( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) { + 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( QString("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); -- cgit v1.2.3