diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | b6edfe41c9395f2e20784cbf0e630af6426950a3 (patch) | |
tree | 56ed9b871d4296e6c15949c24e16420be1b28697 /lib/kross | |
parent | ef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff) | |
download | koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.tar.gz koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kross')
-rw-r--r-- | lib/kross/api/callable.cpp | 4 | ||||
-rw-r--r-- | lib/kross/api/event.h | 16 | ||||
-rw-r--r-- | lib/kross/api/eventsignal.cpp | 2 | ||||
-rw-r--r-- | lib/kross/api/eventslot.cpp | 6 | ||||
-rw-r--r-- | lib/kross/api/interpreter.cpp | 2 | ||||
-rw-r--r-- | lib/kross/api/qtobject.cpp | 16 | ||||
-rw-r--r-- | lib/kross/main/manager.cpp | 26 | ||||
-rw-r--r-- | lib/kross/main/scriptaction.h | 2 | ||||
-rw-r--r-- | lib/kross/main/scriptcontainer.cpp | 4 | ||||
-rw-r--r-- | lib/kross/main/scriptguiclient.cpp | 12 | ||||
-rw-r--r-- | lib/kross/python/pythonextension.cpp | 2 | ||||
-rw-r--r-- | lib/kross/python/pythonmodule.cpp | 2 | ||||
-rw-r--r-- | lib/kross/python/pythonobject.cpp | 2 | ||||
-rw-r--r-- | lib/kross/python/pythonscript.cpp | 4 | ||||
-rwxr-xr-x | lib/kross/python/scripts/gui.py | 2 | ||||
-rw-r--r-- | lib/kross/ruby/rubyextension.cpp | 2 | ||||
-rw-r--r-- | lib/kross/ruby/rubyinterpreter.cpp | 2 |
17 files changed, 53 insertions, 53 deletions
diff --git a/lib/kross/api/callable.cpp b/lib/kross/api/callable.cpp index a7a394ba..f095f596 100644 --- a/lib/kross/api/callable.cpp +++ b/lib/kross/api/callable.cpp @@ -47,7 +47,7 @@ const TQString Callable::getClassName() const bool Callable::hasChild(const TQString& name) const { - return m_tqchildren.tqcontains(name); + return m_tqchildren.contains(name); } Object::Ptr Callable::getChild(const TQString& name) const @@ -66,7 +66,7 @@ bool Callable::addChild(const TQString& name, Object* object) krossdebug( TQString("Kross::Api::Callable::addChild() object.name='%1' object.classname='%2'") .tqarg(name).tqarg(object->getClassName()) ); #endif - m_tqchildren.tqreplace(name, Object::Ptr(object)); + m_tqchildren.replace(name, Object::Ptr(object)); return true; } diff --git a/lib/kross/api/event.h b/lib/kross/api/event.h index e378052b..26a92117 100644 --- a/lib/kross/api/event.h +++ b/lib/kross/api/event.h @@ -97,7 +97,7 @@ namespace Kross { namespace Api { */ inline void addFunction(const TQString& name, FunctionPtr function) { - m_functions.tqreplace(name, new Function0<T>(static_cast<T*>(this), function)); + m_functions.replace(name, new Function0<T>(static_cast<T*>(this), function)); } /** @@ -114,7 +114,7 @@ namespace Kross { namespace Api { */ inline void addFunction(const TQString& name, Function* function) { - m_functions.tqreplace(name, function); + m_functions.replace(name, function); } /** @@ -124,7 +124,7 @@ namespace Kross { namespace Api { template<class RETURNOBJ, class ARG1OBJ, class ARG2OBJ, class ARG3OBJ, class ARG4OBJ, class INSTANCE, typename METHOD> inline void addFunction4(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0, ARG3OBJ* arg3 = 0, ARG4OBJ* arg4 = 0) { - m_functions.tqreplace(name, + m_functions.replace(name, new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ, ARG2OBJ, ARG3OBJ, ARG4OBJ> (instance, method, arg1, arg2, arg3, arg4) ); @@ -134,7 +134,7 @@ namespace Kross { namespace Api { template<class RETURNOBJ, class ARG1OBJ, class ARG2OBJ, class ARG3OBJ, class INSTANCE, typename METHOD> inline void addFunction3(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0, ARG3OBJ* arg3 = 0) { - m_functions.tqreplace(name, + m_functions.replace(name, new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ, ARG2OBJ, ARG3OBJ> (instance, method, arg1, arg2, arg3) ); @@ -144,7 +144,7 @@ namespace Kross { namespace Api { template<class RETURNOBJ, class ARG1OBJ, class ARG2OBJ, class INSTANCE, typename METHOD> inline void addFunction2(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0, ARG2OBJ* arg2 = 0) { - m_functions.tqreplace(name, + m_functions.replace(name, new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ, ARG2OBJ> (instance, method, arg1, arg2) ); @@ -154,7 +154,7 @@ namespace Kross { namespace Api { template<class RETURNOBJ, class ARG1OBJ, class INSTANCE, typename METHOD> inline void addFunction1(const TQString& name, INSTANCE* instance, METHOD method, ARG1OBJ* arg1 = 0) { - m_functions.tqreplace(name, + m_functions.replace(name, new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ, ARG1OBJ> (instance, method, arg1) ); @@ -164,7 +164,7 @@ namespace Kross { namespace Api { template<class RETURNOBJ, class INSTANCE, typename METHOD> inline void addFunction0(const TQString& name, INSTANCE* instance, METHOD method) { - m_functions.tqreplace(name, + m_functions.replace(name, new Kross::Api::ProxyFunction<INSTANCE, METHOD, RETURNOBJ> (instance, method) ); @@ -177,7 +177,7 @@ namespace Kross { namespace Api { */ bool isAFunction(const TQString & name) const { - return m_functions.tqcontains(name); + return m_functions.contains(name); } /** diff --git a/lib/kross/api/eventsignal.cpp b/lib/kross/api/eventsignal.cpp index c3e94620..e3a8e54f 100644 --- a/lib/kross/api/eventsignal.cpp +++ b/lib/kross/api/eventsignal.cpp @@ -54,7 +54,7 @@ Object::Ptr EventSignal::call(const TQString& /*name*/, KSharedPtr<List> argumen if(n.startsWith("2")) // Remove prefix of SIGNAL-macros n.remove(0,1); - int signalid = m_sender->tqmetaObject()->tqfindSignal(n.latin1(), false); + int signalid = m_sender->tqmetaObject()->findSignal(n.latin1(), false); if(signalid < 0) throw new Exception(TQString("No such signal '%1'.").tqarg(n)); diff --git a/lib/kross/api/eventslot.cpp b/lib/kross/api/eventslot.cpp index fed92ea0..fd566d31 100644 --- a/lib/kross/api/eventslot.cpp +++ b/lib/kross/api/eventslot.cpp @@ -54,7 +54,7 @@ Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments) if(n.startsWith("1")) // Remove prefix of SLOT-macros n.remove(0,1); - int slotid = m_receiver->tqmetaObject()->tqfindSlot(n.latin1(), false); + int slotid = m_receiver->tqmetaObject()->findSlot(n.latin1(), false); if(slotid < 0) throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(n)) ); @@ -69,8 +69,8 @@ Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments) TQCString EventSlot::getSlot(const TQCString& signal) { TQString signature = TQString(signal).mid(1); - int startpos = signature.tqfind("("); - int endpos = signature.tqfindRev(")"); + int startpos = signature.find("("); + int endpos = signature.findRev(")"); if(startpos < 0 || startpos > endpos) { krosswarning( TQString("EventSlot::getSlot(%1) Invalid signal.").tqarg(signal) ); return TQCString(); diff --git a/lib/kross/api/interpreter.cpp b/lib/kross/api/interpreter.cpp index c6796e1f..8d266930 100644 --- a/lib/kross/api/interpreter.cpp +++ b/lib/kross/api/interpreter.cpp @@ -71,7 +71,7 @@ const TQStringList InterpreterInfo::getMimeTypes() bool InterpreterInfo::hasOption(const TQString& key) { - return m_options.tqcontains(key); + return m_options.contains(key); } InterpreterInfo::Option* InterpreterInfo::getOption(const TQString name) diff --git a/lib/kross/api/qtobject.cpp b/lib/kross/api/qtobject.cpp index 2aa8f408..243f0503 100644 --- a/lib/kross/api/qtobject.cpp +++ b/lib/kross/api/qtobject.cpp @@ -90,8 +90,8 @@ TQObject* QtObject::getObject() TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments) { - int startpos = signature.tqfind("("); - int endpos = signature.tqfindRev(")"); + int startpos = signature.find("("); + int endpos = signature.findRev(")"); if(startpos < 0 || startpos > endpos) throw Exception::Ptr( new Exception(TQString("Invalid TQt signal or slot signature '%1'").tqarg(signature)) ); @@ -112,7 +112,7 @@ TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments) // Fill parameters. uint argcount = arguments ? arguments->count() : 0; for(uint i = 0; i < paramcount; i++) { - if(paramlist[i].tqfind(TQSTRING_OBJECT_NAME_STRING) >= 0) { + if(paramlist[i].find(TQSTRING_OBJECT_NAME_STRING) >= 0) { const TQString s = (argcount > i) ? Variant::toString(arguments->item(i)) : TQString(); //krossdebug(TQString("EventSlot::toTQUObject s=%1").tqarg(s)); static_TQUType_TQString.set( &(uo[i + 1]), s ); @@ -135,7 +135,7 @@ Kross::Api::Object::Ptr QtObject::propertyNames(Kross::Api::List::Ptr) Kross::Api::Object::Ptr QtObject::hasProperty(Kross::Api::List::Ptr args) { return new Kross::Api::Variant( - m_object->tqmetaObject()->tqfindProperty(Kross::Api::Variant::toString(args->item(0)).latin1(), false)); + m_object->tqmetaObject()->findProperty(Kross::Api::Variant::toString(args->item(0)).latin1(), false)); } Kross::Api::Object::Ptr QtObject::getProperty(Kross::Api::List::Ptr args) @@ -164,7 +164,7 @@ Kross::Api::Object::Ptr QtObject::slotNames(Kross::Api::List::Ptr) Kross::Api::Object::Ptr QtObject::hasSlot(Kross::Api::List::Ptr args) { return new Kross::Api::Variant( - bool(m_object->tqmetaObject()->slotNames(false).tqfind( + bool(m_object->tqmetaObject()->slotNames(false).find( Kross::Api::Variant::toString(args->item(0)).latin1() ) != -1)); } @@ -173,7 +173,7 @@ Kross::Api::Object::Ptr QtObject::callSlot(Kross::Api::List::Ptr args) { //TODO just call the child event ?! TQString name = Kross::Api::Variant::toString(args->item(0)); - int slotid = m_object->tqmetaObject()->tqfindSlot(name.latin1(), false); + int slotid = m_object->tqmetaObject()->findSlot(name.latin1(), false); if(slotid < 0) throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(name)) ); @@ -193,7 +193,7 @@ Kross::Api::Object::Ptr QtObject::signalNames(Kross::Api::List::Ptr) Kross::Api::Object::Ptr QtObject::hasSignal(Kross::Api::List::Ptr args) { return new Kross::Api::Variant( - bool(m_object->tqmetaObject()->signalNames(false).tqfind( + bool(m_object->tqmetaObject()->signalNames(false).find( Kross::Api::Variant::toString(args->item(0)).latin1() ) != -1)); } @@ -201,7 +201,7 @@ Kross::Api::Object::Ptr QtObject::hasSignal(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr QtObject::emitSignal(Kross::Api::List::Ptr args) { TQString name = Kross::Api::Variant::toString(args->item(0)); - int signalid = m_object->tqmetaObject()->tqfindSignal(name.latin1(), false); + int signalid = m_object->tqmetaObject()->findSignal(name.latin1(), false); if(signalid < 0) throw Exception::Ptr( new Exception(TQString("No such signal '%1'.").tqarg(name)) ); m_object->qt_invoke(signalid, 0); //TODO convert Kross::Api::List::Ptr => TQUObject* 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; diff --git a/lib/kross/main/scriptaction.h b/lib/kross/main/scriptaction.h index 27f910d0..4b78d611 100644 --- a/lib/kross/main/scriptaction.h +++ b/lib/kross/main/scriptaction.h @@ -174,7 +174,7 @@ namespace Kross { namespace Api { /** * This signal got emitted after the try to execute this - * \a ScriptAction failed. The \p errormessage tqcontains + * \a ScriptAction failed. The \p errormessage contains * the error message. */ void failed(const TQString& errormessage, const TQString& tracedetails); diff --git a/lib/kross/main/scriptcontainer.cpp b/lib/kross/main/scriptcontainer.cpp index 5acde9db..a345dd02 100644 --- a/lib/kross/main/scriptcontainer.cpp +++ b/lib/kross/main/scriptcontainer.cpp @@ -151,7 +151,7 @@ TQMap<TQString, TQVariant>& ScriptContainer::getOptions() TQVariant ScriptContainer::getOption(const TQString name, TQVariant defaultvalue, bool /*recursive*/) { - if(d->options.tqcontains(name)) + if(d->options.contains(name)) return d->options[name]; Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo( d->interpretername ); return info ? info->getOptionValue(name, defaultvalue) : defaultvalue; @@ -162,7 +162,7 @@ bool ScriptContainer::setOption(const TQString name, const TQVariant& value) Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo( d->interpretername ); if(info) { if(info->hasOption(name)) { - d->options.tqreplace(name, value); + d->options.replace(name, value); return true; } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such option").tqarg(name).tqarg(value.toString()) ); } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such interpreterinfo").tqarg(name).tqarg(value.toString()) ); diff --git a/lib/kross/main/scriptguiclient.cpp b/lib/kross/main/scriptguiclient.cpp index 36d81151..ebcf0b00 100644 --- a/lib/kross/main/scriptguiclient.cpp +++ b/lib/kross/main/scriptguiclient.cpp @@ -82,11 +82,11 @@ ScriptGUIClient::ScriptGUIClient(KXMLGUIClient* guiclient, TQWidget* tqparent) new KAction(i18n("Scripts Manager..."), 0, 0, this, TQT_SLOT(showScriptManager()), actionCollection(), "configurescripts"); // The predefined ScriptActionCollection's this ScriptGUIClient provides. - d->collections.tqreplace("installedscripts", + d->collections.replace("installedscripts", new ScriptActionCollection(i18n("Scripts"), actionCollection(), "installedscripts") ); - d->collections.tqreplace("loadedscripts", + d->collections.replace("loadedscripts", new ScriptActionCollection(i18n("Loaded"), actionCollection(), "loadedscripts") ); - d->collections.tqreplace("executedscripts", + d->collections.replace("executedscripts", new ScriptActionCollection(i18n("History"), actionCollection(), "executedscripts") ); reloadInstalledScripts(); @@ -102,7 +102,7 @@ ScriptGUIClient::~ScriptGUIClient() bool ScriptGUIClient::hasActionCollection(const TQString& name) { - return d->collections.tqcontains(name); + return d->collections.contains(name); } ScriptActionCollection* ScriptGUIClient::getActionCollection(const TQString& name) @@ -118,12 +118,12 @@ TQMap<TQString, ScriptActionCollection*> ScriptGUIClient::getActionCollections() void ScriptGUIClient::addActionCollection(const TQString& name, ScriptActionCollection* collection) { removeActionCollection(name); - d->collections.tqreplace(name, collection); + d->collections.replace(name, collection); } bool ScriptGUIClient::removeActionCollection(const TQString& name) { - if(d->collections.tqcontains(name)) { + if(d->collections.contains(name)) { ScriptActionCollection* c = d->collections[name]; d->collections.remove(name); delete c; diff --git a/lib/kross/python/pythonextension.cpp b/lib/kross/python/pythonextension.cpp index aab781ab..f13cf93a 100644 --- a/lib/kross/python/pythonextension.cpp +++ b/lib/kross/python/pythonextension.cpp @@ -177,7 +177,7 @@ Kross::Api::Dict::Ptr PythonExtension::toObject(const Py::Dict& dict) uint length = l.length(); for(Py::List::size_type i = 0; i < length; ++i) { const char* n = l[i].str().as_string().c_str(); - map.tqreplace(n, toObject( dict[n] )); + map.replace(n, toObject( dict[n] )); } return new Kross::Api::Dict(map); } diff --git a/lib/kross/python/pythonmodule.cpp b/lib/kross/python/pythonmodule.cpp index 9c3353ea..24b43159 100644 --- a/lib/kross/python/pythonmodule.cpp +++ b/lib/kross/python/pythonmodule.cpp @@ -84,7 +84,7 @@ Py::Object PythonModule::import(const Py::Tuple& args) #ifdef KROSS_PYTHON_MODULE_DEBUG krossdebug( TQString("Kross::Python::PythonModule::import() module=%1").tqarg(modname) ); #endif - if( modname.tqfind( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) { + if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) { krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) ); } else { diff --git a/lib/kross/python/pythonobject.cpp b/lib/kross/python/pythonobject.cpp index f765cbbd..9689d222 100644 --- a/lib/kross/python/pythonobject.cpp +++ b/lib/kross/python/pythonobject.cpp @@ -67,7 +67,7 @@ Kross::Api::Object::Ptr PythonObject::call(const TQString& name, Kross::Api::Lis krossdebug( TQString("PythonObject::call(%1)").tqarg(name) ); if(m_pyobject.isInstance()) { - //if(! m_calls.tqcontains(n)) throw ... + //if(! m_calls.contains(n)) throw ... PyObject* r = PyObject_CallMethod(m_pyobject.ptr(), (char*) name.latin1(), 0); if(! r) { //FIXME happens too if e.g. number of arguments doesn't match !!! diff --git a/lib/kross/python/pythonscript.cpp b/lib/kross/python/pythonscript.cpp index 4bf37c74..7d34a6fb 100644 --- a/lib/kross/python/pythonscript.cpp +++ b/lib/kross/python/pythonscript.cpp @@ -386,7 +386,7 @@ Kross::Api::Object::Ptr PythonScript::callFunction(const TQString& name, Kross:: // Try to determinate the function we like to execute. PyObject* func = PyDict_GetItemString(moduledict.ptr(), name.latin1()); - if( (! d->m_functions.tqcontains(name)) || (! func) ) + if( (! d->m_functions.contains(name)) || (! func) ) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").tqarg(name)) ); Py::Callable funcobject(func, true); // the funcobject takes care of freeing our func pyobject. @@ -432,7 +432,7 @@ Kross::Api::Object::Ptr PythonScript::classInstance(const TQString& name) // Try to determinate the class. PyObject* pyclass = PyDict_GetItemString(moduledict.ptr(), name.latin1()); - if( (! d->m_classes.tqcontains(name)) || (! pyclass) ) + if( (! d->m_classes.contains(name)) || (! pyclass) ) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such class '%1'.").tqarg(name)) ); PyObject *pyobj = PyInstance_New(pyclass, 0, 0);//aclarg, 0); diff --git a/lib/kross/python/scripts/gui.py b/lib/kross/python/scripts/gui.py index 89a07066..997e9849 100755 --- a/lib/kross/python/scripts/gui.py +++ b/lib/kross/python/scripts/gui.py @@ -197,7 +197,7 @@ class QtDialog: class Label(qt.QLabel): def __init__(self, dialog, tqparent, caption): qt.QLabel.__init__(self, tqparent) - self.setText("<qt>%s</qt>" % caption.tqreplace("\n","<br>")) + self.setText("<qt>%s</qt>" % caption.replace("\n","<br>")) class Frame(qt.QHBox): def __init__(self, dialog, tqparent): diff --git a/lib/kross/ruby/rubyextension.cpp b/lib/kross/ruby/rubyextension.cpp index c989976d..6c2cb40f 100644 --- a/lib/kross/ruby/rubyextension.cpp +++ b/lib/kross/ruby/rubyextension.cpp @@ -141,7 +141,7 @@ int RubyExtension::convertHash_i(VALUE key, VALUE value, VALUE vmap) if (key != Qundef) { Kross::Api::Object::Ptr o = RubyExtension::toObject( value ); - if(o) map->tqreplace(STR2CSTR(key), o); + if(o) map->replace(STR2CSTR(key), o); } return ST_CONTINUE; } diff --git a/lib/kross/ruby/rubyinterpreter.cpp b/lib/kross/ruby/rubyinterpreter.cpp index d1fbec01..4a4df32f 100644 --- a/lib/kross/ruby/rubyinterpreter.cpp +++ b/lib/kross/ruby/rubyinterpreter.cpp @@ -122,7 +122,7 @@ VALUE RubyInterpreter::require (VALUE obj, VALUE name) TQString modname = StringValuePtr(name); if(modname.startsWith("kross")) { krossdebug( TQString("RubyInterpreter::require() module=%1").tqarg(modname) ); - if( modname.tqfind( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) { + if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) { krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) ); } else { |