summaryrefslogtreecommitdiffstats
path: root/dcoppython/shell/pcop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dcoppython/shell/pcop.cpp')
-rw-r--r--dcoppython/shell/pcop.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/dcoppython/shell/pcop.cpp b/dcoppython/shell/pcop.cpp
index d7c4adc6..4989d863 100644
--- a/dcoppython/shell/pcop.cpp
+++ b/dcoppython/shell/pcop.cpp
@@ -13,12 +13,12 @@
#include <kdebug.h>
-#include <qapplication.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
+#include <tqapplication.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
#include <dcopclient.h>
@@ -36,7 +36,7 @@ namespace PythonDCOP {
}
PCOPObject::PCOPObject(PyObject *py_obj, const char *objid) :
- DCOPObject(QCString(objid)), m_py_obj(py_obj)
+ DCOPObject(TQCString(objid)), m_py_obj(py_obj)
{
m_methods.setAutoDelete(true);
}
@@ -45,8 +45,8 @@ namespace PythonDCOP {
{
}
- bool PCOPObject::process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+ bool PCOPObject::process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
bool result = py_process(fun,data,replyType,replyData);
if (PyErr_Occurred()) {
@@ -59,8 +59,8 @@ namespace PythonDCOP {
return result;
}
- bool PCOPObject::py_process(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData)
+ bool PCOPObject::py_process(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData)
{
kdDebug(70001) << "PCOPObject::process - fun=" << fun << " replyType=" << replyType << endl;
@@ -79,7 +79,7 @@ namespace PythonDCOP {
// return false;
// }
- QDataStream str_arg(data, IO_ReadOnly);
+ TQDataStream str_arg(data, IO_ReadOnly);
PyObject *args = PyTuple_New( meth->paramCount() );
for(int c=0;c<meth->paramCount();c++) {
kdDebug(70001) << "Demarshalling type: " << meth->param(c)->signature() << endl;
@@ -118,7 +118,7 @@ namespace PythonDCOP {
replyType = meth->type()->signature();
PCOPType repl(replyType);
if (repl.isMarshallable(result)) {
- QDataStream str_repl(replyData, IO_WriteOnly);
+ TQDataStream str_repl(replyData, IO_WriteOnly);
repl.marshal(result,str_repl);
Py_DECREF(result);
return true;
@@ -139,15 +139,15 @@ namespace PythonDCOP {
}
- bool PCOPObject::setMethodList(QAsciiDict<PyObject> meth_list) {
+ bool PCOPObject::setMethodList(TQAsciiDict<PyObject> meth_list) {
bool ok = true;
- for(QAsciiDictIterator<PyObject> it(meth_list);
+ for(TQAsciiDictIterator<PyObject> it(meth_list);
it.current(); ++it) {
PCOPMethod *meth = NULL;
if (ok) {
- meth = new PCOPMethod(QCString(it.currentKey()));
+ meth = new PCOPMethod(TQCString(it.currentKey()));
if (!meth || !meth->setPythonMethod(it.current())) {
if (meth) delete meth;
@@ -167,10 +167,10 @@ namespace PythonDCOP {
QCStringList PCOPObject::functions() {
QCStringList funcs = DCOPObject::functions();
- for(QAsciiDictIterator<PCOPMethod> it(m_methods);
+ for(TQAsciiDictIterator<PCOPMethod> it(m_methods);
it.current(); ++it) {
PCOPMethod *meth = it.current();
- QCString func = meth->type()->signature();
+ TQCString func = meth->type()->signature();
func += ' ';
func += meth->signature();
funcs << func;
@@ -184,7 +184,7 @@ namespace PythonDCOP {
PyObject *PCOPObject::methodList() {
PyObject *result = PyList_New(m_methods.count());
int c=0;
- for(QAsciiDictIterator<PCOPMethod> it(m_methods);
+ for(TQAsciiDictIterator<PCOPMethod> it(m_methods);
it.current(); ++it, ++c) {
PyObject *tuple = PyTuple_New(2);
PyList_SetItem(result, c, tuple);
@@ -194,12 +194,12 @@ namespace PythonDCOP {
return result;
}
- PCOPMethod *PCOPObject::matchMethod(const QCString &fun) {
+ PCOPMethod *PCOPObject::matchMethod(const TQCString &fun) {
return m_methods.find(fun);
}
- PCOPType::PCOPType( const QCString& type )
+ PCOPType::PCOPType( const TQCString& type )
{
m_leftType = NULL;
m_rightType = NULL;
@@ -236,9 +236,9 @@ namespace PythonDCOP {
if (m_rightType) delete m_rightType;
}
- QCString PCOPType::signature() const
+ TQCString PCOPType::signature() const
{
- QCString str = m_type;
+ TQCString str = m_type;
if ( m_leftType )
{
str += "<";
@@ -256,7 +256,7 @@ namespace PythonDCOP {
return str;
}
- bool PCOPType::marshal( PyObject* obj, QDataStream& str ) const
+ bool PCOPType::marshal( PyObject* obj, TQDataStream& str ) const
{
return Marshaller::instance()->marshal(*this, obj, str);
}
@@ -266,12 +266,12 @@ namespace PythonDCOP {
return Marshaller::instance()->canMarshal(*this, obj);
}
- PyObject* PCOPType::demarshal( QDataStream& str ) const
+ PyObject* PCOPType::demarshal( TQDataStream& str ) const
{
return Marshaller::instance()->demarshal(*this, str);
}
- PCOPMethod::PCOPMethod( const QCString& signature ) :
+ PCOPMethod::PCOPMethod( const TQCString& signature ) :
m_py_method(NULL)
{
@@ -298,7 +298,7 @@ namespace PythonDCOP {
m_name = signature.mid( k + 1, i - k - 1 );
// Strip the parameters
- QCString p = signature.mid( i + 1, j - i - 1 ).stripWhiteSpace();
+ TQCString p = signature.mid( i + 1, j - i - 1 ).stripWhiteSpace();
if ( !p.isEmpty() ) {
// Make the algorithm terminate
@@ -401,12 +401,12 @@ namespace PythonDCOP {
{
}
- const PCOPMethod* PCOPClass::method( const QCString &name, PyObject *argTuple )
+ const PCOPMethod* PCOPClass::method( const TQCString &name, PyObject *argTuple )
{
if ( !argTuple )
return m_methods[ name ];
- QAsciiDictIterator<PCOPMethod> it( m_methods );
+ TQAsciiDictIterator<PCOPMethod> it( m_methods );
for (; it.current(); ++it )
if ( it.currentKey() == name &&
it.current()->paramCount() == PyTuple_Size( argTuple ) )
@@ -440,7 +440,7 @@ namespace PythonDCOP {
ImportedModules::setInstance( new ImportedModules );
int argc = 0;
char **argv = NULL;
- m_qapp = new QApplication(argc,argv,false);
+ m_qapp = new TQApplication(argc,argv,false);
}
Client::~Client()
@@ -488,14 +488,14 @@ namespace PythonDCOP {
if ( !PyTuple_Check( tuple ) )
return NULL;
- QByteArray replyData;
- QCString replyType;
- QByteArray data;
- QDataStream params( data, IO_WriteOnly );
+ TQByteArray replyData;
+ TQCString replyType;
+ TQByteArray data;
+ TQDataStream params( data, IO_WriteOnly );
- QCString appname( arg1 );
- QCString objname( arg2 );
- QCString funcname( arg3 );
+ TQCString appname( arg1 );
+ TQCString objname( arg2 );
+ TQCString funcname( arg3 );
//
// Remove escape characters
@@ -538,7 +538,7 @@ namespace PythonDCOP {
return NULL;
}
- QCString signature = m->signature();
+ TQCString signature = m->signature();
kdDebug(70001) << "The signature is " << signature.data() << endl;
kdDebug(70001) << "The method takes " << m->paramCount() << " parameters" << endl;
@@ -578,7 +578,7 @@ namespace PythonDCOP {
//
// ### Check wether that was sane
PCOPType type( replyType );
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
return type.demarshal( reply );
}
@@ -601,7 +601,7 @@ namespace PythonDCOP {
PyObject *object_list( PyObject */*self*/, PyObject *args) {
const char *app;
if (PyArg_ParseTuple(args, (char*)"s", &app)) {
- QCStringList objects = Client::instance()->dcop()->remoteObjects(QCString(app));
+ QCStringList objects = Client::instance()->dcop()->remoteObjects(TQCString(app));
return make_py_list(objects);
}
return NULL;
@@ -610,7 +610,7 @@ namespace PythonDCOP {
PyObject *method_list( PyObject */*self*/, PyObject *args) {
const char *app, *obj;
if (PyArg_ParseTuple(args, (char*)"ss", &app, &obj)) {
- QCStringList methods = Client::instance()->dcop()->remoteFunctions(QCString(app), QCString(obj) );
+ QCStringList methods = Client::instance()->dcop()->remoteFunctions(TQCString(app), TQCString(obj) );
return make_py_list(methods);
}
return NULL;
@@ -620,7 +620,7 @@ namespace PythonDCOP {
const char *appid;
int add_pid = 1;
if (PyArg_ParseTuple(args, (char*)"s|i", &appid, &add_pid)) {
- QCString actual_appid = Client::instance()->dcop()->registerAs(QCString(appid), add_pid!=0);
+ TQCString actual_appid = Client::instance()->dcop()->registerAs(TQCString(appid), add_pid!=0);
return PyString_FromString(actual_appid.data());
}
return NULL;
@@ -650,7 +650,7 @@ namespace PythonDCOP {
PyList_Check(method_list)) {
// extract each tuple from the list, aborting if any is invalid
- QAsciiDict<PyObject> meth_list;
+ TQAsciiDict<PyObject> meth_list;
int size = PyList_Size(method_list);
for(int c=0;c<size;c++) {
PyObject *tuple = PyList_GetItem(method_list,c);
@@ -692,7 +692,7 @@ namespace PythonDCOP {
int volint = 0;
if (PyArg_ParseTuple(args, (char*)"sssss|i", &sender, &senderObj, &signal, &receiverObj, &slot, &volint)) {
- bool success = Client::instance()->dcop()->connectDCOPSignal(QCString(sender), QCString(senderObj), QCString(signal), QCString(receiverObj), QCString(slot), (volint == 1)?true:false);
+ bool success = Client::instance()->dcop()->connectDCOPSignal(TQCString(sender), TQCString(senderObj), TQCString(signal), TQCString(receiverObj), TQCString(slot), (volint == 1)?true:false);
return Py_BuildValue("i", success?1:0);
}
return NULL;
@@ -706,7 +706,7 @@ namespace PythonDCOP {
const char *slot;
if (PyArg_ParseTuple(args, (char*)"sssss", &sender, &senderObj, &signal, &receiverObj, &slot)) {
- bool success = Client::instance()->dcop()->disconnectDCOPSignal(QCString(sender), QCString(senderObj), QCString(signal), QCString(receiverObj), QCString(slot));
+ bool success = Client::instance()->dcop()->disconnectDCOPSignal(TQCString(sender), TQCString(senderObj), TQCString(signal), TQCString(receiverObj), TQCString(slot));
return Py_BuildValue("i", success?1:0);
}
return NULL;