summaryrefslogtreecommitdiffstats
path: root/lib/kross/python/pythonobject.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/kross/python/pythonobject.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-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/python/pythonobject.cpp')
-rw-r--r--lib/kross/python/pythonobject.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/kross/python/pythonobject.cpp b/lib/kross/python/pythonobject.cpp
index d59087b3e..f765cbbd5 100644
--- a/lib/kross/python/pythonobject.cpp
+++ b/lib/kross/python/pythonobject.cpp
@@ -26,7 +26,7 @@ PythonObject::PythonObject(const Py::Object& object)
: Kross::Api::Object()
, m_pyobject(object)
{
- krossdebug( QString("PythonObject::PythonObject() constructor") );
+ krossdebug( TQString("PythonObject::PythonObject() constructor") );
Py::List x( object.dir() );
for(Py::Sequence::iterator i= x.begin(); i != x.end(); ++i) {
@@ -37,7 +37,7 @@ PythonObject::PythonObject(const Py::Object& object)
//if(! m_pyobject.hasAttr( (*i).str() )) continue;
Py::Object o = m_pyobject.getAttr(s);
- QString t;
+ TQString t;
if(o.isCallable()) t += "isCallable ";
if(o.isDict()) t += "isDict ";
if(o.isList()) t += "isList ";
@@ -46,7 +46,7 @@ PythonObject::PythonObject(const Py::Object& object)
if(o.isSequence()) t += "isSequence ";
if(o.isTrue()) t += "isTrue ";
if(o.isInstance()) t += "isInstance ";
- krossdebug( QString("PythonObject::PythonObject() method '%1' (%2)").arg( (*i).str().as_string().c_str() ).arg(t) );
+ krossdebug( TQString("PythonObject::PythonObject() method '%1' (%2)").tqarg( (*i).str().as_string().c_str() ).tqarg(t) );
if(o.isCallable())
m_calls.append( (*i).str().as_string().c_str() );
@@ -57,26 +57,26 @@ PythonObject::~PythonObject()
{
}
-const QString PythonObject::getClassName() const
+const TQString PythonObject::getClassName() const
{
return "Kross::Python::PythonObject";
}
-Kross::Api::Object::Ptr PythonObject::call(const QString& name, Kross::Api::List::Ptr arguments)
+Kross::Api::Object::Ptr PythonObject::call(const TQString& name, Kross::Api::List::Ptr arguments)
{
- krossdebug( QString("PythonObject::call(%1)").arg(name) );
+ krossdebug( TQString("PythonObject::call(%1)").tqarg(name) );
if(m_pyobject.isInstance()) {
- //if(! m_calls.contains(n)) throw ...
+ //if(! m_calls.tqcontains(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 !!!
Py::Object errobj = Py::value(Py::Exception()); // get last error
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Failed to call method '%1': %2").arg(name).arg(errobj.as_string().c_str())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to call method '%1': %2").tqarg(name).tqarg(errobj.as_string().c_str())) );
}
Py::Object result(r, true);
- //krossdebug( QString("PythonObject::call(%1) call return value = '%2'").arg(name).arg(result.as_string().c_str()) );
+ //krossdebug( TQString("PythonObject::call(%1) call return value = '%2'").tqarg(name).tqarg(result.as_string().c_str()) );
return PythonExtension::toObject(result);
}
/*TODO??? ELSE create class instance for class-definitions???
@@ -87,7 +87,7 @@ Kross::Api::Object::Ptr PythonObject::call(const QString& name, Kross::Api::List
return Kross::Api::Object::call(name, arguments);
}
-QStringList PythonObject::getCalls()
+TQStringList PythonObject::getCalls()
{
return m_calls;
}