diff options
Diffstat (limited to 'lib/kross/main/manager.cpp')
-rw-r--r-- | lib/kross/main/manager.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/kross/main/manager.cpp b/lib/kross/main/manager.cpp index b966a1cc..646a8746 100644 --- a/lib/kross/main/manager.cpp +++ b/lib/kross/main/manager.cpp @@ -83,10 +83,10 @@ Manager::Manager() TQString pythonlib = TQFile::encodeName( KLibLoader::self()->findLibrary(KROSS_PYTHON_LIBRARY) ); if(! pythonlib.isEmpty()) { // If the Kross Python plugin exists we offer it as supported scripting language. InterpreterInfo::Option::Map pythonoptions; - pythonoptions.tqreplace("restricted", + pythonoptions.replace("restricted", new InterpreterInfo::Option("Restricted", "Restricted Python interpreter", TQVariant(false,0)) ); - d->interpreterinfos.tqreplace("python", + d->interpreterinfos.replace("python", new InterpreterInfo("python", pythonlib, // library "*.py", // file filter-wildcard @@ -100,10 +100,10 @@ Manager::Manager() TQString rubylib = TQFile::encodeName( KLibLoader::self()->findLibrary(KROSS_RUBY_LIBRARY) ); if(! rubylib.isEmpty()) { // If the Kross Ruby plugin exists we offer it as supported scripting language. InterpreterInfo::Option::Map rubyoptions; - rubyoptions.tqreplace("safelevel", + rubyoptions.replace("safelevel", new InterpreterInfo::Option("safelevel", "Level of safety of the Ruby interpreter", TQVariant(0)) // 0 -> unsafe, 4 -> very safe ); - d->interpreterinfos.tqreplace("ruby", + d->interpreterinfos.replace("ruby", new InterpreterInfo("ruby", rubylib, // library "*.rb", // file filter-wildcard @@ -131,7 +131,7 @@ TQMap<TQString, InterpreterInfo*> Manager::getInterpreterInfos() bool Manager::hasInterpreterInfo(const TQString& interpretername) const { - return d->interpreterinfos.tqcontains(interpretername); + return d->interpreterinfos.contains(interpretername); } InterpreterInfo* Manager::getInterpreterInfo(const TQString& interpretername) @@ -145,7 +145,7 @@ const TQString Manager::getInterpreternameForFile(const TQString& file) rx.setWildcard(true); for(TQMap<TQString, InterpreterInfo*>::Iterator it = d->interpreterinfos.begin(); it != d->interpreterinfos.end(); ++it) { rx.setPattern((*it)->getWildcard()); - if( file.tqfind(rx) >= 0 ) + if( file.find(rx) >= 0 ) return (*it)->getInterpretername(); } return TQString(); @@ -155,11 +155,11 @@ ScriptContainer::Ptr Manager::getScriptContainer(const TQString& scriptname) { //TODO at the moment we don't share ScriptContainer instances. - //if(d->m_scriptcontainers.tqcontains(scriptname)) + //if(d->m_scriptcontainers.contains(scriptname)) // return d->m_scriptcontainers[scriptname]; ScriptContainer* scriptcontainer = new ScriptContainer(scriptname); //ScriptContainer script(this, scriptname); - //d->m_scriptcontainers.tqreplace(scriptname, scriptcontainer); + //d->m_scriptcontainers.replace(scriptname, scriptcontainer); return scriptcontainer; } @@ -168,7 +168,7 @@ Interpreter* Manager::getInterpreter(const TQString& interpretername) { setException(0); // clear previous exceptions - if(! d->interpreterinfos.tqcontains(interpretername)) { + if(! d->interpreterinfos.contains(interpretername)) { setException( new Exception(i18n("No such interpreter '%1'").tqarg(interpretername)) ); return 0; } @@ -192,8 +192,8 @@ const TQStringList Manager::getInterpreters() bool Manager::addModule(Module::Ptr module) { TQString name = module->getName(); - //if( d->modules.tqcontains(name) ) return false; - d->modules.tqreplace(name, module); + //if( d->modules.contains(name) ) return false; + d->modules.replace(name, module); return true; } @@ -201,7 +201,7 @@ Module::Ptr Manager::loadModule(const TQString& modulename) { Module::Ptr module = 0; - if(d->modules.tqcontains(modulename)) { + if(d->modules.contains(modulename)) { module = d->modules[modulename]; if(module) return module; @@ -240,7 +240,7 @@ Module::Ptr Manager::loadModule(const TQString& modulename) } // Don't remember module cause we like to have freeing it handled by the caller. - //d->modules.tqreplace(modulename, module); + //d->modules.replace(modulename, module); //krossdebug( TQString("Kross::Api::Manager::loadModule modulename='%1' module='%2'").tqarg(modulename).tqarg(module->toString()) ); return module; |