From 94844816550ad672ccfcdc25659c625546239998 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:32:11 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- lib/kross/python/pythonsecurity.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/kross/python/pythonsecurity.cpp') diff --git a/lib/kross/python/pythonsecurity.cpp b/lib/kross/python/pythonsecurity.cpp index 941ed0c6..9a7712cb 100644 --- a/lib/kross/python/pythonsecurity.cpp +++ b/lib/kross/python/pythonsecurity.cpp @@ -90,7 +90,7 @@ void PythonSecurity::initRestrictedPython() catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); e.clear(); - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize PythonSecurity module: %1").tqarg(err) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize PythonSecurity module: %1").arg(err) ) ); } } @@ -115,12 +115,12 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr PyObject* func = PyDict_GetItemString(m_pymodule->getDict().ptr(), "compile_restricted"); if(! func) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").tqarg("compile_restricted")) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").arg("compile_restricted")) ); Py::Callable funcobject(func, true); // the funcobject takes care of freeing our func pyobject. if(! funcobject.isCallable()) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' is not callable.").tqarg("compile_restricted")) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' is not callable.").arg("compile_restricted")) ); Py::Tuple args(3); args[0] = Py::String(source.utf8()); @@ -140,17 +140,17 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr /* Py::List ml = mainmoduledict; for(Py::List::size_type mi = 0; mi < ml.length(); ++mi) { - krossdebug( TQString("dir() = %1").tqarg( ml[mi].str().as_string().c_str() ) ); - //krossdebug( TQString("dir().dir() = %1").tqarg( Py::Object(ml[mi]).dir().as_string().c_str() ) ); + krossdebug( TQString("dir() = %1").arg( ml[mi].str().as_string().c_str() ) ); + //krossdebug( TQString("dir().dir() = %1").arg( Py::Object(ml[mi]).dir().as_string().c_str() ) ); } */ Py::Object code(pycode); - krossdebug( TQString("%1 callable=%2").tqarg(code.as_string().c_str()).tqarg(PyCallable_Check(code.ptr())) ); + krossdebug( TQString("%1 callable=%2").arg(code.as_string().c_str()).arg(PyCallable_Check(code.ptr())) ); Py::List l = code.dir(); for(Py::List::size_type i = 0; i < l.length(); ++i) { - krossdebug( TQString("dir() = %1").tqarg( l[i].str().as_string().c_str() ) ); - //krossdebug( TQString("dir().dir() = %1").tqarg( Py::Object(l[i]).dir().as_string().c_str() ) ); + krossdebug( TQString("dir() = %1").arg( l[i].str().as_string().c_str() ) ); + //krossdebug( TQString("dir().dir() = %1").arg( Py::Object(l[i]).dir().as_string().c_str() ) ); } return pycode; @@ -158,7 +158,7 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); e.clear(); - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' failed with python exception: %2").tqarg("compile_restricted").tqarg(err) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' failed with python exception: %2").arg("compile_restricted").arg(err) ) ); } } -- cgit v1.2.1