summaryrefslogtreecommitdiffstats
path: root/dcopjava/dcopidl2java/stubimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dcopjava/dcopidl2java/stubimpl.cpp')
-rw-r--r--dcopjava/dcopidl2java/stubimpl.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/dcopjava/dcopidl2java/stubimpl.cpp b/dcopjava/dcopidl2java/stubimpl.cpp
index 8d15fe7a..55e474c9 100644
--- a/dcopjava/dcopidl2java/stubimpl.cpp
+++ b/dcopjava/dcopidl2java/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 <qregexp.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqregexp.h>
#include <string.h>
#include <stdlib.h>
@@ -33,15 +33,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main.h"
-QString javaType(QString type)
+TQString javaType(TQString type)
{
if (type == "bool")
return "boolean";
- if (type == "QString")
+ if (type == "TQString")
return "String";
- if (type == "QCString")
+ if (type == "TQCString")
return "String";
- if (type == "QStringList")
+ if (type == "TQStringList")
return "String[]";
if (type == "short int")
return "short";
@@ -52,50 +52,50 @@ QString javaType(QString type)
}
-QString javaRightAttribute(QString attr)
+TQString javaRightAttribute(TQString attr)
{
if (attr == "&")
- return QString::null;
+ return TQString::null;
return "!!!NOT IMPLEMENTED: " + attr;
}
-QString javaLeftAttribute(QString attr)
+TQString javaLeftAttribute(TQString attr)
{
if (attr == "const")
- return QString::null;
+ return TQString::null;
return "!!!NOT IMPLEMENTED: " + attr;
}
-QString javaQualifier(QString qual)
+TQString javaQualifier(TQString qual)
{
if (qual == "const")
- return QString::null;
+ return TQString::null;
return "!!!NOT IMPLEMENTED: " + qual;
}
-QString underscore(QString in)
+TQString underscore(TQString in)
{
- return in.replace(QRegExp(" "), "_");
+ return in.replace(TQRegExp(" "), "_");
}
-QString defValue(QString type)
+TQString defValue(TQString type)
{
if (type == "bool")
return "false";
- if (type == "QString")
+ if (type == "TQString")
return "null";
- if (type == "QStringList")
+ if (type == "TQStringList")
return "null";
if (type == "DCOPRef")
return "null";
- if (type == "QCString")
+ if (type == "TQCString")
return "null";
return "0";
@@ -105,13 +105,13 @@ QString defValue(QString type)
/**
* Writes the stub implementation
*/
-void generateStubImpl( const QString& idl, const QString& package, const QString& filename, QDomElement de )
+void generateStubImpl( const TQString& idl, const TQString& package, 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;
@@ -129,16 +129,16 @@ void generateStubImpl( const QString& idl, const QString& package, const QString
str << "import org.kde.DCOP.*;" << endl;
str << endl << endl;
- QDomElement e = de.firstChild().toElement();
+ TQDomElement e = de.firstChild().toElement();
for( ; !e.isNull(); e = e.nextSibling().toElement() ) {
if ( e.tagName() == "CLASS" ) {
- QDomElement n = e.firstChild().toElement();
+ TQDomElement n = e.firstChild().toElement();
ASSERT( n.tagName() == "NAME" );
- QString className = n.firstChild().toText().data() + "_stub";
+ TQString className = n.firstChild().toText().data() + "_stub";
// 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();
@@ -163,9 +163,9 @@ void generateStubImpl( const QString& idl, const QString& package, const QString
s = e.firstChild().toElement();
for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
if ( s.tagName() == "FUNC" ) {
- QDomElement r = s.firstChild().toElement();
+ TQDomElement r = s.firstChild().toElement();
ASSERT( r.tagName() == "TYPE" );
- QString result = r.firstChild().toText().data();
+ TQString result = r.firstChild().toText().data();
str << " public ";
bool async = result == "ASYNC";
if ( async)
@@ -180,11 +180,11 @@ void generateStubImpl( const QString& idl, const QString& package, const QString
r = r.nextSibling().toElement();
ASSERT ( r.tagName() == "NAME" );
- QString funcName = r.firstChild().toText().data();
+ TQString funcName = r.firstChild().toText().data();
str << funcName << "(";
- QStringList args;
- QStringList argtypes;
+ TQStringList args;
+ TQStringList argtypes;
bool first = TRUE;
r = r.nextSibling().toElement();
for( ; !r.isNull(); r = r.nextSibling().toElement() ) {
@@ -192,7 +192,7 @@ void generateStubImpl( const QString& idl, const QString& package, const QString
str << ", ";
first = FALSE;
ASSERT( r.tagName() == "ARG" );
- QDomElement a = r.firstChild().toElement();
+ TQDomElement a = r.firstChild().toElement();
ASSERT( a.tagName() == "TYPE" );
if ( a.hasAttribute( "qleft" ) )
str << javaLeftAttribute(a.attribute("qleft")) << " ";
@@ -202,7 +202,7 @@ void generateStubImpl( const QString& idl, const QString& package, const QString
str << javaRightAttribute(a.attribute("qright")) << " ";
else
str << " ";
- args.append(QString("arg") + QString::number(args.count())) ;
+ args.append(TQString("arg") + TQString::number(args.count())) ;
str << args.last();
}
str << ")";
@@ -215,7 +215,7 @@ void generateStubImpl( const QString& idl, const QString& package, 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;
@@ -230,7 +230,7 @@ void generateStubImpl( const QString& idl, const QString& package, const QString
str << " try" << endl;
str << " {" << endl;
- QStringList::Iterator itt, ita;
+ TQStringList::Iterator itt, ita;
for (itt = argtypes.begin(), ita = args.begin(); itt != argtypes.end(); ++itt, ++ita)
str << " write_" << *itt << "(os, " << *ita << ");" << endl;
}
@@ -256,7 +256,7 @@ void generateStubImpl( const QString& idl, const QString& package, const QString
str << " try" << endl;
str << " {" << endl;
- QStringList::Iterator itt, ita;
+ TQStringList::Iterator itt, ita;
for (itt = argtypes.begin(), ita = args.begin(); itt != argtypes.end(); ++itt, ++ita)
str << " write_" << underscore(*itt) << "(os, " << *ita << ");" << endl;