summaryrefslogtreecommitdiffstats
path: root/arts/kde/mcop-dcop
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /arts/kde/mcop-dcop
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'arts/kde/mcop-dcop')
-rw-r--r--arts/kde/mcop-dcop/kmcop.cpp36
-rw-r--r--arts/kde/mcop-dcop/kmcop.h6
-rw-r--r--arts/kde/mcop-dcop/mcopdcopobject.cpp30
-rw-r--r--arts/kde/mcop-dcop/mcopdcopobject.h28
-rw-r--r--arts/kde/mcop-dcop/mcopdcoptools.h8
5 files changed, 54 insertions, 54 deletions
diff --git a/arts/kde/mcop-dcop/kmcop.cpp b/arts/kde/mcop-dcop/kmcop.cpp
index 22e19dc9d..1eb14f0f3 100644
--- a/arts/kde/mcop-dcop/kmcop.cpp
+++ b/arts/kde/mcop-dcop/kmcop.cpp
@@ -23,8 +23,8 @@
#include <klocale.h>
#include <dcopclient.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
#include <kartsdispatcher.h>
#include <soundserver.h>
@@ -43,7 +43,7 @@ class KMCOPPrivate
{
public:
MCOPInfo mcopInfo;
- QPtrList<MCOPDCOPObject> list;
+ TQPtrList<MCOPDCOPObject> list;
};
int main(int argc, char **argv)
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
return app.exec();
}
-KMCOP::KMCOP() : QObject(), DCOPObject("arts")
+KMCOP::KMCOP() : TQObject(), DCOPObject("arts")
{
d = new KMCOPPrivate();
d->mcopInfo = Reference("global:Arts_MCOPInfo");
@@ -91,10 +91,10 @@ int KMCOP::objectCount()
return d->mcopInfo.objectCount();
}
-QCString KMCOP::correctType(const QCString &str)
+TQCString KMCOP::correctType(const TQCString &str)
{
if(str == "string")
- return "QCString";
+ return "TQCString";
return str;
}
@@ -106,7 +106,7 @@ void KMCOP::addInterfacesHackHackHack()
if(!obj.isNull())
{
- QCString interfaceName = obj._interfaceName().c_str();
+ TQCString interfaceName = obj._interfaceName().c_str();
if(interfaceName != "Arts::TraderOffer")
{
@@ -121,21 +121,21 @@ void KMCOP::addInterfacesHackHackHack()
vector<MethodDef>::iterator ifaceMethodsIterator;
for(ifaceMethodsIterator = ifaceMethods.begin(); ifaceMethodsIterator != ifaceMethods.end(); ifaceMethodsIterator++)
{
- QCString function, signature;
+ TQCString function, signature;
MCOPEntryInfo *entry = new MCOPEntryInfo();
MethodDef currentMethod = *ifaceMethodsIterator;
vector<ParamDef> currentParameters = currentMethod.signature;
- QCString newType = correctType(QCString(currentMethod.type.c_str()));
+ TQCString newType = correctType(TQCString(currentMethod.type.c_str()));
entry->setFunctionType(newType);
- entry->setFunctionName(QCString(currentMethod.name.c_str()));
+ entry->setFunctionName(TQCString(currentMethod.name.c_str()));
- function = entry->functionType() + QCString(" ") + entry->functionName() + QCString("(");
+ function = entry->functionType() + TQCString(" ") + entry->functionName() + TQCString("(");
- signature = QCString("(");
+ signature = TQCString("(");
QCStringList signatureList;
@@ -145,20 +145,20 @@ void KMCOP::addInterfacesHackHackHack()
ParamDef parameter = *methodParametersIterator;
if(methodParametersIterator != currentParameters.begin())
{
- function += QCString(", ");
- signature += QCString(",");
+ function += TQCString(", ");
+ signature += TQCString(",");
}
- QCString correctParameter = correctType(QCString(parameter.type.c_str()));
+ TQCString correctParameter = correctType(TQCString(parameter.type.c_str()));
function += correctParameter;
signature += correctParameter;
- signatureList.append(QCString(parameter.type.c_str()));
+ signatureList.append(TQCString(parameter.type.c_str()));
}
- function += QCString(")");
- signature += QCString(")");
+ function += TQCString(")");
+ signature += TQCString(")");
entry->setSignature(signature);
entry->setSignatureList(signatureList);
diff --git a/arts/kde/mcop-dcop/kmcop.h b/arts/kde/mcop-dcop/kmcop.h
index c81e385ff..5ffa57bcd 100644
--- a/arts/kde/mcop-dcop/kmcop.h
+++ b/arts/kde/mcop-dcop/kmcop.h
@@ -20,13 +20,13 @@
#ifndef KMCOP_H
#define KMCOP_H
-#include <qobject.h>
+#include <tqobject.h>
#include <dcopobject.h>
class KMCOPPrivate;
-class KMCOP : public QObject,
+class KMCOP : public TQObject,
public DCOPObject
{
Q_OBJECT
@@ -41,7 +41,7 @@ k_dcop:
void addInterfacesHackHackHack();
private:
- QCString correctType(const QCString &str);
+ TQCString correctType(const TQCString &str);
KMCOPPrivate *d;
};
diff --git a/arts/kde/mcop-dcop/mcopdcopobject.cpp b/arts/kde/mcop-dcop/mcopdcopobject.cpp
index f1d1acad5..fcd5be95f 100644
--- a/arts/kde/mcop-dcop/mcopdcopobject.cpp
+++ b/arts/kde/mcop-dcop/mcopdcopobject.cpp
@@ -23,8 +23,8 @@
//#include <reference.h>
#include <dynamicrequest.h>
-#include <qmap.h>
-#include <qdatastream.h>
+#include <tqmap.h>
+#include <tqdatastream.h>
using namespace std;
@@ -34,10 +34,10 @@ using namespace std;
class MCOPDCOPObjectPrivate
{
public:
- QMap<QCString, MCOPEntryInfo *> dynamicFunctions;
+ TQMap<TQCString, MCOPEntryInfo *> dynamicFunctions;
};
-MCOPDCOPObject::MCOPDCOPObject(QCString name) : DCOPObject(name)
+MCOPDCOPObject::MCOPDCOPObject(TQCString name) : DCOPObject(name)
{
d = new MCOPDCOPObjectPrivate();
}
@@ -51,14 +51,14 @@ QCStringList MCOPDCOPObject::functionsDynamic()
{
QCStringList returnList;
- QMap<QCString, MCOPEntryInfo *>::iterator it;
+ TQMap<TQCString, MCOPEntryInfo *>::iterator it;
for(it = d->dynamicFunctions.begin(); it != d->dynamicFunctions.end(); ++it)
returnList.append(it.key());
return returnList;
}
-Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, QCString ifaceName, const QByteArray &data)
+Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, TQCString ifaceName, const TQByteArray &data)
{
Arts::Object workingObject = Arts::SubClass(string(ifaceName));
Arts::DynamicRequest request(workingObject);
@@ -71,11 +71,11 @@ Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, QCString ifaceN
QCStringList::iterator it;
for(it = list.begin(); it != list.end(); ++it)
{
- QCString param = *it;
+ TQCString param = *it;
kdDebug() << "PARAM: " << param << endl;
- QDataStream argStream(data, IO_ReadOnly);
+ TQDataStream argStream(data, IO_ReadOnly);
if(param == "long")
request.param(MCOPDCOPTools::getLong(argStream));
@@ -94,16 +94,16 @@ Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, QCString ifaceN
return newBuffer;
}
-bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData)
+bool MCOPDCOPObject::processDynamic(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData)
{
- QMap<QCString, MCOPEntryInfo *>::iterator it;
+ TQMap<TQCString, MCOPEntryInfo *>::iterator it;
for(it = d->dynamicFunctions.begin(); it != d->dynamicFunctions.end(); ++it)
{
MCOPEntryInfo *entry = it.data();
if((entry->functionName() + entry->signature()) == fun)
{
- QCString type = entry->functionType();
+ TQCString type = entry->functionType();
if(type == "void")
{
@@ -116,9 +116,9 @@ bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data,
}
else if(type == "string")
{
- replyType = "QCString";
+ replyType = "TQCString";
- QDataStream reply(replyData, IO_WriteOnly);
+ TQDataStream reply(replyData, IO_WriteOnly);
reply << "fooo!";
}
else if(type == "long")
@@ -135,7 +135,7 @@ bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data,
delete result;
}
- QDataStream reply(replyData, IO_WriteOnly);
+ TQDataStream reply(replyData, IO_WriteOnly);
reply << returnCode;
}
@@ -146,7 +146,7 @@ bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data,
return false;
}
-void MCOPDCOPObject::addDynamicFunction(QCString value, MCOPEntryInfo *entry)
+void MCOPDCOPObject::addDynamicFunction(TQCString value, MCOPEntryInfo *entry)
{
d->dynamicFunctions.insert(value, entry);
}
diff --git a/arts/kde/mcop-dcop/mcopdcopobject.h b/arts/kde/mcop-dcop/mcopdcopobject.h
index 4c7e70cf5..0b73451e1 100644
--- a/arts/kde/mcop-dcop/mcopdcopobject.h
+++ b/arts/kde/mcop-dcop/mcopdcopobject.h
@@ -22,10 +22,10 @@
#include <dcopobject.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
class MCOPDCOPObjectPrivate;
@@ -38,47 +38,47 @@ public:
~MCOPEntryInfo()
{ }
- QCString functionType()
+ TQCString functionType()
{ return m_functionType; }
- QCString functionName()
+ TQCString functionName()
{ return m_functionName; }
- QCString signature()
+ TQCString signature()
{ return m_signature; }
QCStringList signatureList()
{ return m_signatureList; }
- void setFunctionType(QCString s)
+ void setFunctionType(TQCString s)
{ m_functionType = s; }
- void setFunctionName(QCString s)
+ void setFunctionName(TQCString s)
{ m_functionName = s; }
- void setSignature(QCString s)
+ void setSignature(TQCString s)
{ m_signature = s; }
void setSignatureList(QCStringList s)
{ m_signatureList = s; }
private:
- QCString m_functionType, m_functionName, m_signature;
+ TQCString m_functionType, m_functionName, m_signature;
QCStringList m_signatureList;
};
class MCOPDCOPObject : public DCOPObject
{
public:
- MCOPDCOPObject(QCString name);
+ MCOPDCOPObject(TQCString name);
~MCOPDCOPObject();
- virtual bool processDynamic(const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData);
+ virtual bool processDynamic(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData);
virtual QCStringList functionsDynamic();
- void addDynamicFunction(QCString value, MCOPEntryInfo *entry);
+ void addDynamicFunction(TQCString value, MCOPEntryInfo *entry);
- Arts::Buffer *callFunction(MCOPEntryInfo *entry, QCString ifaceName, const QByteArray &data);
+ Arts::Buffer *callFunction(MCOPEntryInfo *entry, TQCString ifaceName, const TQByteArray &data);
private:
MCOPDCOPObjectPrivate *d;
diff --git a/arts/kde/mcop-dcop/mcopdcoptools.h b/arts/kde/mcop-dcop/mcopdcoptools.h
index f1279111c..287a89456 100644
--- a/arts/kde/mcop-dcop/mcopdcoptools.h
+++ b/arts/kde/mcop-dcop/mcopdcoptools.h
@@ -22,12 +22,12 @@
#include <string>
-#include <qdatastream.h>
+#include <tqdatastream.h>
class MCOPDCOPTools
{
public:
- static long getLong(QDataStream &stream)
+ static long getLong(TQDataStream &stream)
{
long l;
stream << l;
@@ -35,9 +35,9 @@ public:
return l;
}
- static std::string getString(QDataStream &stream)
+ static std::string getString(TQDataStream &stream)
{
- QCString s;
+ TQCString s;
stream << s;
return std::string(s);