summaryrefslogtreecommitdiffstats
path: root/dcop/dcopidl2cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dcop/dcopidl2cpp')
-rw-r--r--dcop/dcopidl2cpp/dcopidl_test.h60
-rw-r--r--dcop/dcopidl2cpp/main.cpp22
-rw-r--r--dcop/dcopidl2cpp/main.h10
-rw-r--r--dcop/dcopidl2cpp/skel.cpp120
-rw-r--r--dcop/dcopidl2cpp/stub.cpp48
-rw-r--r--dcop/dcopidl2cpp/stubimpl.cpp70
-rw-r--r--dcop/dcopidl2cpp/type.h8
7 files changed, 169 insertions, 169 deletions
diff --git a/dcop/dcopidl2cpp/dcopidl_test.h b/dcop/dcopidl2cpp/dcopidl_test.h
index a6c625abe..8a2436c6c 100644
--- a/dcop/dcopidl2cpp/dcopidl_test.h
+++ b/dcop/dcopidl2cpp/dcopidl_test.h
@@ -8,27 +8,27 @@
// stub:
// - includes to super relationship, a bit much to test, needs multiple files?
-class KDEUI_EXPORT DefaultTest : public QObject, virtual public DCOPObject
+class KDEUI_EXPORT DefaultTest : public TQObject, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
public:
DefaultTest();
- void nonDcopFunction( QString filename, QString url, QString text, QString address, QString icon );
+ void nonDcopFunction( TQString filename, TQString url, TQString text, TQString address, TQString icon );
k_dcop:
void noArgsTest();
- void argsTest( QString filename, QString url );
- void unNamedArgsTest( QString, QString );
+ void argsTest( TQString filename, TQString url );
+ void unNamedArgsTest( TQString, TQString );
- void constTest( QString, QString ) const;
- QStringList writeTypeTest( const QString &, QPtrList<int> );
+ void constTest( TQString, TQString ) const;
+ TQStringList writeTypeTest( const TQString &, TQPtrList<int> );
- void voidReturnType( QString filename, QString url, QString text, QString address, QString icon );
- QString nonVoidReturnType( QString filename, QString text, QString address );
- int intReturnType( QString filename, QString text, QString address );
- bool boolReturnType( QString filename, QString text, QString address );
+ void voidReturnType( TQString filename, TQString url, TQString text, TQString address, TQString icon );
+ TQString nonVoidReturnType( TQString filename, TQString text, TQString address );
+ int intReturnType( TQString filename, TQString text, TQString address );
+ bool boolReturnType( TQString filename, TQString text, TQString address );
- ASYNC asyncTest( QString filename, QString text, QString address );
+ ASYNC asyncTest( TQString filename, TQString text, TQString address );
};
namespace TestNamespace {
@@ -38,7 +38,7 @@ namespace TestNamespace {
public:
NamespaceTest();
k_dcop:
- void function1( QString filename, QString url, QString text, QString address, QString icon );
+ void function1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
}
@@ -48,7 +48,7 @@ class NoSuper
public:
NoSuper();
k_dcop:
- void function1( QString filename, QString url, QString text, QString address, QString icon );
+ void function1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
class NonDCOPObject : public MyDCOPObjectBase
@@ -57,7 +57,7 @@ class NonDCOPObject : public MyDCOPObjectBase
public:
NonDCOPObject();
k_dcop:
- void function1( QString filename, QString url, QString text, QString address, QString icon );
+ void function1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
class NoFunctions : public DCOPObject
@@ -65,45 +65,45 @@ class NoFunctions : public DCOPObject
K_DCOP
public:
NonDCOPObject();
- void nonDcopFunction( QString filename, QString url, QString text, QString address, QString icon );
+ void nonDcopFunction( TQString filename, TQString url, TQString text, TQString address, TQString icon );
};
-class NonHashingTest : public QObject, virtual public DCOPObject
+class NonHashingTest : public TQObject, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
public:
NonHashingTest();
k_dcop:
- void function1( QString );
+ void function1( TQString );
};
-class HashingTest : public QObject, virtual public DCOPObject
+class HashingTest : public TQObject, virtual public DCOPObject
{
Q_OBJECT
K_DCOP
public:
HashingTest();
k_dcop:
- void function1( QString );
- void function2( QString, QString );
- void function3( QString, QString, QString );
- void function4( QString, QString, QString, QString );
- void function5( QString, QString, QString, QString, QString );
- void function6( QString, QString, QString, QString, QString, QString );
- void function7( QString, QString, QString, QString, QString, QString, QString );
- void function8( QString, QString, QString, QString, QString, QString, QString, QString );
+ void function1( TQString );
+ void function2( TQString, TQString );
+ void function3( TQString, TQString, TQString );
+ void function4( TQString, TQString, TQString, TQString );
+ void function5( TQString, TQString, TQString, TQString, TQString );
+ void function6( TQString, TQString, TQString, TQString, TQString, TQString );
+ void function7( TQString, TQString, TQString, TQString, TQString, TQString, TQString );
+ void function8( TQString, TQString, TQString, TQString, TQString, TQString, TQString, TQString );
};
class SignalTest : virtual public DCOPObject
{
K_DCOP
public:
- SignalTest(QCString objId = "KBookmarkNotifier") : DCOPObject(objId) {}
+ SignalTest(TQCString objId = "KBookmarkNotifier") : DCOPObject(objId) {}
k_dcop_signals:
- void signal1( QString filename, QString url, QString text, QString address, QString icon );
- void signal2( QString filename, QString text, QString address );
- void signal3( QString filename, QString url );
+ void signal1( TQString filename, TQString url, TQString text, TQString address, TQString icon );
+ void signal2( TQString filename, TQString text, TQString address );
+ void signal3( TQString filename, TQString url );
};
#endif // end
diff --git a/dcop/dcopidl2cpp/main.cpp b/dcop/dcopidl2cpp/main.cpp
index 32d128c30..5e0f27525 100644
--- a/dcop/dcopidl2cpp/main.cpp
+++ b/dcop/dcopidl2cpp/main.cpp
@@ -20,10 +20,10 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
#include <string.h>
#include <stdlib.h>
@@ -53,7 +53,7 @@ int main( int argc, char** argv )
bool generate_skel = true;
bool generate_stub = true;
- QString suffix = "cpp";
+ TQString suffix = "cpp";
while (argc > 2) {
@@ -91,18 +91,18 @@ int main( int argc, char** argv )
}
}
- QFile in( QFile::decodeName(argv[argpos]) );
+ TQFile in( TQFile::decodeName(argv[argpos]) );
if ( !in.open( IO_ReadOnly ) )
qFatal("Could not read %s", argv[argpos] );
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &in );
- QDomElement de = doc.documentElement();
+ TQDomElement de = doc.documentElement();
Q_ASSERT( de.tagName() == "DCOP-IDL" );
- QString base( argv[argpos] );
- QString idl = base;
+ TQString base( argv[argpos] );
+ TQString idl = base;
int pos = base.findRev( '.' );
if ( pos != -1 )
@@ -116,7 +116,7 @@ int main( int argc, char** argv )
generateSkel( idl, base + "_skel." + suffix, de );
if ( generate_stub ) {
- QString header = base;
+ TQString header = base;
generateStub( idl, header + "_stub.h", de );
pos = header.findRev('/');
if ( pos != -1 )
diff --git a/dcop/dcopidl2cpp/main.h b/dcop/dcopidl2cpp/main.h
index a0ecdb250..dd3c4d115 100644
--- a/dcop/dcopidl2cpp/main.h
+++ b/dcop/dcopidl2cpp/main.h
@@ -20,21 +20,21 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqstring.h>
/**
* Writes the skeleton
*/
-void generateSkel( const QString& idl, const QString& filename, QDomElement de );
+void generateSkel( const TQString& idl, const TQString& filename, TQDomElement de );
/**
* Writes the stubs header
*/
-void generateStub( const QString& idl, const QString& filename, QDomElement de);
+void generateStub( const TQString& idl, const TQString& filename, TQDomElement de);
/**
* Writes the stub implementation
*/
-void generateStubImpl( const QString& idl, const QString& header, const QString& headerBase, const QString& filename, QDomElement de);
+void generateStubImpl( const TQString& idl, const TQString& header, const TQString& headerBase, const TQString& filename, TQDomElement de);
diff --git a/dcop/dcopidl2cpp/skel.cpp b/dcop/dcopidl2cpp/skel.cpp
index fe79aec92..9ab0c763d 100644
--- a/dcop/dcopidl2cpp/skel.cpp
+++ b/dcop/dcopidl2cpp/skel.cpp
@@ -20,11 +20,11 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <string.h>
#include <stdlib.h>
@@ -52,11 +52,11 @@ static int const primes[] =
struct Function
{
Function(){}
- Function( const QString& t, const QString& n, const QString&fn, bool h )
+ Function( const TQString& t, const TQString& n, const TQString&fn, bool h )
: type( t ), name( n ), fullName( fn ), hidden( h ) {}
- QString type;
- QString name;
- QString fullName;
+ TQString type;
+ TQString name;
+ TQString fullName;
bool hidden;
};
@@ -64,13 +64,13 @@ struct Function
/*
* Writes the skeleton
*/
-void generateSkel( const QString& idl, const QString& filename, QDomElement de )
+void generateSkel( const TQString& idl, const TQString& filename, TQDomElement de )
{
- QFile skel( filename );
+ TQFile skel( filename );
if ( !skel.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.local8Bit().data() );
- QTextStream str( &skel );
+ TQTextStream str( &skel );
str << "/****************************************************************************" << endl;
str << "**" << endl;
@@ -81,7 +81,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
str << "*****************************************************************************/" << endl;
str << endl;
- QDomElement e = de.firstChild().toElement();
+ TQDomElement e = de.firstChild().toElement();
if ( e.tagName() == "SOURCE" ) {
str << "#include \"" << e.firstChild().toText().data() << "\"" << endl << endl;
}
@@ -89,35 +89,35 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
for( ; !e.isNull(); e = e.nextSibling().toElement() ) {
if ( e.tagName() != "CLASS" )
continue;
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
Q_ASSERT( n.tagName() == "NAME" );
- QString className = n.firstChild().toText().data();
+ TQString className = n.firstChild().toText().data();
// find dcop parent ( rightmost super class )
- QString DCOPParent;
- QDomElement s = n.nextSibling().toElement();
+ TQString DCOPParent;
+ TQDomElement s = n.nextSibling().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() == "SUPER" )
DCOPParent = s.firstChild().toText().data();
}
// get function table
- QValueList<Function> functions;
+ TQValueList<Function> functions;
s = n.nextSibling().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() != "FUNC" )
continue;
- QDomElement r = s.firstChild().toElement();
+ TQDomElement r = s.firstChild().toElement();
Q_ASSERT( r.tagName() == "TYPE" );
- QString funcType = r.firstChild().toText().data();
+ TQString funcType = r.firstChild().toText().data();
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
- QStringList argtypes;
- QStringList argnames;
+ TQString funcName = r.firstChild().toText().data();
+ TQStringList argtypes;
+ TQStringList argnames;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
+ TQDomElement a = r.firstChild().toElement();
Q_ASSERT( a.tagName() == "TYPE" );
argtypes.append( a.firstChild().toText().data() );
a = a.nextSibling().toElement();
@@ -125,14 +125,14 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
Q_ASSERT( a.tagName() == "NAME" );
argnames.append( a.firstChild().toText().data() );
} else {
- argnames.append( QString::null );
+ argnames.append( TQString::null );
}
}
funcName += '(';
- QString fullFuncName = funcName;
+ TQString fullFuncName = funcName;
bool first = true;
- QStringList::Iterator ittype = argtypes.begin();
- QStringList::Iterator itname = argnames.begin();
+ TQStringList::Iterator ittype = argtypes.begin();
+ TQStringList::Iterator itname = argnames.begin();
while ( ittype != argtypes.end() && itname != argnames.end() ) {
if ( !first ) {
funcName += ',';
@@ -168,13 +168,13 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
bool useHashing = functions.count() > 7;
if ( useHashing ) {
- str << "#include <qasciidict.h>" << endl;
+ str << "#include <tqasciidict.h>" << endl;
}
- QString classNameFull = className; // class name with possible namespaces prepended
+ TQString classNameFull = className; // class name with possible namespaces prepended
// namespaces will be removed from className now
int namespace_count = 0;
- QString namespace_tmp = className;
+ TQString namespace_tmp = className;
str << endl;
for(;;) {
int pos = namespace_tmp.find( "::" );
@@ -193,7 +193,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
str << "static const int " << className << "_fhash = " << fhash << ";" << endl;
}
str << "static const char* const " << className << "_ftable[" << functions.count() + 1 << "][3] = {" << endl;
- for( QValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
+ for( TQValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
str << " { \"" << (*it).type << "\", \"" << (*it).name << "\", \"" << (*it).fullName << "\" }," << endl;
}
str << " { 0, 0, 0 }" << endl;
@@ -201,7 +201,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
if (functions.count() > 0) {
str << "static const int " << className << "_ftable_hiddens[" << functions.count() << "] = {" << endl;
- for( QValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
+ for( TQValueList<Function>::Iterator it = functions.begin(); it != functions.end(); ++it ){
str << " " << !!(*it).hidden << "," << endl;
}
str << "};" << endl;
@@ -212,13 +212,13 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
// Write dispatcher
str << "bool " << className;
- str << "::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)" << endl;
+ str << "::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)" << endl;
str << "{" << endl;
if ( useHashing ) {
- str << " static QAsciiDict<int>* fdict = 0;" << endl;
+ str << " static TQAsciiDict<int>* fdict = 0;" << endl;
str << " if ( !fdict ) {" << endl;
- str << "\tfdict = new QAsciiDict<int>( " << className << "_fhash, true, false );" << endl;
+ str << "\tfdict = new TQAsciiDict<int>( " << className << "_fhash, true, false );" << endl;
str << "\tfor ( int i = 0; " << className << "_ftable[i][1]; i++ )" << endl;
str << "\t fdict->insert( " << className << "_ftable[i][1], new int( i ) );" << endl;
str << " }" << endl;
@@ -232,28 +232,28 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() != "FUNC" )
continue;
- QDomElement r = s.firstChild().toElement();
+ TQDomElement r = s.firstChild().toElement();
Q_ASSERT( r.tagName() == "TYPE" );
- QString funcType = r.firstChild().toText().data();
+ TQString funcType = r.firstChild().toText().data();
if ( funcType == "ASYNC" )
funcType = "void";
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
- QStringList args;
- QStringList argtypes;
+ TQString funcName = r.firstChild().toText().data();
+ TQStringList args;
+ TQStringList argtypes;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
+ TQDomElement a = r.firstChild().toElement();
Q_ASSERT( a.tagName() == "TYPE" );
argtypes.append( a.firstChild().toText().data() );
- args.append( QString("arg" ) + QString::number( args.count() ) );
+ args.append( TQString("arg" ) + TQString::number( args.count() ) );
}
- QString plainFuncName = funcName;
+ TQString plainFuncName = funcName;
funcName += '(';
bool first = true;
- for( QStringList::Iterator argtypes_count = argtypes.begin(); argtypes_count != argtypes.end(); ++argtypes_count ){
+ for( TQStringList::Iterator argtypes_count = argtypes.begin(); argtypes_count != argtypes.end(); ++argtypes_count ){
if ( !first )
funcName += ',';
first = false;
@@ -271,8 +271,8 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
firstFunc = false;
}
if ( !args.isEmpty() ) {
- QStringList::Iterator ittypes = argtypes.begin();
- QStringList::Iterator args_count;
+ TQStringList::Iterator ittypes = argtypes.begin();
+ TQStringList::Iterator args_count;
for( args_count = args.begin(); args_count != args.end(); ++args_count ){
str << '\t'<< *ittypes << " " << *args_count << ";" << endl;
++ittypes;
@@ -293,7 +293,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
}
first = true;
- for ( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ for ( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
if ( !first )
str << ", ";
first = false;
@@ -372,16 +372,16 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
for(s = e.firstChild().toElement(); !s.isNull(); s = s.nextSibling().toElement() ) {
if (s.tagName() != "SIGNAL")
continue;
- QDomElement r = s.firstChild().toElement();
- QString result = writeType( str, r );
+ TQDomElement r = s.firstChild().toElement();
+ TQString result = writeType( str, r );
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
+ TQString funcName = r.firstChild().toText().data();
str << className << "::" << funcName << "(";
- QStringList args;
- QStringList argtypes;
+ TQStringList args;
+ TQStringList argtypes;
bool first = true;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
@@ -391,10 +391,10 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
str << " ";
first = false;
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
- QString type = writeType( str, a );
+ TQDomElement a = r.firstChild().toElement();
+ TQString type = writeType( str, a );
argtypes.append( type );
- args.append( QString("arg" ) + QString::number( args.count() ) ) ;
+ args.append( TQString("arg" ) + TQString::number( args.count() ) ) ;
str << args.last();
}
if ( !first )
@@ -409,7 +409,7 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
funcName += "(";
first = true;
- for( QStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
+ for( TQStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
if ( !first )
funcName += ",";
first = false;
@@ -420,10 +420,10 @@ void generateSkel( const QString& idl, const QString& filename, QDomElement de )
if ( result != "void" )
qFatal("Error in DCOP signal %s::%s: DCOP signals can not return values.", className.latin1(), funcName.latin1());
- str << " QByteArray data;" << endl;
+ str << " TQByteArray data;" << endl;
if ( !args.isEmpty() ) {
- str << " QDataStream arg( data, IO_WriteOnly );" << endl;
- for( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ str << " TQDataStream arg( data, IO_WriteOnly );" << endl;
+ for( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
str << " arg << " << *args_count << ";" << endl;
}
}
diff --git a/dcop/dcopidl2cpp/stub.cpp b/dcop/dcopidl2cpp/stub.cpp
index 4060ae88f..887945262 100644
--- a/dcop/dcopidl2cpp/stub.cpp
+++ b/dcop/dcopidl2cpp/stub.cpp
@@ -20,11 +20,11 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <string.h>
#include <stdlib.h>
@@ -36,13 +36,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/*
* Writes the stubs header
*/
-void generateStub( const QString& idl, const QString& filename, QDomElement de)
+void generateStub( const TQString& idl, const TQString& filename, TQDomElement de)
{
- QFile stub( filename );
+ TQFile stub( filename );
if ( !stub.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.local8Bit().data() );
- QTextStream str( &stub );
+ TQTextStream str( &stub );
str << "/****************************************************************************" << endl;
str << "**" << endl;
@@ -53,19 +53,19 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << "*****************************************************************************/" << endl;
str << endl;
- QString ifdefstring = idl.upper();
+ TQString ifdefstring = idl.upper();
int pos = idl.findRev( '.' );
if ( pos != -1 )
ifdefstring = ifdefstring.left( pos );
- QString ifdefsuffix = "_STUB__";
+ TQString ifdefsuffix = "_STUB__";
str << "#ifndef __" << ifdefstring << ifdefsuffix << endl;
str << "#define __" << ifdefstring << ifdefsuffix << endl << endl;
str << "#include <dcopstub.h>" << endl;
- QStringList includeslist, all_includes;
- QDomElement e = de.firstChild().toElement();
+ TQStringList includeslist, all_includes;
+ TQDomElement e = de.firstChild().toElement();
for( ; !e.isNull(); e = e.nextSibling().toElement() ) {
if ( e.tagName() == "INCLUDE" ) {
// dcopidl lists the includes in reversed order because of the used yacc/bison gramatic
@@ -74,7 +74,7 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
continue;
}
if( !includeslist.empty()) {
- for( QStringList::ConstIterator it = includeslist.begin();
+ for( TQStringList::ConstIterator it = includeslist.begin();
it != includeslist.end();
++it ) {
str << "#include <" << ( *it ) << ">" << endl;
@@ -87,20 +87,20 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << endl;
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
Q_ASSERT( n.tagName() == "NAME" );
- QString className = n.firstChild().toText().data() + ( "_stub" );
+ TQString className = n.firstChild().toText().data() + ( "_stub" );
//add link scope, if available
n = n.nextSibling().toElement();
- QString linkScope;
+ TQString linkScope;
if (n.tagName()=="LINK_SCOPE") {
linkScope = n.firstChild().toText().data() + " ";
n = n.nextSibling().toElement();
}
// find dcop parent ( rightmost super class )
- QString DCOPParent;
+ TQString DCOPParent;
for( ; !n.isNull(); n = n.nextSibling().toElement() ) {
if ( n.tagName() == "SUPER" )
DCOPParent = n.firstChild().toText().data();
@@ -112,7 +112,7 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
else if( all_includes.contains( DCOPParent.lower() + ".h" ))
str << "#include <" << DCOPParent.lower() << "_stub.h>" << endl;
else {// damn ... let's assume it's the last include
- QString stub_h = all_includes.last();
+ TQString stub_h = all_includes.last();
unsigned int pos = stub_h.find( ".h" );
if( pos > 0 ) {
stub_h = stub_h.remove( pos, 100000 );
@@ -123,10 +123,10 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
}
}
- QString classNameFull = className; // class name with possible namespaces prepended
+ TQString classNameFull = className; // class name with possible namespaces prepended
// namespaces will be removed from className now
int namespace_count = 0;
- QString namespace_tmp = className;
+ TQString namespace_tmp = className;
for(;;) {
int pos = namespace_tmp.find( "::" );
if( pos < 0 ) {
@@ -156,15 +156,15 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << "public:" << endl;
// Constructors
- str << " " << className << "( const QCString& app, const QCString& id );" << endl;
- str << " " << className << "( DCOPClient* client, const QCString& app, const QCString& id );" << endl;
+ str << " " << className << "( const TQCString& app, const TQCString& id );" << endl;
+ str << " " << className << "( DCOPClient* client, const TQCString& app, const TQCString& id );" << endl;
str << " explicit " << className << "( const DCOPRef& ref );" << endl;
n = e.firstChild().toElement();
for( ; !n.isNull(); n = n.nextSibling().toElement() ) {
if (n.tagName() != "FUNC")
continue;
- QDomElement r = n.firstChild().toElement();
+ TQDomElement r = n.firstChild().toElement();
str << " virtual "; // KDE4 - I really don't think these need to be virtual
writeType( str, r );
@@ -181,7 +181,7 @@ void generateStub( const QString& idl, const QString& filename, QDomElement de)
str << " ";
first = false;
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
+ TQDomElement a = r.firstChild().toElement();
writeType( str, a );
a = a.nextSibling().toElement();
if ( a.tagName() == "NAME" )
diff --git a/dcop/dcopidl2cpp/stubimpl.cpp b/dcop/dcopidl2cpp/stubimpl.cpp
index 22c11527b..5cdd2a00d 100644
--- a/dcop/dcopidl2cpp/stubimpl.cpp
+++ b/dcop/dcopidl2cpp/stubimpl.cpp
@@ -20,11 +20,11 @@ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <string.h>
#include <stdlib.h>
@@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main.h"
#include "type.h"
-static bool isIntType( const QString& t )
+static bool isIntType( const TQString& t )
{
return ((t == "int")
|| (t == "signed int")
@@ -62,13 +62,13 @@ static bool isIntType( const QString& t )
/*
* Writes the stub implementation
*/
-void generateStubImpl( const QString& idl, const QString& header, const QString& /*headerBase*/, const QString& filename, QDomElement de )
+void generateStubImpl( const TQString& idl, const TQString& header, const TQString& /*headerBase*/, const TQString& filename, TQDomElement de )
{
- QFile impl( filename );
+ TQFile impl( filename );
if ( !impl.open( IO_WriteOnly ) )
qFatal("Could not write to %s", filename.latin1() );
- QTextStream str( &impl );
+ TQTextStream str( &impl );
str << "/****************************************************************************" << endl;
str << "**" << endl;
@@ -83,19 +83,19 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "#include <dcopclient.h>" << endl << endl;
str << "#include <kdatastream.h>" << endl;
- QDomElement e = de.firstChild().toElement();
+ TQDomElement e = de.firstChild().toElement();
for( ; !e.isNull(); e = e.nextSibling().toElement() ) {
if ( e.tagName() != "CLASS" )
continue;
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
Q_ASSERT( n.tagName() == "NAME" );
- QString classNameBase = n.firstChild().toText().data();
- QString className_stub = classNameBase + "_stub";
+ TQString classNameBase = n.firstChild().toText().data();
+ TQString className_stub = classNameBase + "_stub";
- QString classNameFull = className_stub; // class name with possible namespaces prepended
+ TQString classNameFull = className_stub; // class name with possible namespaces prepended
// namespaces will be removed from className now
int namespace_count = 0;
- QString namespace_tmp = className_stub;
+ TQString namespace_tmp = className_stub;
str << endl;
for(;;) {
int pos = namespace_tmp.find( "::" );
@@ -111,7 +111,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << endl;
// Write constructors
- str << className_stub << "::" << className_stub << "( const QCString& app, const QCString& obj )" << endl;
+ str << className_stub << "::" << className_stub << "( const TQCString& app, const TQCString& obj )" << endl;
str << " : ";
// Always explicitly call DCOPStub constructor, because it's virtual base class.
@@ -121,7 +121,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "{" << endl;
str << "}" << endl << endl;
- str << className_stub << "::" << className_stub << "( DCOPClient* client, const QCString& app, const QCString& obj )" << endl;
+ str << className_stub << "::" << className_stub << "( DCOPClient* client, const TQCString& app, const TQCString& obj )" << endl;
str << " : ";
str << "DCOPStub( client, app, obj )" << endl;
@@ -138,13 +138,13 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "}" << endl << endl;
// Write marshalling code
- QDomElement s = e.firstChild().toElement();
+ TQDomElement s = e.firstChild().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if (s.tagName() != "FUNC")
continue;
- QDomElement r = s.firstChild().toElement();
+ TQDomElement r = s.firstChild().toElement();
Q_ASSERT( r.tagName() == "TYPE" );
- QString result = r.firstChild().toText().data();
+ TQString result = r.firstChild().toText().data();
bool async = result == "ASYNC";
if ( async) {
result = "void";
@@ -154,11 +154,11 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
r = r.nextSibling().toElement();
Q_ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
+ TQString funcName = r.firstChild().toText().data();
str << className_stub << "::" << funcName << "(";
- QStringList args;
- QStringList argtypes;
+ TQStringList args;
+ TQStringList argtypes;
bool first = true;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
@@ -168,10 +168,10 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << " ";
first = false;
Q_ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
- QString type = writeType( str, a );
+ TQDomElement a = r.firstChild().toElement();
+ TQString type = writeType( str, a );
argtypes.append( type );
- args.append( QString("arg" ) + QString::number( args.count() ) ) ;
+ args.append( TQString("arg" ) + TQString::number( args.count() ) ) ;
str << args.last();
}
if ( !first )
@@ -188,7 +188,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
funcName += "(";
first = true;
- for( QStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
+ for( TQStringList::Iterator it = argtypes.begin(); it != argtypes.end(); ++it ){
if ( !first )
funcName += ",";
first = false;
@@ -203,10 +203,10 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "\treturn;" << endl;
str << " }" << endl;
- str << " QByteArray data;" << endl;
+ str << " TQByteArray data;" << endl;
if ( !args.isEmpty() ) {
- str << " QDataStream arg( data, IO_WriteOnly );" << endl;
- for( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ str << " TQDataStream arg( data, IO_WriteOnly );" << endl;
+ for( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
str << " arg << " << *args_count << ";" << endl;
}
}
@@ -236,12 +236,12 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << "\treturn;" << endl;
str << " }" << endl;
- str << " QByteArray data, replyData;" << endl;
- str << " QCString replyType;" << endl;
+ str << " TQByteArray data, replyData;" << endl;
+ str << " TQCString replyType;" << endl;
if ( !args.isEmpty() ) {
- str << " QDataStream arg( data, IO_WriteOnly );" << endl;
- for( QStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
+ str << " TQDataStream arg( data, IO_WriteOnly );" << endl;
+ for( TQStringList::Iterator args_count = args.begin(); args_count != args.end(); ++args_count ){
str << " arg << " << *args_count << ";" << endl;
}
}
@@ -249,7 +249,7 @@ void generateStubImpl( const QString& idl, const QString& header, const QString&
str << " data, replyType, replyData ) ) {" << endl;
if ( result != "void" ) {
str << "\tif ( replyType == \"" << result << "\" ) {" << endl;
- str << "\t QDataStream _reply_stream( replyData, IO_ReadOnly );" << endl;
+ str << "\t TQDataStream _reply_stream( replyData, IO_ReadOnly );" << endl;
str << "\t _reply_stream >> result;" << endl;
str << "\t setStatus( CallSucceeded );" << endl;
str << "\t} else {" << endl;
diff --git a/dcop/dcopidl2cpp/type.h b/dcop/dcopidl2cpp/type.h
index baaacacfb..2a99c83a9 100644
--- a/dcop/dcopidl2cpp/type.h
+++ b/dcop/dcopidl2cpp/type.h
@@ -1,15 +1,15 @@
#ifndef TYPE_H
#define TYPE_H
-#include <qtextstream.h>
-#include <qdom.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
-static QString writeType( QTextStream& str, const QDomElement& r )
+static TQString writeType( TQTextStream& str, const TQDomElement& r )
{
Q_ASSERT( r.tagName() == "TYPE" );
if ( r.hasAttribute( "qleft" ) )
str << r.attribute("qleft") << " ";
- QString t = r.firstChild().toText().data();
+ TQString t = r.firstChild().toText().data();
t = t.replace( ">>", "> >" );
str << t;
if ( r.hasAttribute( "qright" ) )