diff options
Diffstat (limited to 'umbrello/umbrello/codegenerators/php5writer.cpp')
-rw-r--r-- | umbrello/umbrello/codegenerators/php5writer.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/umbrello/umbrello/codegenerators/php5writer.cpp b/umbrello/umbrello/codegenerators/php5writer.cpp index 044d3afe..64a01b47 100644 --- a/umbrello/umbrello/codegenerators/php5writer.cpp +++ b/umbrello/umbrello/codegenerators/php5writer.cpp @@ -18,8 +18,8 @@ #include "php5writer.h" #include <kdebug.h> -#include <qregexp.h> -#include <qtextstream.h> +#include <tqregexp.h> +#include <tqtextstream.h> #include "../umldoc.h" #include "../classifier.h" @@ -3000,20 +3000,20 @@ void Php5Writer::writeClass(UMLClassifier *c) { return; } - QString classname = cleanName(c->getName()); + TQString classname = cleanName(c->getName()); //find an appropriate name for our file - QString fileName = findFileName(c, ".php"); + TQString fileName = findFileName(c, ".php"); if (fileName.isEmpty()) { emit codeGenerated(c, false); return; } - QFile filephp; + TQFile filephp; if(!openFile(filephp, fileName)) { emit codeGenerated(c, false); return; } - QTextStream php(&filephp); + TQTextStream php(&filephp); ////////////////////////////// //Start generating the code!! @@ -3021,11 +3021,11 @@ void Php5Writer::writeClass(UMLClassifier *c) { //try to find a heading file (license, coments, etc) - QString str; + TQString str; str = getHeadingFile(".php"); if(!str.isEmpty()) { - str.replace(QRegExp("%filename%"),fileName); - str.replace(QRegExp("%filepath%"),filephp.name()); + str.replace(TQRegExp("%filename%"),fileName); + str.replace(TQRegExp("%filepath%"),filephp.name()); php<<str<<m_endl; } @@ -3035,7 +3035,7 @@ void Php5Writer::writeClass(UMLClassifier *c) { findObjectsRelated(c,includes); UMLPackage *conc; for(conc = includes.first(); conc ;conc = includes.next()) { - QString headerName = findFileName(conc, ".php"); + TQString headerName = findFileName(conc, ".php"); if (!headerName.isEmpty()) { php << "require_once '" << headerName << "';" << m_endl; } @@ -3078,7 +3078,7 @@ void Php5Writer::writeClass(UMLClassifier *c) { int ri = rc; for (a = realizations.first(); a; a = realizations.next()) { UMLObject *o = a->getObject(Uml::B); - QString typeName = cleanName(o->getName()); + TQString typeName = cleanName(o->getName()); if(ri == rc) php << m_endl << m_indentation << m_indentation << m_indentation << "implements "; php << typeName << (--rc == 0 ? "" : ", "); @@ -3099,7 +3099,7 @@ void Php5Writer::writeClass(UMLClassifier *c) { kError() << "aggregation role A object is NULL" << endl; continue; } - QString typeName = cleanName(o->getName()); + TQString typeName = cleanName(o->getName()); if (a->getMulti(Uml::A).isEmpty()) { php << m_indentation << "var $m_" << ';' << m_endl; } else { @@ -3117,7 +3117,7 @@ void Php5Writer::writeClass(UMLClassifier *c) { kError() << "composition role A object is NULL" << endl; continue; } - QString typeName = cleanName(o->getName()); + TQString typeName = cleanName(o->getName()); if (a->getMulti(Uml::A).isEmpty()) { php << m_indentation << "var $m_" << ';' << m_endl; } else { @@ -3147,7 +3147,7 @@ void Php5Writer::writeClass(UMLClassifier *c) { //////////////////////////////////////////////////////////////////////////////////// // Helper Methods -void Php5Writer::writeOperations(UMLClassifier *c, QTextStream &php) { +void Php5Writer::writeOperations(UMLClassifier *c, TQTextStream &php) { //Lists to store operations sorted by scope UMLOperationList oppub,opprot,oppriv; @@ -3177,7 +3177,7 @@ void Php5Writer::writeOperations(UMLClassifier *c, QTextStream &php) { } } - QString classname(cleanName(c->getName())); + TQString classname(cleanName(c->getName())); //write operations to file if(forceSections() || !oppub.isEmpty()) { @@ -3222,8 +3222,8 @@ void Php5Writer::writeOperations(UMLClassifier *c, QTextStream &php) { } -void Php5Writer::writeOperations(const QString &/* classname */, UMLOperationList &opList, - QTextStream &php, bool isInterface /* = false */, +void Php5Writer::writeOperations(const TQString &/* classname */, UMLOperationList &opList, + TQTextStream &php, bool isInterface /* = false */, bool generateErrorStub /* = false */) { for (UMLOperation *op=opList.first(); op ; op=opList.next()) { UMLAttributeList atl = op->getParmList(); @@ -3287,8 +3287,8 @@ void Php5Writer::writeOperations(const QString &/* classname */, UMLOperationLis for (at = atl.first(); at; at = atl.next(), j++) { php << " $" << cleanName(at->getName()) << (!(at->getInitialValue().isEmpty()) ? - (QString(" = ")+at->getInitialValue()) : - QString("")) + (TQString(" = ")+at->getInitialValue()) : + TQString("")) << ((j < i-1)?", ":""); } php <<" )"; @@ -3306,7 +3306,7 @@ void Php5Writer::writeOperations(const QString &/* classname */, UMLOperationLis }//end for } -void Php5Writer::writeAttributes(UMLClassifier *c, QTextStream &php) { +void Php5Writer::writeAttributes(UMLClassifier *c, TQTextStream &php) { UMLAttributeList atpub, atprot, atpriv, atdefval; atpub.setAutoDelete(false); atprot.setAutoDelete(false); @@ -3351,7 +3351,7 @@ void Php5Writer::writeAttributes(UMLClassifier *c, QTextStream &php) { } -void Php5Writer::writeAttributes(UMLAttributeList &atList, QTextStream &php) { +void Php5Writer::writeAttributes(UMLAttributeList &atList, TQTextStream &php) { for (UMLAttribute *at = atList.first(); at ; at = atList.next()) { bool isStatic = at->getStatic(); if (forceDoc() || !at->getDoc().isEmpty()) { @@ -3402,9 +3402,9 @@ Uml::Programming_Language Php5Writer::getLanguage() { return Uml::pl_PHP5; } -const QStringList Php5Writer::reservedKeywords() const { +const TQStringList Php5Writer::reservedKeywords() const { - static QStringList keywords; + static TQStringList keywords; if (keywords.isEmpty()) { for (int i = 0; php5words[i]; i++) |