diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kross/ruby/rubyinterpreter.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
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
Diffstat (limited to 'lib/kross/ruby/rubyinterpreter.cpp')
-rw-r--r-- | lib/kross/ruby/rubyinterpreter.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/kross/ruby/rubyinterpreter.cpp b/lib/kross/ruby/rubyinterpreter.cpp index 805ae722..d1fbec01 100644 --- a/lib/kross/ruby/rubyinterpreter.cpp +++ b/lib/kross/ruby/rubyinterpreter.cpp @@ -20,7 +20,7 @@ #include <map> -#include <qregexp.h> +#include <tqregexp.h> #include <ksharedptr.h> #include <api/exception.h> @@ -61,7 +61,7 @@ extern "C" namespace Kross { namespace Ruby { -typedef std::map<QString, VALUE> mStrVALUE; +typedef std::map<TQString, VALUE> 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); |