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/python | |
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/python')
-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 |
5 files changed, 6 insertions, 6 deletions
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): |