diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 0813b39aed2cf4c84157a22c4c9594336d93d412 (patch) | |
tree | 0f6157f9c9ecc6ed26cb98f058219a8021d3f4a6 /umbrello | |
parent | 35dc58791106d7a1864264063df5f3ee3f1f0f15 (diff) | |
download | tdesdk-0813b39aed2cf4c84157a22c4c9594336d93d412.tar.gz tdesdk-0813b39aed2cf4c84157a22c4c9594336d93d412.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello')
98 files changed, 465 insertions, 465 deletions
diff --git a/umbrello/umbrello/associationwidget.cpp b/umbrello/umbrello/associationwidget.cpp index a385f7da..3b4468f6 100644 --- a/umbrello/umbrello/associationwidget.cpp +++ b/umbrello/umbrello/associationwidget.cpp @@ -826,7 +826,7 @@ void AssociationWidget::setUMLAssociation (UMLAssociation * assoc) /** Returns true if the Widget is either at the starting or ending side of the association */ -bool AssociationWidget::tqcontains(UMLWidget* widget) { +bool AssociationWidget::contains(UMLWidget* widget) { return (widget == m_role[A].m_pWidget || widget == m_role[B].m_pWidget); } diff --git a/umbrello/umbrello/associationwidget.h b/umbrello/umbrello/associationwidget.h index 0227274d..b6a9de63 100644 --- a/umbrello/umbrello/associationwidget.h +++ b/umbrello/umbrello/associationwidget.h @@ -244,7 +244,7 @@ public: * * @return True if widget plays role A or B in this assoc. */ - bool tqcontains(UMLWidget* widget); + bool contains(UMLWidget* widget); /** * Returns true if this AssociationWidget represents a collaboration message. diff --git a/umbrello/umbrello/attribute.cpp b/umbrello/umbrello/attribute.cpp index fa71c865..d18f4d5e 100644 --- a/umbrello/umbrello/attribute.cpp +++ b/umbrello/umbrello/attribute.cpp @@ -260,7 +260,7 @@ void UMLAttribute::setTemplateParams(const TQString& templateParam, UMLClassifie return; TQString type = templateParam.simplifyWhiteSpace(); - int start = type.tqfind(TQChar('<')); + int start = type.find(TQChar('<')); if (start >= 0 ) { int end = start; int count = 1; @@ -294,7 +294,7 @@ void UMLAttribute::setTemplateParams(const TQString& templateParam, UMLClassifie //We want to list only the params that already exist in this document //If the param doesnt't already exist, we couldn't draw an association anyway UMLClassifier* tmpClassifier = static_cast<UMLClassifier*>(obj); - if (templateParamList.tqfindRef(tmpClassifier) == -1) { + if (templateParamList.findRef(tmpClassifier) == -1) { templateParamList.append(tmpClassifier); } } @@ -311,9 +311,9 @@ UMLClassifierList UMLAttribute::getTemplateParams() { // Handle C++/D/Java template/generic parameters const Uml::Programming_Language pl = UMLApp::app()->getActiveLanguage(); if (pl == Uml::pl_Cpp || pl == Uml::pl_Java || pl == Uml::pl_D) { - int start = type.tqfind(TQChar('<')); + int start = type.find(TQChar('<')); if (start >= 0 ) { - int end = type.tqfindRev(TQChar('>')); + int end = type.findRev(TQChar('>')); if (end > start) { templateParam = type.mid(start + 1, end - start - 1); setTemplateParams(templateParam, templateParamList); diff --git a/umbrello/umbrello/classifier.cpp b/umbrello/umbrello/classifier.cpp index 947590c1..167bf674 100644 --- a/umbrello/umbrello/classifier.cpp +++ b/umbrello/umbrello/classifier.cpp @@ -218,8 +218,8 @@ UMLOperation* UMLClassifier::createOperation(const TQString &name /*=null*/, bool UMLClassifier::addOperation(UMLOperation* op, int position ) { - if (m_List.tqfindRef(op) != -1) { - kDebug() << "UMLClassifier::addOperation: tqfindRef(" + if (m_List.findRef(op) != -1) { + kDebug() << "UMLClassifier::addOperation: findRef(" << op->getName() << ") finds op (bad)" << endl; return false; @@ -380,7 +380,7 @@ UMLClassifierList UMLClassifier::findSubClassConcepts (ClassifierType type) { UMLClassifier *concept = dynamic_cast<UMLClassifier*>(obj); if (concept && (type == ALL || (!concept->isInterface() && type == CLASS) || (concept->isInterface() && type == INTERFACE)) - && (inheritingConcepts.tqfindRef(concept) == -1)) + && (inheritingConcepts.findRef(concept) == -1)) inheritingConcepts.append(concept); } } @@ -409,7 +409,7 @@ UMLClassifierList UMLClassifier::findSuperClassConcepts (ClassifierType type) { UMLClassifier *concept = dynamic_cast<UMLClassifier*>(obj); if (concept && (type == ALL || (!concept->isInterface() && type == CLASS) || (concept->isInterface() && type == INTERFACE)) - && (parentConcepts.tqfindRef(concept) == -1)) + && (parentConcepts.findRef(concept) == -1)) parentConcepts.append(concept); } } @@ -765,7 +765,7 @@ int UMLClassifier::takeItem(UMLClassifierListItem *item) { buf.append(' ' + currentAtt->getName()); } kDebug() << " UMLClassifier::takeItem (before): m_List is " << buf << endl; - int index = m_List.tqfindRef(item); + int index = m_List.findRef(item); if (index == -1) return -1; switch (item->getBaseType()) { diff --git a/umbrello/umbrello/classifiercodedocument.cpp b/umbrello/umbrello/classifiercodedocument.cpp index 6ffca075..d5335a34 100644 --- a/umbrello/umbrello/classifiercodedocument.cpp +++ b/umbrello/umbrello/classifiercodedocument.cpp @@ -131,8 +131,8 @@ bool ClassifierCodeDocument::hasObjectVectorClassFields() { UMLRole * role = dynamic_cast<UMLRole*>(cf->getParentObject()); TQString multi = role->getMultiplicity(); if ( - multi.tqcontains(TQRegExp("[23456789\\*]")) || - multi.tqcontains(TQRegExp("1\\d")) + multi.contains(TQRegExp("[23456789\\*]")) || + multi.contains(TQRegExp("1\\d")) ) return true; } @@ -170,7 +170,7 @@ bool ClassifierCodeDocument::hasAttributeClassFields() { // the codegenerator writer the liberty to organize their document as they desire. bool ClassifierCodeDocument::addCodeClassField ( CodeClassField * add_object ) { UMLObject * umlobj = add_object->getParentObject(); - if(!(m_classFieldMap.tqcontains(umlobj))) + if(!(m_classFieldMap.contains(umlobj))) { m_classfieldVector.append(add_object); m_classFieldMap.insert(umlobj,add_object); @@ -194,7 +194,7 @@ void ClassifierCodeDocument::addAttributeClassField (UMLClassifierListItem *obj, */ bool ClassifierCodeDocument::removeCodeClassField ( CodeClassField * remove_object ) { UMLObject * umlobj = remove_object->getParentObject(); - if(m_classFieldMap.tqcontains(umlobj)) + if(m_classFieldMap.contains(umlobj)) { if (m_classfieldVector.removeRef(remove_object)) { @@ -542,7 +542,7 @@ void ClassifierCodeDocument::addAssociationClassField (UMLAssociation * a, bool { UMLRole * role = a->getUMLRole(Uml::B); - if(!m_classFieldMap.tqcontains((UMLObject*)role)) + if(!m_classFieldMap.contains((UMLObject*)role)) { CodeClassField * classfield = CodeGenFactory::newCodeClassField(this, role); if( addCodeClassField(classfield)) @@ -554,7 +554,7 @@ void ClassifierCodeDocument::addAssociationClassField (UMLAssociation * a, bool if (printRoleA) { UMLRole * role = a->getUMLRole(Uml::A); - if(!m_classFieldMap.tqcontains((UMLObject*)role)) + if(!m_classFieldMap.contains((UMLObject*)role)) { CodeClassField * classfield = CodeGenFactory::newCodeClassField(this, role); if( addCodeClassField(classfield)) diff --git a/umbrello/umbrello/classifierlistitem.cpp b/umbrello/umbrello/classifierlistitem.cpp index 3025353a..0e3fc206 100644 --- a/umbrello/umbrello/classifierlistitem.cpp +++ b/umbrello/umbrello/classifierlistitem.cpp @@ -83,7 +83,7 @@ void UMLClassifierListItem::setTypeName(const TQString &type) { m_pSecondary = pDoc->findUMLObject(type); if (m_pSecondary == NULL) { // Make data type for easily identified cases - if (Model_Utils::isCommonDataType(type) || type.tqcontains('*')) { + if (Model_Utils::isCommonDataType(type) || type.contains('*')) { m_pSecondary = Object_Factory::createUMLObject(Uml::ot_Datatype, type); kDebug() << "UMLClassifierListItem::setTypeName: " << "created datatype for " << type << endl; diff --git a/umbrello/umbrello/clipboard/umlclipboard.cpp b/umbrello/umbrello/clipboard/umlclipboard.cpp index 357f97f7..ec5b6c84 100644 --- a/umbrello/umbrello/clipboard/umlclipboard.cpp +++ b/umbrello/umbrello/clipboard/umlclipboard.cpp @@ -281,7 +281,7 @@ bool UMLClipboard::insertItemChildren(UMLListViewItem * Item, UMLListViewItemLis // If the child is selected, remove it from the list of selected items // otherwise it will be inserted twice in m_ObjectList. if(child->isSelected()) { - SelectedItems.remove(SelectedItems.tqfind(child) ); + SelectedItems.remove(SelectedItems.find(child) ); } insertItemChildren(child, SelectedItems); child = (UMLListViewItem*)child->nextSibling(); diff --git a/umbrello/umbrello/codeclassfield.cpp b/umbrello/umbrello/codeclassfield.cpp index 2e242664..0ed3a1f4 100644 --- a/umbrello/umbrello/codeclassfield.cpp +++ b/umbrello/umbrello/codeclassfield.cpp @@ -172,7 +172,7 @@ bool CodeClassField::addMethod ( CodeAccessorMethod * add_object ) { return false; /* // this wont work as the key for TQMap needs to inherit from TQObject - if(m_methodMap->tqcontains(type)) + if(m_methodMap->contains(type)) return false; // return false, we already have some object with this tag in the list else m_methodMap->insert(type, add_object); @@ -331,7 +331,7 @@ int CodeClassField::minimumListOccurances( ) { if(!multi.isEmpty()) { TQString lowerBoundString = multi.remove(TQRegExp("\\.\\.\\d+$")); - if(!lowerBoundString.isEmpty() &&lowerBoundString.tqcontains(TQRegExp("^\\d+$"))) + if(!lowerBoundString.isEmpty() &&lowerBoundString.contains(TQRegExp("^\\d+$"))) return lowerBoundString.toInt(); } @@ -348,7 +348,7 @@ int CodeClassField::maximumListOccurances( ) { if(!multi.isEmpty()) { TQString upperBoundString = multi.section(TQRegExp("(\\.\\.)"),1); - if(!upperBoundString.isEmpty() && upperBoundString.tqcontains(TQRegExp("^\\d+$"))) + if(!upperBoundString.isEmpty() && upperBoundString.contains(TQRegExp("^\\d+$"))) return upperBoundString.toInt(); else return -1; // unbounded @@ -392,7 +392,7 @@ CodeAccessorMethod * CodeClassField::findMethodByType ( CodeAccessorMethod::Acce //if we already know to which file this class was written/should be written, just return it. /* // argh. this wont work because "accessorType' doesn't inherit from TQObject. - if(m_methodMap->tqcontains(type)) + if(m_methodMap->contains(type)) return ((*m_methodMap)[type]); CodeAccessorMethod * obj = NULL; */ @@ -422,7 +422,7 @@ void CodeClassField::initAccessorMethods() { // everything gets potential get/set method - //if(!m_methodMap->tqcontains(CodeAccessorMethod::GET)) + //if(!m_methodMap->contains(CodeAccessorMethod::GET)) if(!findMethodByType(CodeAccessorMethod::GET)) { CodeAccessorMethod * method = CodeGenFactory::newCodeAccessorMethod (getParentDocument(), this, CodeAccessorMethod::GET); @@ -585,8 +585,8 @@ bool CodeClassField::fieldIsSingleValue ( ) TQString multi = role->getMultiplicity(); - if(multi.isEmpty() || multi.tqcontains(TQRegExp("^(0|1)$")) - || multi.tqcontains(TQRegExp("^0\\.\\.1$"))) + if(multi.isEmpty() || multi.contains(TQRegExp("^(0|1)$")) + || multi.contains(TQRegExp("^0\\.\\.1$"))) return true; return false; diff --git a/umbrello/umbrello/codedocument.cpp b/umbrello/umbrello/codedocument.cpp index 0a183a93..6fea4367 100644 --- a/umbrello/umbrello/codedocument.cpp +++ b/umbrello/umbrello/codedocument.cpp @@ -112,11 +112,11 @@ TQString CodeDocument::getPath ( ) { path = path.simplifyWhiteSpace(); // Replace all blanks with underscore - path.tqreplace(TQRegExp(" "), "_"); + path.replace(TQRegExp(" "), "_"); // this allows multiple directory paths (ala Java, some other languages) // in from the package specification - path.tqreplace(TQRegExp("\\."),"/"); // Simple hack!.. but this is more or less language + path.replace(TQRegExp("\\."),"/"); // Simple hack!.. but this is more or less language // dependant and should probably be commented out. // Still, as a general default it may be useful -b.t. return path; @@ -215,7 +215,7 @@ bool CodeDocument::insertTextBlock(TextBlock * newBlock, TextBlock * existingBlo if(!findTextBlockByTag(tag, true)) return false; - int index = m_textblockVector.tqfindRef(existingBlock); + int index = m_textblockVector.findRef(existingBlock); if(index < 0) { // may be hiding in child hierarchical codeblock @@ -242,7 +242,7 @@ bool CodeDocument::insertTextBlock(TextBlock * newBlock, TextBlock * existingBlo newBlock->setTag(new_tag); } - if(m_textBlockTagMap.tqcontains(new_tag)) + if(m_textBlockTagMap.contains(new_tag)) return false; // return false, we already have some object with this tag in the list else m_textBlockTagMap.insert(new_tag, newBlock); @@ -278,10 +278,10 @@ void CodeDocument::updateHeader () { //try to find a heading file (license, coments, etc) then extract its text TQString headingText = UMLApp::app()->getCommonPolicy()->getHeadingFile(getFileExtension()); - headingText.tqreplace(TQRegExp("%filename%"),getFileName()+getFileExtension()); - headingText.tqreplace(TQRegExp("%filepath%"),getPath()); - headingText.tqreplace( TQRegExp("%time%"), TQTime::currentTime().toString()); - headingText.tqreplace( TQRegExp("%date%"), TQDate::tqcurrentDate().toString()); + headingText.replace(TQRegExp("%filename%"),getFileName()+getFileExtension()); + headingText.replace(TQRegExp("%filepath%"),getPath()); + headingText.replace( TQRegExp("%time%"), TQTime::currentTime().toString()); + headingText.replace( TQRegExp("%date%"), TQDate::tqcurrentDate().toString()); getHeader()->setText(headingText); @@ -380,7 +380,7 @@ void CodeDocument::setAttributesFromNode ( TQDomElement & root) { TQString pkgStr = root.attribute("package",""); if (!pkgStr.isEmpty() && pkgStr != "-1") { UMLDoc *umldoc = UMLApp::app()->getDocument(); - if (pkgStr.tqcontains( TQRegExp("\\D") )) { + if (pkgStr.contains( TQRegExp("\\D") )) { // suspecting pre-1.5.3 file format where the package name was // saved instead of the package ID. UMLObject *o = umldoc->findUMLObject(pkgStr); @@ -467,11 +467,11 @@ void CodeDocument::addChildTagToMap ( const TQString &tag, TextBlock * tb) TextBlock * CodeDocument::findTextBlockByTag( const TQString &tag , bool descendIntoChildren) { //if we already know to which file this class was written/should be written, just return it. - if(m_textBlockTagMap.tqcontains(tag)) + if(m_textBlockTagMap.contains(tag)) return m_textBlockTagMap[tag]; if (descendIntoChildren) - if(m_childTextBlockTagMap.tqcontains(tag)) + if(m_childTextBlockTagMap.contains(tag)) return m_childTextBlockTagMap[tag]; return (TextBlock*) NULL; diff --git a/umbrello/umbrello/codegenerationpolicy.cpp b/umbrello/umbrello/codegenerationpolicy.cpp index 12db5f5e..4acfb2b5 100644 --- a/umbrello/umbrello/codegenerationpolicy.cpp +++ b/umbrello/umbrello/codegenerationpolicy.cpp @@ -514,7 +514,7 @@ TQString CodeGenerationPolicy::getHeadingFile(const TQString& str) { if(!getIncludeHeadings() || str.isEmpty()) return TQString(""); - if(str.tqcontains(" ") ||str.tqcontains(";")) { + if(str.contains(" ") ||str.contains(";")) { kWarning() << "File folder must not have spaces or semi colons!" << endl; return TQString(""); } @@ -549,10 +549,10 @@ TQString CodeGenerationPolicy::getHeadingFile(const TQString& str) { retstr += ts.readLine()+endLine; //do variable substitution - retstr.tqreplace( TQRegExp("%author%"),TQString(getenv("USER"))); //get the user name from some where else - retstr.tqreplace( TQRegExp("%headingpath%"),filename ); - retstr.tqreplace( TQRegExp("%time%"), TQTime::currentTime().toString()); - retstr.tqreplace( TQRegExp("%date%"), TQDate::tqcurrentDate().toString()); + retstr.replace( TQRegExp("%author%"),TQString(getenv("USER"))); //get the user name from some where else + retstr.replace( TQRegExp("%headingpath%"),filename ); + retstr.replace( TQRegExp("%time%"), TQTime::currentTime().toString()); + retstr.replace( TQRegExp("%date%"), TQDate::tqcurrentDate().toString()); // the replace filepath, time parts are also in the code document updateHeader method // (which is not a virtual function)... diff --git a/umbrello/umbrello/codegenerator.cpp b/umbrello/umbrello/codegenerator.cpp index 010c4e92..87c518a2 100644 --- a/umbrello/umbrello/codegenerator.cpp +++ b/umbrello/umbrello/codegenerator.cpp @@ -116,7 +116,7 @@ TQString CodeGenerator::getUniqueID(CodeDocument * codeDoc) CodeDocument * CodeGenerator::findCodeDocumentByID( const TQString &tag ) { //if we already know to which file this class was written/should be written, just return it. CodeDocument * doc = (CodeDocument*)NULL; - if((doc = m_codeDocumentDictionary.tqfind(tag))) + if((doc = m_codeDocumentDictionary.find(tag))) return doc; return doc; @@ -133,7 +133,7 @@ bool CodeGenerator::addCodeDocument ( CodeDocument * doc ) doc->setID(tag); } - if(m_codeDocumentDictionary.tqfind(tag)) + if(m_codeDocumentDictionary.find(tag)) return false; // return false, we already have some object with this tag in the list else m_codeDocumentDictionary.insert(tag, doc); @@ -485,7 +485,7 @@ bool CodeGenerator::openFile (TQFile & file, const TQString &fileName ) { */ TQString CodeGenerator::cleanName ( const TQString &name ) { TQString retval = name; - retval.tqreplace(TQRegExp("\\W"), "_"); + retval.replace(TQRegExp("\\W"), "_"); return retval; } @@ -499,7 +499,7 @@ TQString CodeGenerator::findFileName ( CodeDocument * codeDocument ) { // if path is given add this as a directory to the file name if (!path.isEmpty()) { - path.tqreplace(TQRegExp("::"), "/"); // Simple hack! + path.replace(TQRegExp("::"), "/"); // Simple hack! name = path + '/' + codeDocument->getFileName(); path = '/' + path; } else { @@ -507,7 +507,7 @@ TQString CodeGenerator::findFileName ( CodeDocument * codeDocument ) { } // Convert all "::" to "/" : Platform-specific path separator - name.tqreplace(TQRegExp("::"), "/"); // Simple hack! + name.replace(TQRegExp("::"), "/"); // Simple hack! // if a path name exists check the existence of the path directory if (!path.isEmpty()) { @@ -539,7 +539,7 @@ TQString CodeGenerator::findFileName ( CodeDocument * codeDocument ) { } name.simplifyWhiteSpace(); - name.tqreplace(TQRegExp(" "),"_"); + name.replace(TQRegExp(" "),"_"); return overwritableName( name, codeDocument->getFileExtension() ); } @@ -584,7 +584,7 @@ void CodeGenerator::findObjectsRelated(UMLClassifier *c, UMLPackageList &cList) } // now add in list ONLY if its not already there - if(temp && !cList.tqcontainsRef(temp)) + if(temp && !cList.containsRef(temp)) cList.append(temp); } @@ -594,13 +594,13 @@ void CodeGenerator::findObjectsRelated(UMLClassifier *c, UMLPackageList &cList) temp =0; //check return value temp =(UMLClassifier*) op->getType(); - if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.tqcontainsRef(temp)) + if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.containsRef(temp)) cList.append(temp); //check parameters UMLAttributeList atl = op->getParmList(); for (UMLAttribute *at = atl.first(); at; at = atl.next()) { temp = (UMLClassifier*)at->getType(); - if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.tqcontainsRef(temp)) + if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.containsRef(temp)) cList.append(temp); } @@ -612,7 +612,7 @@ void CodeGenerator::findObjectsRelated(UMLClassifier *c, UMLPackageList &cList) for (UMLAttribute *at = atl.first(); at; at = atl.next()) { temp=0; temp = (UMLClassifier*) at->getType(); - if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.tqcontainsRef(temp)) + if (temp && temp->getBaseType() != Uml::ot_Datatype && !cList.containsRef(temp)) cList.append(temp); } } @@ -640,7 +640,7 @@ TQString CodeGenerator::formatDoc(const TQString &text, const TQString &linePref continue; } int index; - while ((index = input.tqfindRev(" ", lineWidth)) >= 0) { + while ((index = input.findRev(" ", lineWidth)) >= 0) { output += linePrefix + input.left(index) + endLine; // add line input.remove(0, index + 1); //and remove processed string, including // white space @@ -706,7 +706,7 @@ bool CodeGenerator::isReservedKeyword(const TQString & keyword) { const TQStringList keywords = reservedKeywords(); - return keywords.tqcontains(keyword); + return keywords.contains(keyword); } const TQStringList CodeGenerator::reservedKeywords() const { diff --git a/umbrello/umbrello/codegenerators/adawriter.cpp b/umbrello/umbrello/codegenerators/adawriter.cpp index d081ce0e..6dc6e4e7 100644 --- a/umbrello/umbrello/codegenerators/adawriter.cpp +++ b/umbrello/umbrello/codegenerators/adawriter.cpp @@ -124,7 +124,7 @@ void AdaWriter::computeAssocTypeAndRole(UMLClassifier *c, return; const TQString multi = a->getMulti(Uml::B); bool hasNonUnityMultiplicity = (!multi.isEmpty() && multi != "1"); - hasNonUnityMultiplicity &= !multi.tqcontains(TQRegExp("^1 *\\.\\. *1$")); + hasNonUnityMultiplicity &= !multi.contains(TQRegExp("^1 *\\.\\. *1$")); roleName = cleanName(a->getRoleName(Uml::B)); if (roleName.isEmpty()) roleName = cleanName(a->getName()); @@ -154,7 +154,7 @@ void AdaWriter::writeClass(UMLClassifier *c) { const bool isClass = !c->isInterface(); TQString classname = cleanName(c->getName()); TQString fileName = packageName(c).lower(); - fileName.tqreplace('.', '-'); + fileName.replace('.', '-'); //find an appropriate name for our file fileName = overwritableName(c, fileName, ".ads"); @@ -176,8 +176,8 @@ void AdaWriter::writeClass(UMLClassifier *c) { TQString str; str = getHeadingFile(".ads"); if (!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"), fileName); - str.tqreplace(TQRegExp("%filepath%"), file.name()); + str.replace(TQRegExp("%filename%"), fileName); + str.replace(TQRegExp("%filepath%"), file.name()); ada << str << endl; } diff --git a/umbrello/umbrello/codegenerators/aswriter.cpp b/umbrello/umbrello/codegenerators/aswriter.cpp index 20f9a4a4..e973a55e 100644 --- a/umbrello/umbrello/codegenerators/aswriter.cpp +++ b/umbrello/umbrello/codegenerators/aswriter.cpp @@ -67,8 +67,8 @@ void ASWriter::writeClass(UMLClassifier *c) str = getHeadingFile(".as"); if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"),fileName+".as"); - str.tqreplace(TQRegExp("%filepath%"),fileas.name()); + str.replace(TQRegExp("%filename%"),fileName+".as"); + str.replace(TQRegExp("%filepath%"),fileas.name()); as << str << m_endl; } diff --git a/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp b/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp index 1e0bf353..bdba3604 100644 --- a/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp +++ b/umbrello/umbrello/codegenerators/cppcodeclassfield.cpp @@ -65,7 +65,7 @@ TQString CPPCodeClassField::getFieldName() { UMLRole * role = (UMLRole*) getParentObject(); TQString roleName = role->getName(); if(fieldIsSingleValue()) { - return roleName.tqreplace(0, 1, roleName.left(1).lower()); + return roleName.replace(0, 1, roleName.left(1).lower()); } else { return roleName.lower() + "Vector"; } diff --git a/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp b/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp index 8fa473cb..d14d92b9 100644 --- a/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp +++ b/umbrello/umbrello/codegenerators/cppcodegenerationpolicy.cpp @@ -224,40 +224,40 @@ void CPPCodeGenerationPolicy::setVectorIncludeIsGlobal(bool value) { TQString CPPCodeGenerationPolicy::getVectorMethodAppend(const TQString & variableName, const TQString & itemClassName) { TQString value = m_vectorMethodAppendBase; if(!variableName.isEmpty()) - value.tqreplace(TQRegExp("%VARNAME%"),variableName); - value.tqreplace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName); + value.replace(TQRegExp("%VARNAME%"),variableName); + value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName); if(!itemClassName.isEmpty()) - value.tqreplace(TQRegExp("%ITEMCLASS%"),itemClassName); + value.replace(TQRegExp("%ITEMCLASS%"),itemClassName); return value; } TQString CPPCodeGenerationPolicy::getVectorMethodRemove(const TQString & variableName, const TQString & itemClassName) { TQString value = m_vectorMethodRemoveBase; if(!variableName.isEmpty()) - value.tqreplace(TQRegExp("%VARNAME%"),variableName); - value.tqreplace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName); + value.replace(TQRegExp("%VARNAME%"),variableName); + value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName); if(!itemClassName.isEmpty()) - value.tqreplace(TQRegExp("%ITEMCLASS%"),itemClassName); + value.replace(TQRegExp("%ITEMCLASS%"),itemClassName); return value; } TQString CPPCodeGenerationPolicy::getVectorMethodInit(const TQString & variableName, const TQString & itemClassName) { TQString value = m_vectorMethodInitBase; if(!variableName.isEmpty()) - value.tqreplace(TQRegExp("%VARNAME%"),variableName); - value.tqreplace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName); + value.replace(TQRegExp("%VARNAME%"),variableName); + value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName); if(!itemClassName.isEmpty()) - value.tqreplace(TQRegExp("%ITEMCLASS%"),itemClassName); + value.replace(TQRegExp("%ITEMCLASS%"),itemClassName); return value; } TQString CPPCodeGenerationPolicy::getObjectMethodInit(const TQString & variableName, const TQString & itemClassName) { TQString value = m_objectMethodInitBase; if(!variableName.isEmpty()) - value.tqreplace(TQRegExp("%VARNAME%"),variableName); - value.tqreplace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName); + value.replace(TQRegExp("%VARNAME%"),variableName); + value.replace(TQRegExp("%VECTORTYPENAME%"), m_vectorClassName); if(!itemClassName.isEmpty()) - value.tqreplace(TQRegExp("%ITEMCLASS%"),itemClassName); + value.replace(TQRegExp("%ITEMCLASS%"),itemClassName); return value; } diff --git a/umbrello/umbrello/codegenerators/cppcodegenerator.cpp b/umbrello/umbrello/codegenerators/cppcodegenerator.cpp index 1893ce65..b5571d02 100644 --- a/umbrello/umbrello/codegenerators/cppcodegenerator.cpp +++ b/umbrello/umbrello/codegenerators/cppcodegenerator.cpp @@ -95,7 +95,7 @@ bool CPPCodeGenerator::addHeaderCodeDocument ( CPPHeaderCodeDocument * doc ) doc->setID(tag); } - if(m_codeDocumentDictionary.tqfind(tag)) + if(m_codeDocumentDictionary.find(tag)) return false; // return false, we already have some object with this tag in the list else m_codeDocumentDictionary.insert(tag, doc); diff --git a/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp b/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp index 1e1bab84..c725439f 100644 --- a/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp +++ b/umbrello/umbrello/codegenerators/cppheadercodedocument.cpp @@ -412,7 +412,7 @@ void CPPHeaderCodeDocument::updateContent( ) CodeGenerator::findObjectsRelated(c,includes); for(UMLPackage *con = includes.first(); con ; con = includes.next()) - if (con->getBaseType() != Uml::ot_Datatype && !packageMap.tqcontains(con)) + if (con->getBaseType() != Uml::ot_Datatype && !packageMap.contains(con)) { packageMap.insert(con,con->getPackage()); if(con != getParentClassifier()) diff --git a/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp b/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp index 873cd8c8..ac926426 100644 --- a/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp +++ b/umbrello/umbrello/codegenerators/cppmakecodedocument.cpp @@ -63,10 +63,10 @@ TQString CPPMakefileCodeDocument::getPath ( ) path.simplifyWhiteSpace(); // Replace all blanks with underscore - path.tqreplace(TQRegExp(" "), "_"); + path.replace(TQRegExp(" "), "_"); - path.tqreplace(TQRegExp("\\."),"/"); - path.tqreplace(TQRegExp("::"),"/"); + path.replace(TQRegExp("\\."),"/"); + path.replace(TQRegExp("::"),"/"); path.lower(); diff --git a/umbrello/umbrello/codegenerators/cppwriter.cpp b/umbrello/umbrello/codegenerators/cppwriter.cpp index 3f22a300..d58ceae4 100644 --- a/umbrello/umbrello/codegenerators/cppwriter.cpp +++ b/umbrello/umbrello/codegenerators/cppwriter.cpp @@ -113,7 +113,7 @@ void CppWriter::writeClass(UMLClassifier *c) need_impl = false; } if (need_impl) { - fileName.tqreplace( TQRegExp(".h$"), ".cpp"); + fileName.replace( TQRegExp(".h$"), ".cpp"); if( !openFile(filecpp, fileName)) { emit codeGenerated(c, false); return; @@ -141,13 +141,13 @@ void CppWriter::writeHeaderFile (UMLClassifier *c, TQFile &fileh) { // write header blurb TQString str = getHeadingFile(".h"); if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".h"); - str.tqreplace(TQRegExp("%filepath%"),fileh.name()); + str.replace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".h"); + str.replace(TQRegExp("%filepath%"),fileh.name()); h << str<< m_endl; } // Write the hash define stuff to prevent multiple parsing/inclusion of header - TQString hashDefine = m_classifierInfo->className.upper().simplifyWhiteSpace().tqreplace(TQRegExp(" "), "_"); + TQString hashDefine = m_classifierInfo->className.upper().simplifyWhiteSpace().replace(TQRegExp(" "), "_"); writeBlankLine(h); h << "#ifndef "<< hashDefine + "_H" << m_endl; h << "#define "<< hashDefine + "_H" << m_endl; @@ -206,8 +206,8 @@ void CppWriter::writeSourceFile (UMLClassifier *c, TQFile &filecpp ) { TQString str; str = getHeadingFile(".cpp"); if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".cpp"); - str.tqreplace(TQRegExp("%filepath%"),filecpp.name()); + str.replace(TQRegExp("%filename%"),m_classifierInfo->fileName + ".cpp"); + str.replace(TQRegExp("%filepath%"),filecpp.name()); cpp << str << m_endl; } @@ -627,7 +627,7 @@ void CppWriter::writeAttributeMethods(UMLAttributeList *attribs, // from what I can tell, this IS the default behavior for // cleanName. I dunno why its not working -b.t. methodBaseName = methodBaseName.stripWhiteSpace(); - methodBaseName.tqreplace(0,1,methodBaseName.tqat(0).upper()); + methodBaseName.replace(0,1,methodBaseName.tqat(0).upper()); writeSingleAttributeAccessorMethods(at->getTypeName(), varName, methodBaseName, at->getDoc(), Uml::chg_Changeable, isHeaderMethod, @@ -641,7 +641,7 @@ void CppWriter::writeComment(const TQString &comment, const TQString &myIndent, // in the case we have several line comment.. // NOTE: this part of the method has the problem of adopting UNIX newline, // need to resolve for using with MAC/WinDoze eventually I assume - if (comment.tqcontains(TQRegExp("\n"))) { + if (comment.contains(TQRegExp("\n"))) { TQStringList lines = TQStringList::split( "\n", comment); for(uint i= 0; i < lines.count(); i++) @@ -736,14 +736,14 @@ void CppWriter::writeAssociationRoleDecl(TQString fieldClassName, TQString roleN // declare the association based on whether it is this a single variable // or a List (Vector). One day this will be done correctly with special // multiplicity object that we don't have to figure out what it means via regex. - if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) + if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) { TQString fieldVarName = "m_" + roleName.lower(); // record this for later consideration of initialization IF the // multi value requires 1 of these objects - if(ObjectFieldVariables.tqfindIndex(fieldVarName) == -1 && - multi.tqcontains(TQRegExp("^1$")) + if(ObjectFieldVariables.findIndex(fieldVarName) == -1 && + multi.contains(TQRegExp("^1$")) ) { // ugh. UGLY. Storing variable name and its class in pairs. @@ -759,7 +759,7 @@ void CppWriter::writeAssociationRoleDecl(TQString fieldClassName, TQString roleN // record unique occurrences for later when we want to check // for initialization of this vector - if(VectorFieldVariables.tqfindIndex(fieldVarName) == -1) + if(VectorFieldVariables.findIndex(fieldVarName) == -1) VectorFieldVariables.append(fieldVarName); stream << indent << policyExt()->getVectorClassName() <<"<" << fieldClassName << "*"; @@ -823,7 +823,7 @@ void CppWriter::writeAssociationRoleMethod (const TQString &fieldClassName, const TQString &description, Uml::Changeability_Type change, TQTextStream &stream) { - if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) + if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) { TQString fieldVarName = "m_" + roleName.lower(); writeSingleAttributeAccessorMethods(fieldClassName, fieldVarName, roleName, @@ -860,9 +860,9 @@ void CppWriter::writeVectorAttributeAccessorMethods ( stream << "add" << fldName << " ( " << className << " add_object )"; if (writeMethodBody) { TQString method = VECTOR_METHOD_APPEND; - method.tqreplace(TQRegExp("%VARNAME%"),fieldVarName); - method.tqreplace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName()); - method.tqreplace(TQRegExp("%ITEMCLASS%"),className); + method.replace(TQRegExp("%VARNAME%"),fieldVarName); + method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName()); + method.replace(TQRegExp("%ITEMCLASS%"),className); stream << indent << " {" << m_endl; m_indentLevel++; printTextAsSeparateLinesWithIndent(method,getIndent(),stream); @@ -883,9 +883,9 @@ void CppWriter::writeVectorAttributeAccessorMethods ( stream << "remove" << fldName << " ( " << className << " remove_object )"; if (writeMethodBody) { TQString method = VECTOR_METHOD_REMOVE; - method.tqreplace(TQRegExp("%VARNAME%"),fieldVarName); - method.tqreplace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName()); - method.tqreplace(TQRegExp("%ITEMCLASS%"),className); + method.replace(TQRegExp("%VARNAME%"),fieldVarName); + method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName()); + method.replace(TQRegExp("%ITEMCLASS%"),className); stream << indent << " {" << m_endl; m_indentLevel++; printTextAsSeparateLinesWithIndent(method,getIndent(),stream); @@ -1034,8 +1034,8 @@ void CppWriter::writeInitAttibuteMethod (TQTextStream &stream) for( it = VectorFieldVariables.begin(); it != VectorFieldVariables.end(); ++it ) { TQString fieldVarName = *it; TQString method = VECTOR_METHOD_INIT; - method.tqreplace(TQRegExp("%VARNAME%"),fieldVarName); - method.tqreplace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName()); + method.replace(TQRegExp("%VARNAME%"),fieldVarName); + method.replace(TQRegExp("%VECTORTYPENAME%"), policyExt()->getVectorClassName()); stream << getIndent() << method << m_endl; } } @@ -1047,8 +1047,8 @@ void CppWriter::writeInitAttibuteMethod (TQTextStream &stream) it++; TQString fieldClassName = *it; TQString method = OBJECT_METHOD_INIT; - method.tqreplace(TQRegExp("%VARNAME%"),fieldVarName); - method.tqreplace(TQRegExp("%ITEMCLASS%"),fieldClassName); + method.replace(TQRegExp("%VARNAME%"),fieldVarName); + method.replace(TQRegExp("%ITEMCLASS%"),fieldClassName); stream << getIndent() << method << m_endl; } } diff --git a/umbrello/umbrello/codegenerators/csharpwriter.cpp b/umbrello/umbrello/codegenerators/csharpwriter.cpp index 601ca84b..884661b5 100644 --- a/umbrello/umbrello/codegenerators/csharpwriter.cpp +++ b/umbrello/umbrello/codegenerators/csharpwriter.cpp @@ -169,8 +169,8 @@ void CSharpWriter::writeClass(UMLClassifier *c) { TQString str; str = getHeadingFile(".cs"); if (!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"),fileName); - str.tqreplace(TQRegExp("%filepath%"),filecs.name()); + str.replace(TQRegExp("%filename%"),fileName); + str.replace(TQRegExp("%filepath%"),filecs.name()); cs<<str<<m_endl; } @@ -199,7 +199,7 @@ void CSharpWriter::writeClass(UMLClassifier *c) { UMLClassifier *cl = dynamic_cast<UMLClassifier*>(p); if (cl) p = cl->getUMLPackage(); - if (p != logicalView && m_seenIncludes.tqfindRef(p) == -1 && p != container) { + if (p != logicalView && m_seenIncludes.findRef(p) == -1 && p != container) { cs << "using " << p->getFullyQualifiedName(".") << ";" << m_endl; m_seenIncludes.append(p); } @@ -470,7 +470,7 @@ void CSharpWriter::writeOperations(UMLOperationList opList, if (forceDoc() || !at->getDoc().isEmpty()) { cs << m_container_indent << m_indentation << "/// <param name=\"" << cleanName(at->getName()) << "\">"; //removing newlines from parameter doc - cs << formatDoc(at->getDoc(), "").tqreplace("\n", " ").remove('\r').tqreplace(TQRegExp(" $"), ""); + cs << formatDoc(at->getDoc(), "").replace("\n", " ").remove('\r').replace(TQRegExp(" $"), ""); cs << "</param>" << m_endl; } } @@ -693,7 +693,7 @@ void CSharpWriter::writeAttribute(TQString doc, Uml::Visibility visibility, bool TQString CSharpWriter::makeLocalTypeName(UMLClassifierListItem *cl) { UMLPackage *p = cl->getType()->getUMLPackage(); - if (m_seenIncludes.tqfindRef(p) != -1) { + if (m_seenIncludes.findRef(p) != -1) { return cl->getType()->getName(); } else { diff --git a/umbrello/umbrello/codegenerators/dwriter.cpp b/umbrello/umbrello/codegenerators/dwriter.cpp index 60bc2abb..088ab9c1 100644 --- a/umbrello/umbrello/codegenerators/dwriter.cpp +++ b/umbrello/umbrello/codegenerators/dwriter.cpp @@ -114,8 +114,8 @@ void DWriter::writeClass(UMLClassifier *c) { TQString str; str = getHeadingFile(".d"); if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"),fileName); - str.tqreplace(TQRegExp("%filepath%"),file.name()); + str.replace(TQRegExp("%filename%"),fileName); + str.replace(TQRegExp("%filepath%"),file.name()); d<<str<<m_endl; } @@ -442,8 +442,8 @@ void DWriter::writeComment(const TQString &comment, const TQString &myIndent, TQString tmp = lines[i]; while (tmp.length() > 77) { - uint l = tmp.left(77).tqfindRev(' '); - if (l < 1) l = tmp.tqfind(' ', 77); + uint l = tmp.left(77).findRev(' '); + if (l < 1) l = tmp.find(' ', 77); if (l < 1 || l > tmp.length()) { d << myIndent << (dDocStyle ? " * " : "// ") << tmp << m_endl; break; @@ -527,7 +527,7 @@ void DWriter::writeAssociationRoleDecl(TQString fieldClassName, // declare the association based on whether it is this a single variable // or a List (Vector). One day this will be done correctly with special // multiplicity object that we don't have to figure out what it means via regex. - if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) { + if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) { d << m_indentation << fieldClassName << " "; if (hasAccessors) d << "m_"; @@ -584,7 +584,7 @@ void DWriter::writeAssociationMethods (UMLAssociationList associations, UMLClass void DWriter::writeAssociationRoleMethod (TQString fieldClassName, TQString roleName, TQString multi, TQString description, Uml::Visibility visib, Uml::Changeability_Type change, TQTextStream &d) { - if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) { + if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) { TQString fieldVarName = "m_" + deCapitaliseFirstLetter(roleName); writeSingleAttributeAccessorMethods( @@ -942,7 +942,7 @@ TQString DWriter::getUMLObjectName(UMLObject *obj) { } TQString DWriter::deCapitaliseFirstLetter(TQString string) { - string.tqreplace( 0, 1, string[0].lower()); + string.replace( 0, 1, string[0].lower()); return string; } diff --git a/umbrello/umbrello/codegenerators/idlwriter.cpp b/umbrello/umbrello/codegenerators/idlwriter.cpp index 8e5688ac..1d517fbb 100644 --- a/umbrello/umbrello/codegenerators/idlwriter.cpp +++ b/umbrello/umbrello/codegenerators/idlwriter.cpp @@ -129,8 +129,8 @@ void IDLWriter::writeClass(UMLClassifier *c) { TQString str; str = getHeadingFile(".idl"); if (!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"), fileName); - str.tqreplace(TQRegExp("%filepath%"), file.name()); + str.replace(TQRegExp("%filename%"), fileName); + str.replace(TQRegExp("%filepath%"), file.name()); idl << str << m_endl; } diff --git a/umbrello/umbrello/codegenerators/javaantcodedocument.cpp b/umbrello/umbrello/codegenerators/javaantcodedocument.cpp index 99f0d862..cc9e394b 100644 --- a/umbrello/umbrello/codegenerators/javaantcodedocument.cpp +++ b/umbrello/umbrello/codegenerators/javaantcodedocument.cpp @@ -297,10 +297,10 @@ TQString JavaANTCodeDocument::getPath ( ) path.simplifyWhiteSpace(); // Replace all blanks with underscore - path.tqreplace(TQRegExp(" "), "_"); + path.replace(TQRegExp(" "), "_"); - path.tqreplace(TQRegExp("\\."),"/"); - path.tqreplace(TQRegExp("::"), "/"); + path.replace(TQRegExp("\\."),"/"); + path.replace(TQRegExp("::"), "/"); path.lower(); diff --git a/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp b/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp index e386d01d..877111e1 100644 --- a/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp +++ b/umbrello/umbrello/codegenerators/javaclassifiercodedocument.cpp @@ -89,10 +89,10 @@ TQString JavaClassifierCodeDocument::getPath ( ) path.simplifyWhiteSpace(); // Replace all blanks with underscore - path.tqreplace(TQRegExp(" "), "_"); + path.replace(TQRegExp(" "), "_"); - path.tqreplace(TQRegExp("\\."),"/"); - path.tqreplace(TQRegExp("::"), "/"); + path.replace(TQRegExp("\\."),"/"); + path.replace(TQRegExp("::"), "/"); path.lower(); @@ -371,7 +371,7 @@ void JavaClassifierCodeDocument::updateContent( ) // PACKAGE CODE BLOCK // TQString pkgs = getPackage(); - pkgs.tqreplace(TQRegExp("::"), "."); + pkgs.replace(TQRegExp("::"), "."); TQString packageText = getPackage().isEmpty() ? "" : "package "+pkgs+';'+endLine; CodeBlockWithComments * pblock = addOrUpdateTaggedCodeBlockWithComments("packages", packageText, "", 0, false); if(packageText.isEmpty() && pblock->getContentType() == CodeBlock::AutoGenerated) @@ -397,7 +397,7 @@ void JavaClassifierCodeDocument::updateContent( ) // NO (default) datatypes in the import statement.. use defined // ones whould be possible, but no idea how to do that...at least for now. // Dynamic casting is slow..not an optimal way to do this. - if (!packageMap.tqcontains(con) && con->getBaseType() != Uml::ot_Datatype) + if (!packageMap.contains(con) && con->getBaseType() != Uml::ot_Datatype) { packageMap.insert(con, con->getPackage()); diff --git a/umbrello/umbrello/codegenerators/javacodeclassfield.cpp b/umbrello/umbrello/codegenerators/javacodeclassfield.cpp index 200594e9..c3ebb9e2 100644 --- a/umbrello/umbrello/codegenerators/javacodeclassfield.cpp +++ b/umbrello/umbrello/codegenerators/javacodeclassfield.cpp @@ -68,7 +68,7 @@ TQString JavaCodeClassField::getFieldName() { UMLRole * role = (UMLRole*) getParentObject(); TQString roleName = role->getName(); if(fieldIsSingleValue()) { - return roleName.tqreplace(0, 1, roleName.left(1).lower()); + return roleName.replace(0, 1, roleName.left(1).lower()); } else { return roleName.lower() + "Vector"; } diff --git a/umbrello/umbrello/codegenerators/javacodegenerator.cpp b/umbrello/umbrello/codegenerators/javacodegenerator.cpp index 12462784..d51a7b3c 100644 --- a/umbrello/umbrello/codegenerators/javacodegenerator.cpp +++ b/umbrello/umbrello/codegenerators/javacodegenerator.cpp @@ -115,7 +115,7 @@ TQString JavaCodeGenerator::getListFieldClassName () { // Same thing again for "bool" to "boolean" TQString JavaCodeGenerator::fixTypeName(const TQString &string) { - if (string.isEmpty() || string.tqcontains(TQRegExp("^\\s+$"))) + if (string.isEmpty() || string.contains(TQRegExp("^\\s+$"))) return "void"; if (string == "string") return "String"; diff --git a/umbrello/umbrello/codegenerators/javawriter.cpp b/umbrello/umbrello/codegenerators/javawriter.cpp index 9c351555..19f3c1fd 100644 --- a/umbrello/umbrello/codegenerators/javawriter.cpp +++ b/umbrello/umbrello/codegenerators/javawriter.cpp @@ -137,8 +137,8 @@ void JavaWriter::writeClass(UMLClassifier *c) TQString str; str = getHeadingFile(".java"); if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"),fileName); - str.tqreplace(TQRegExp("%filepath%"),file.name()); + str.replace(TQRegExp("%filename%"),fileName); + str.replace(TQRegExp("%filepath%"),file.name()); java<<str<<m_endl; } @@ -408,7 +408,7 @@ void JavaWriter::writeAttributeMethods(UMLAttributeList &atpub, Uml::Visibility // from what I can tell, this IS the default behavior for // cleanName. I dunno why its not working -b.t. fieldName.stripWhiteSpace(); - fieldName.tqreplace(0,1,fieldName.tqat(0).upper()); + fieldName.replace(0,1,fieldName.tqat(0).upper()); writeSingleAttributeAccessorMethods(at->getTypeName(), cleanName(at->getName()), @@ -425,7 +425,7 @@ void JavaWriter::writeComment(const TQString &comment, const TQString &myIndent, // in the case we have several line comment.. // NOTE: this part of the method has the problem of adopting UNIX newline, // need to resolve for using with MAC/WinDoze eventually I assume - if (comment.tqcontains(TQRegExp("\n"))) { + if (comment.contains(TQRegExp("\n"))) { if(javaDocStyle) java << myIndent << "/**" << m_endl; @@ -530,9 +530,9 @@ void JavaWriter::writeAssociationRoleDecl(TQString fieldClassName, // declare the association based on whether it is this a single variable // or a List (Vector). One day this will be done correctly with special // multiplicity object that we don't have to figure out what it means via regex. - if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) + if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) { - TQString fieldVarName = "m_" + roleName.tqreplace(0, 1, roleName.left(1).lower()); + TQString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower()); java<<startline<<scope<<" "<<fieldClassName<<" "<<fieldVarName<<";"; } else @@ -589,9 +589,9 @@ void JavaWriter::writeAssociationRoleMethod (TQString fieldClassName, TQString r TQString description, Uml::Visibility visib, Uml::Changeability_Type change, TQTextStream &java) { - if(multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) + if(multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) { - TQString fieldVarName = "m_" + roleName.tqreplace(0, 1, roleName.left(1).lower()); + TQString fieldVarName = "m_" + roleName.replace(0, 1, roleName.left(1).lower()); writeSingleAttributeAccessorMethods(fieldClassName, fieldVarName, roleName, description, visib, change, false, java); } diff --git a/umbrello/umbrello/codegenerators/jswriter.cpp b/umbrello/umbrello/codegenerators/jswriter.cpp index b53cd9f6..ea4cc2e1 100644 --- a/umbrello/umbrello/codegenerators/jswriter.cpp +++ b/umbrello/umbrello/codegenerators/jswriter.cpp @@ -68,8 +68,8 @@ void JSWriter::writeClass(UMLClassifier *c) str = getHeadingFile(".js"); if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"),fileName); - str.tqreplace(TQRegExp("%filepath%"),filejs.name()); + str.replace(TQRegExp("%filename%"),fileName); + str.replace(TQRegExp("%filepath%"),filejs.name()); js << str << m_endl; } diff --git a/umbrello/umbrello/codegenerators/pascalwriter.cpp b/umbrello/umbrello/codegenerators/pascalwriter.cpp index 2a42bef7..8d11b893 100644 --- a/umbrello/umbrello/codegenerators/pascalwriter.cpp +++ b/umbrello/umbrello/codegenerators/pascalwriter.cpp @@ -129,7 +129,7 @@ void PascalWriter::writeClass(UMLClassifier *c) { const bool isClass = !c->isInterface(); TQString classname = cleanName(c->getName()); TQString fileName = qualifiedName(c).lower(); - fileName.tqreplace('.', '-'); + fileName.replace('.', '-'); //find an appropriate name for our file fileName = overwritableName(c, fileName, ".pas"); @@ -151,8 +151,8 @@ void PascalWriter::writeClass(UMLClassifier *c) { TQString str; str = getHeadingFile(".pas"); if (!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"), fileName); - str.tqreplace(TQRegExp("%filepath%"), file.name()); + str.replace(TQRegExp("%filename%"), fileName); + str.replace(TQRegExp("%filepath%"), file.name()); pas << str << endl; } @@ -434,7 +434,7 @@ const TQStringList PascalWriter::reservedKeywords() const { keywords.append( "class" ); keywords.append( "const" ); keywords.append( "constructor" ); - keywords.append( "tqcontains" ); + keywords.append( "contains" ); keywords.append( "default" ); keywords.append( "deprecated" ); keywords.append( "destructor" ); diff --git a/umbrello/umbrello/codegenerators/perlwriter.cpp b/umbrello/umbrello/codegenerators/perlwriter.cpp index 93195090..9d51ffde 100644 --- a/umbrello/umbrello/codegenerators/perlwriter.cpp +++ b/umbrello/umbrello/codegenerators/perlwriter.cpp @@ -54,7 +54,7 @@ bool PerlWriter::GetUseStatements(UMLClassifier *c, TQString &Ret, TQString neatName = cleanName(conc->getName()); if (neatName != AV && neatName != SV && neatName != HV) { TQString OtherPkgName = conc->getPackage("."); - OtherPkgName.tqreplace(TQRegExp("\\."),"::"); + OtherPkgName.replace(TQRegExp("\\."),"::"); TQString OtherName = OtherPkgName + "::" + cleanName(conc->getName()); // Only print out the use statement if the other package isn't the @@ -75,7 +75,7 @@ bool PerlWriter::GetUseStatements(UMLClassifier *c, TQString &Ret, for (UMLClassifier *obj = superclasses.first(); obj; obj = superclasses.next()) { TQString packageName = obj->getPackage("."); - packageName.tqreplace(TQRegExp("\\."),"::"); + packageName.replace(TQRegExp("\\."),"::"); Ret += packageName + "::" + cleanName(obj->getName()) + ' '; } @@ -100,11 +100,11 @@ void PerlWriter::writeClass(UMLClassifier *c) { packageName.simplifyWhiteSpace(); // Replace all blanks with underscore - packageName.tqreplace(TQRegExp(" "), "_"); + packageName.replace(TQRegExp(" "), "_"); // Replace all dots (".") with double colon scope resolution operators // ("::") - packageName.tqreplace(TQRegExp("\\."),"::"); + packageName.replace(TQRegExp("\\."),"::"); // Store complete package name TQString ThisPkgName = packageName + "::" + classname; @@ -118,7 +118,7 @@ void PerlWriter::writeClass(UMLClassifier *c) { CodeGenerationPolicy *pol = UMLApp::app()->getCommonPolicy(); TQString curDir = pol->getOutputDirectory().absPath(); - if (fileName.tqcontains("::")) { + if (fileName.contains("::")) { // create new directories for each level TQString newDir; newDir = curDir; @@ -166,14 +166,14 @@ void PerlWriter::writeClass(UMLClassifier *c) { str = getHeadingFile(".pm"); // what this mean? if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"),fileName); - str.tqreplace(TQRegExp("%filepath%"),fileperl.name()); - str.tqreplace(TQRegExp("%year%"),TQDate::tqcurrentDate().toString("yyyy")); - str.tqreplace(TQRegExp("%date%"),TQDate::tqcurrentDate().toString()); - str.tqreplace(TQRegExp("%time%"),TQTime::currentTime().toString()); - str.tqreplace(TQRegExp("%package-name%"),ThisPkgName); - if(str.tqfind(TQRegExp("%PACKAGE-DECLARE%"))){ - str.tqreplace(TQRegExp("%PACKAGE-DECLARE%"), + str.replace(TQRegExp("%filename%"),fileName); + str.replace(TQRegExp("%filepath%"),fileperl.name()); + str.replace(TQRegExp("%year%"),TQDate::tqcurrentDate().toString("yyyy")); + str.replace(TQRegExp("%date%"),TQDate::tqcurrentDate().toString()); + str.replace(TQRegExp("%time%"),TQTime::currentTime().toString()); + str.replace(TQRegExp("%package-name%"),ThisPkgName); + if(str.find(TQRegExp("%PACKAGE-DECLARE%"))){ + str.replace(TQRegExp("%PACKAGE-DECLARE%"), "package " + ThisPkgName + ';' + m_endl + m_endl + "#UML_MODELER_BEGIN_PERSONAL_VARS_" + classname @@ -184,10 +184,10 @@ void PerlWriter::writeClass(UMLClassifier *c) { bPackageDeclared = true; } - if(str.tqfind(TQRegExp("%USE-STATEMENTS%"))){ + if(str.find(TQRegExp("%USE-STATEMENTS%"))){ TQString UseStms; if(GetUseStatements(c,UseStms,ThisPkgName)){ - str.tqreplace(TQRegExp("%USE-STATEMENTS%"), UseStms); + str.replace(TQRegExp("%USE-STATEMENTS%"), UseStms); bUseStmsWritten = true; } } diff --git a/umbrello/umbrello/codegenerators/php5writer.cpp b/umbrello/umbrello/codegenerators/php5writer.cpp index c33ad3aa..e0fe4828 100644 --- a/umbrello/umbrello/codegenerators/php5writer.cpp +++ b/umbrello/umbrello/codegenerators/php5writer.cpp @@ -345,7 +345,7 @@ static const char *php5words[] = "dba_open", "dba_optimize", "dba_popen", - "dba_tqreplace", + "dba_replace", "dbase_add_record", "dbase_close", "dbase_create", @@ -367,7 +367,7 @@ static const char *php5words[] = "dbminsert", "dbmnextkey", "dbmopen", - "dbmtqreplace", + "dbmreplace", "dbplus_add", "dbplus_aql", "dbplus_chdir", @@ -375,7 +375,7 @@ static const char *php5words[] = "dbplus_curr", "dbplus_errcode", "dbplus_errno", - "dbplus_tqfind", + "dbplus_find", "dbplus_first", "dbplus_flush", "dbplus_freealllocks", @@ -511,8 +511,8 @@ static const char *php5words[] = "E_PARSE", "ereg", "eregi", - "eregi_tqreplace", - "ereg_tqreplace", + "eregi_replace", + "ereg_replace", "error_log", "error_reporting", "escapeshellarg", @@ -646,7 +646,7 @@ static const char *php5words[] = "_FILES", "filesize", "filetype", - "tqfind", + "find", "first_child", "floatval", "flock", @@ -1293,7 +1293,7 @@ static const char *php5words[] = "ldap_mod_add", "ldap_mod_del", "ldap_modify", - "ldap_mod_tqreplace", + "ldap_mod_replace", "ldap_next_attribute", "ldap_next_entry", "ldap_next_reference", @@ -1350,9 +1350,9 @@ static const char *php5words[] = "mb_encode_numericentity", "mb_ereg", "mb_eregi", - "mb_eregi_tqreplace", + "mb_eregi_replace", "mb_ereg_match", - "mb_ereg_tqreplace", + "mb_ereg_replace", "mb_ereg_search", "mb_ereg_search_getpos", "mb_ereg_search_getregs", @@ -1565,7 +1565,7 @@ static const char *php5words[] = "msession_create", "msession_destroy", "msession_disconnect", - "msession_tqfind", + "msession_find", "msession_get", "msession_get_array", "msession_getdata", @@ -2323,7 +2323,7 @@ static const char *php5words[] = "preg_match", "preg_match_all", "preg_quote", - "preg_tqreplace", + "preg_replace", "preg_replace_callback", "preg_split", "prev", @@ -2424,7 +2424,7 @@ static const char *php5words[] = "remove_attribute", "remove_child", "rename", - "tqreplace", + "replace", "replace_child", "replace_node", "_REQUEST", @@ -2661,7 +2661,7 @@ static const char *php5words[] = "strpos", "strrchr", "str_repeat", - "str_tqreplace", + "str_replace", "strrev", "str_rot13", "strrpos", @@ -2677,7 +2677,7 @@ static const char *php5words[] = "str_word_count", "substr", "substr_count", - "substr_tqreplace", + "substr_replace", "SWFAction", "swf_actiongeturl", "swf_actiongotoframe", @@ -2816,7 +2816,7 @@ static const char *php5words[] = "udm_crc32", "udm_errno", "udm_error", - "udm_tqfind", + "udm_find", "udm_free_agent", "udm_free_ispell_data", "udm_free_res", @@ -3024,8 +3024,8 @@ void Php5Writer::writeClass(UMLClassifier *c) { TQString str; str = getHeadingFile(".php"); if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"),fileName); - str.tqreplace(TQRegExp("%filepath%"),filephp.name()); + str.replace(TQRegExp("%filename%"),fileName); + str.replace(TQRegExp("%filepath%"),filephp.name()); php<<str<<m_endl; } diff --git a/umbrello/umbrello/codegenerators/phpwriter.cpp b/umbrello/umbrello/codegenerators/phpwriter.cpp index b68417c7..b3c8a43e 100644 --- a/umbrello/umbrello/codegenerators/phpwriter.cpp +++ b/umbrello/umbrello/codegenerators/phpwriter.cpp @@ -343,7 +343,7 @@ static const char *words[] = "dba_open", "dba_optimize", "dba_popen", - "dba_tqreplace", + "dba_replace", "dbase_add_record", "dbase_close", "dbase_create", @@ -365,7 +365,7 @@ static const char *words[] = "dbminsert", "dbmnextkey", "dbmopen", - "dbmtqreplace", + "dbmreplace", "dbplus_add", "dbplus_aql", "dbplus_chdir", @@ -373,7 +373,7 @@ static const char *words[] = "dbplus_curr", "dbplus_errcode", "dbplus_errno", - "dbplus_tqfind", + "dbplus_find", "dbplus_first", "dbplus_flush", "dbplus_freealllocks", @@ -509,8 +509,8 @@ static const char *words[] = "E_PARSE", "ereg", "eregi", - "eregi_tqreplace", - "ereg_tqreplace", + "eregi_replace", + "ereg_replace", "error_log", "error_reporting", "escapeshellarg", @@ -644,7 +644,7 @@ static const char *words[] = "_FILES", "filesize", "filetype", - "tqfind", + "find", "first_child", "floatval", "flock", @@ -1289,7 +1289,7 @@ static const char *words[] = "ldap_mod_add", "ldap_mod_del", "ldap_modify", - "ldap_mod_tqreplace", + "ldap_mod_replace", "ldap_next_attribute", "ldap_next_entry", "ldap_next_reference", @@ -1346,9 +1346,9 @@ static const char *words[] = "mb_encode_numericentity", "mb_ereg", "mb_eregi", - "mb_eregi_tqreplace", + "mb_eregi_replace", "mb_ereg_match", - "mb_ereg_tqreplace", + "mb_ereg_replace", "mb_ereg_search", "mb_ereg_search_getpos", "mb_ereg_search_getregs", @@ -1561,7 +1561,7 @@ static const char *words[] = "msession_create", "msession_destroy", "msession_disconnect", - "msession_tqfind", + "msession_find", "msession_get", "msession_get_array", "msession_getdata", @@ -2319,7 +2319,7 @@ static const char *words[] = "preg_match", "preg_match_all", "preg_quote", - "preg_tqreplace", + "preg_replace", "preg_replace_callback", "preg_split", "prev", @@ -2420,7 +2420,7 @@ static const char *words[] = "remove_attribute", "remove_child", "rename", - "tqreplace", + "replace", "replace_child", "replace_node", "_REQUEST", @@ -2657,7 +2657,7 @@ static const char *words[] = "strpos", "strrchr", "str_repeat", - "str_tqreplace", + "str_replace", "strrev", "str_rot13", "strrpos", @@ -2673,7 +2673,7 @@ static const char *words[] = "str_word_count", "substr", "substr_count", - "substr_tqreplace", + "substr_replace", "SWFAction", "swf_actiongeturl", "swf_actiongotoframe", @@ -2812,7 +2812,7 @@ static const char *words[] = "udm_crc32", "udm_errno", "udm_error", - "udm_tqfind", + "udm_find", "udm_free_agent", "udm_free_ispell_data", "udm_free_res", @@ -3020,8 +3020,8 @@ void PhpWriter::writeClass(UMLClassifier *c) { TQString str; str = getHeadingFile(".php"); if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"),fileName); - str.tqreplace(TQRegExp("%filepath%"),filephp.name()); + str.replace(TQRegExp("%filename%"),fileName); + str.replace(TQRegExp("%filepath%"),filephp.name()); php<<str<<m_endl; } diff --git a/umbrello/umbrello/codegenerators/pythonwriter.cpp b/umbrello/umbrello/codegenerators/pythonwriter.cpp index ba1a636e..8c913022 100644 --- a/umbrello/umbrello/codegenerators/pythonwriter.cpp +++ b/umbrello/umbrello/codegenerators/pythonwriter.cpp @@ -64,7 +64,7 @@ void PythonWriter::writeClass(UMLClassifier *c) { //Replace the first letter of the filename because //python class begin with an upper caracter (convention) first = first.upper(); - fileName = fileName.tqreplace(0, 1, first); + fileName = fileName.replace(0, 1, first); TQFile fileh; if( !openFile(fileh, fileName) ) { @@ -83,8 +83,8 @@ void PythonWriter::writeClass(UMLClassifier *c) { str = getHeadingFile(".py"); if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"), fileName); - str.tqreplace(TQRegExp("%filepath%"), fileh.name()); + str.replace(TQRegExp("%filename%"), fileName); + str.replace(TQRegExp("%filepath%"), fileh.name()); h<<str<<m_endl; } @@ -115,9 +115,9 @@ void PythonWriter::writeClass(UMLClassifier *c) { headerName.remove(TQRegExp(".py$")); first = headerName.at(0); first = first.upper(); - headerName = headerName.tqreplace(0, 1, first); - str = headerName.tqreplace(TQChar('/'),TQChar('.')); - if (includesList.tqfindIndex(str) < 0) // not yet imported + headerName = headerName.replace(0, 1, first); + str = headerName.replace(TQChar('/'),TQChar('.')); + if (includesList.findIndex(str) < 0) // not yet imported h << "from " << str << " import *" << m_endl; } } diff --git a/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp b/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp index 89eb8bd2..f75ff165 100644 --- a/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp +++ b/umbrello/umbrello/codegenerators/rubyclassdeclarationblock.cpp @@ -79,10 +79,10 @@ void RubyClassDeclarationBlock::updateContent ( ) // COMMENT TQString comment = c->getDoc(); - comment.tqreplace("@ref ", ""); - comment.tqreplace("@see", "_See_"); - comment.tqreplace("@short", "_Summary_"); - comment.tqreplace("@author", "_Author_"); + comment.replace("@ref ", ""); + comment.replace("@see", "_See_"); + comment.replace("@short", "_Summary_"); + comment.replace("@author", "_Author_"); if (isInterface) getComment()->setText("Module " + RubyClassName + endLine + comment); diff --git a/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp b/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp index b1a60755..6f5b881d 100644 --- a/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp +++ b/umbrello/umbrello/codegenerators/rubyclassifiercodedocument.cpp @@ -86,10 +86,10 @@ TQString RubyClassifierCodeDocument::getPath ( ) path.simplifyWhiteSpace(); // Replace all blanks with underscore - path.tqreplace(TQRegExp(" "), "_"); + path.replace(TQRegExp(" "), "_"); - path.tqreplace(TQRegExp("\\."),"/"); - path.tqreplace(TQRegExp("::"), "/"); + path.replace(TQRegExp("\\."),"/"); + path.replace(TQRegExp("::"), "/"); path.lower(); diff --git a/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp b/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp index 14d7ce70..a3f4d26f 100644 --- a/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp +++ b/umbrello/umbrello/codegenerators/rubycodeaccessormethod.cpp @@ -153,9 +153,9 @@ void RubyCodeAccessorMethod::updateMethodDeclaration() TQString endLine = p->getNewLineEndingChars(); TQString description = getParentObject()->getDoc(); - description.tqreplace(TQRegExp("m_[npb](?=[A-Z])"), ""); - description.tqreplace("m_", ""); - description.tqreplace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine); + description.replace(TQRegExp("m_[npb](?=[A-Z])"), ""); + description.replace("m_", ""); + description.replace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine); // set scope of this accessor appropriately..if its an attribute, // we need to be more sophisticated diff --git a/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp b/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp index 4d24552a..793db6ed 100644 --- a/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp +++ b/umbrello/umbrello/codegenerators/rubycodeclassfield.cpp @@ -70,7 +70,7 @@ TQString RubyCodeClassField::getFieldName() { UMLRole * role = (UMLRole*) getParentObject(); TQString roleName = role->getName(); if(fieldIsSingleValue()) { - return roleName.tqreplace(0, 1, roleName.left(1).lower()); + return roleName.replace(0, 1, roleName.left(1).lower()); } else { return roleName.lower() + "Array"; } diff --git a/umbrello/umbrello/codegenerators/rubycodegenerator.cpp b/umbrello/umbrello/codegenerators/rubycodegenerator.cpp index e0732773..65b2af15 100644 --- a/umbrello/umbrello/codegenerators/rubycodegenerator.cpp +++ b/umbrello/umbrello/codegenerators/rubycodegenerator.cpp @@ -90,25 +90,25 @@ TQString RubyCodeGenerator::getListFieldClassName () { TQString RubyCodeGenerator::cppToRubyType(const TQString &typeStr) { TQString type = cleanName(typeStr); - type.tqreplace("const ", ""); - type.tqreplace(TQRegExp("[*&\\s]"), ""); - type.tqreplace(TQRegExp("[<>]"), "_"); - type.tqreplace(TQSTRINGLIST_OBJECT_NAME_STRING, "Array"); - type.tqreplace(TQRegExp("^string$"),"String"); - type.tqreplace(TQSTRING_OBJECT_NAME_STRING, "String"); - type.tqreplace("bool", "true|false"); - type.tqreplace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer"); - type.tqreplace(TQRegExp("^(float|double)$"), "Float"); - type.tqreplace(TQRegExp("^Q(?=[A-Z])"), "TQt::"); - type.tqreplace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::"); + type.replace("const ", ""); + type.replace(TQRegExp("[*&\\s]"), ""); + type.replace(TQRegExp("[<>]"), "_"); + type.replace(TQSTRINGLIST_OBJECT_NAME_STRING, "Array"); + type.replace(TQRegExp("^string$"),"String"); + type.replace(TQSTRING_OBJECT_NAME_STRING, "String"); + type.replace("bool", "true|false"); + type.replace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer"); + type.replace(TQRegExp("^(float|double)$"), "Float"); + type.replace(TQRegExp("^Q(?=[A-Z])"), "TQt::"); + type.replace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::"); return type; } TQString RubyCodeGenerator::cppToRubyName(const TQString &nameStr) { TQString name = cleanName(nameStr); - name.tqreplace(TQRegExp("^m_"), ""); - name.tqreplace(TQRegExp("^[pbn](?=[A-Z])"), ""); + name.replace(TQRegExp("^m_"), ""); + name.replace(TQRegExp("^[pbn](?=[A-Z])"), ""); name = name.mid(0, 1).lower() + name.mid(1); return name; } diff --git a/umbrello/umbrello/codegenerators/rubycodeoperation.cpp b/umbrello/umbrello/codegenerators/rubycodeoperation.cpp index caed59d8..5a360838 100644 --- a/umbrello/umbrello/codegenerators/rubycodeoperation.cpp +++ b/umbrello/umbrello/codegenerators/rubycodeoperation.cpp @@ -85,7 +85,7 @@ void RubyCodeOperation::updateMethodDeclaration() methodName = "initialize"; } - methodName.tqreplace(TQRegExp("operator\\s*"), ""); + methodName.replace(TQRegExp("operator\\s*"), ""); methodName = methodName.mid(0, 1).lower() + methodName.mid(1); TQString paramStr = TQString(""); @@ -131,7 +131,7 @@ void RubyCodeOperation::updateMethodDeclaration() UMLAttributeList parameters = o->getParmList(); for(UMLAttributeListIt iterator(parameters); iterator.current(); ++iterator) { comment += endLine + "* _" + iterator.current()->getName() + "_ "; - comment += (' ' + iterator.current()->getDoc().tqreplace( TQRegExp("[\\n\\r]+[\\t ]*"), + comment += (' ' + iterator.current()->getDoc().replace( TQRegExp("[\\n\\r]+[\\t ]*"), endLine + " " ) ); } // add a returns statement too @@ -140,15 +140,15 @@ void RubyCodeOperation::updateMethodDeclaration() getComment()->setText(comment); } } else { - comment.tqreplace(TQRegExp("[\\n\\r]+ *"), endLine); - comment.tqreplace(TQRegExp("[\\n\\r]+\\t*"), endLine); + comment.replace(TQRegExp("[\\n\\r]+ *"), endLine); + comment.replace(TQRegExp("[\\n\\r]+\\t*"), endLine); - comment.tqreplace(" m_", " "); - comment.tqreplace(TQRegExp("\\s[npb](?=[A-Z])"), " "); + comment.replace(" m_", " "); + comment.replace(TQRegExp("\\s[npb](?=[A-Z])"), " "); TQRegExp re_params("@param (\\w)(\\w*)"); int pos = re_params.search(comment); while (pos != -1) { - comment.tqreplace( re_params.cap(0), + comment.replace( re_params.cap(0), TQString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' ); commentedParams.append(re_params.cap(1).lower() + re_params.cap(2)); @@ -160,28 +160,28 @@ void RubyCodeOperation::updateMethodDeclaration() for (UMLAttributeListIt iterator(parameters); iterator.current(); ++iterator) { // Only write an individual @param entry if one hasn't been found already // in the main doc comment - if (commentedParams.tqcontains(RubyCodeGenerator::cppToRubyName(iterator.current()->getName())) == 0) { + if (commentedParams.contains(RubyCodeGenerator::cppToRubyName(iterator.current()->getName())) == 0) { comment += (endLine + "@param _" + RubyCodeGenerator::cppToRubyName(iterator.current()->getName()) + '_'); if (iterator.current()->getDoc().isEmpty()) { comment += (' ' + RubyCodeGenerator::cppToRubyType(iterator.current()->getTypeName())); } else { - comment += (' ' + iterator.current()->getDoc().tqreplace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine + " ")); + comment += (' ' + iterator.current()->getDoc().replace(TQRegExp("[\\n\\r]+[\\t ]*"), endLine + " ")); } } } - comment.tqreplace("@ref ", ""); - comment.tqreplace("@param", "*"); - comment.tqreplace("@return", "* _returns_"); + comment.replace("@ref ", ""); + comment.replace("@param", "*"); + comment.replace("@return", "* _returns_"); // All lines after the first one starting with '*' in the doc comment // must be indented correctly. If they aren't a list // item starting with '*', then indent the text with // two spaces, ' ', to line up with the list item. - pos = comment.tqfind(endLine + '*'); + pos = comment.find(endLine + '*'); if (pos != -1) { pos += endLine.length() + 1; - pos = comment.tqfind(endLine, pos); + pos = comment.find(endLine, pos); } while (pos > 0) { @@ -191,13 +191,13 @@ void RubyCodeOperation::updateMethodDeclaration() pos += 2; } - pos = comment.tqfind(endLine, pos); + pos = comment.find(endLine, pos); } TQString typeStr = RubyCodeGenerator::cppToRubyType(o->getTypeName()); if ( !typeStr.isEmpty() && !TQRegExp("^void\\s*$").exactMatch(typeStr) - && comment.tqcontains("_returns_") == 0 ) + && comment.contains("_returns_") == 0 ) { comment += endLine + "* _returns_ " + typeStr; } diff --git a/umbrello/umbrello/codegenerators/rubywriter.cpp b/umbrello/umbrello/codegenerators/rubywriter.cpp index 5b193220..e736641f 100644 --- a/umbrello/umbrello/codegenerators/rubywriter.cpp +++ b/umbrello/umbrello/codegenerators/rubywriter.cpp @@ -80,18 +80,18 @@ void RubyWriter::writeClass(UMLClassifier *c) { str = getHeadingFile(".rb"); if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"), fileName); - str.tqreplace(TQRegExp("%filepath%"), fileh.name()); + str.replace(TQRegExp("%filename%"), fileName); + str.replace(TQRegExp("%filepath%"), fileh.name()); h<<str<<m_endl; } if(forceDoc() || !c->getDoc().isEmpty()) { TQString docStr = c->getDoc(); - docStr.tqreplace(TQRegExp("\\n"), "\n# "); - docStr.tqreplace("@ref ", ""); - docStr.tqreplace("@see", "_See_"); - docStr.tqreplace("@short", "_Summary_"); - docStr.tqreplace("@author", "_Author_"); + docStr.replace(TQRegExp("\\n"), "\n# "); + docStr.replace("@ref ", ""); + docStr.replace("@see", "_See_"); + docStr.replace("@short", "_Summary_"); + docStr.replace("@author", "_Author_"); h<<"#"<<m_endl; h<<"# "<<docStr<<m_endl; h<<"#"<<m_endl<<m_endl; @@ -146,24 +146,24 @@ void RubyWriter::writeClass(UMLClassifier *c) { TQString RubyWriter::cppToRubyType(const TQString &typeStr) { TQString type = cleanName(typeStr); - type.tqreplace("const ", ""); - type.tqreplace(TQRegExp("[*&\\s]"), ""); - type.tqreplace(TQRegExp("[<>]"), "_"); - type.tqreplace(TQSTRINGLIST_OBJECT_NAME_STRING, "Array"); - type.tqreplace(TQSTRING_OBJECT_NAME_STRING, "String"); - type.tqreplace("bool", "true|false"); - type.tqreplace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer"); - type.tqreplace(TQRegExp("^(float|double)$"), "Float"); - type.tqreplace(TQRegExp("^Q(?=[A-Z])"), "TQt::"); - type.tqreplace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::"); + type.replace("const ", ""); + type.replace(TQRegExp("[*&\\s]"), ""); + type.replace(TQRegExp("[<>]"), "_"); + type.replace(TQSTRINGLIST_OBJECT_NAME_STRING, "Array"); + type.replace(TQSTRING_OBJECT_NAME_STRING, "String"); + type.replace("bool", "true|false"); + type.replace(TQRegExp("^(uint|int|ushort|short|ulong|long)$"), "Integer"); + type.replace(TQRegExp("^(float|double)$"), "Float"); + type.replace(TQRegExp("^Q(?=[A-Z])"), "TQt::"); + type.replace(TQRegExp("^K(?!(DE|Parts|IO)"), "KDE::"); return type; } TQString RubyWriter::cppToRubyName(const TQString &nameStr) { TQString name = cleanName(nameStr); - name.tqreplace(TQRegExp("^m_"), ""); - name.tqreplace(TQRegExp("^[pbn](?=[A-Z])"), ""); + name.replace(TQRegExp("^m_"), ""); + name.replace(TQRegExp("^[pbn](?=[A-Z])"), ""); name = name.mid(0, 1).lower() + name.mid(1); return name; } @@ -251,7 +251,7 @@ void RubyWriter::writeOperations(const TQString &classname, UMLOperationList &op methodName = "initialize"; } - methodName.tqreplace("operator ", ""); + methodName.replace("operator ", ""); methodName = methodName.mid(0, 1).lower() + methodName.mid(1); UMLAttributeList atl = op->getParmList(); @@ -267,15 +267,15 @@ void RubyWriter::writeOperations(const TQString &classname, UMLOperationList &op h << m_indentation << "#" << m_endl; TQString docStr = op->getDoc(); - docStr.tqreplace(TQRegExp("[\\n\\r]+ *"), m_endl); - docStr.tqreplace(TQRegExp("[\\n\\r]+\\t*"), m_endl); + docStr.replace(TQRegExp("[\\n\\r]+ *"), m_endl); + docStr.replace(TQRegExp("[\\n\\r]+\\t*"), m_endl); - docStr.tqreplace(" m_", " "); - docStr.tqreplace(TQRegExp("\\s[npb](?=[A-Z])"), " "); + docStr.replace(" m_", " "); + docStr.replace(TQRegExp("\\s[npb](?=[A-Z])"), " "); TQRegExp re_params("@param (\\w)(\\w*)"); int pos = re_params.search(docStr); while (pos != -1) { - docStr.tqreplace( re_params.cap(0), + docStr.replace( re_params.cap(0), TQString("@param _") + re_params.cap(1).lower() + re_params.cap(2) + '_' ); commentedParams.append(re_params.cap(1).lower() + re_params.cap(2)); @@ -283,31 +283,31 @@ void RubyWriter::writeOperations(const TQString &classname, UMLOperationList &op pos = re_params.search(docStr, pos); } - docStr.tqreplace("\n", TQString("\n") + m_indentation + "# "); + docStr.replace("\n", TQString("\n") + m_indentation + "# "); // Write parameter documentation for (at = atl.first(); at ; at = atl.next()) { // Only write an individual @param entry if one hasn't been found already // in the main doc comment - if (commentedParams.tqcontains(cppToRubyName(at->getName())) == 0) { + if (commentedParams.contains(cppToRubyName(at->getName())) == 0) { docStr += (m_endl + m_indentation + "# @param _" + cppToRubyName(at->getName()) + '_'); if (at->getDoc().isEmpty()) { docStr += (' ' + cppToRubyType(at->getTypeName())); } else { - docStr += (' ' + at->getDoc().tqreplace(TQRegExp("[\\n\\r]+[\\t ]*"), m_endl + " ")); + docStr += (' ' + at->getDoc().replace(TQRegExp("[\\n\\r]+[\\t ]*"), m_endl + " ")); } } } - docStr.tqreplace("@ref ", ""); - docStr.tqreplace("@param", "*"); - docStr.tqreplace("@return", "* _returns_"); + docStr.replace("@ref ", ""); + docStr.replace("@param", "*"); + docStr.replace("@return", "* _returns_"); // All lines after the first '# *' in the doc comment // must be indented correctly. If they aren't a list // item starting with '# *', then indent the text with // three spaces, '# ', to line up with the list item. - pos = docStr.tqfind("# *"); + pos = docStr.find("# *"); TQRegExp re_linestart("# (?!\\*)"); pos = re_linestart.search(docStr, pos); while (pos > 0) { @@ -320,7 +320,7 @@ void RubyWriter::writeOperations(const TQString &classname, UMLOperationList &op h << m_indentation << "# "<< docStr << m_endl; TQString typeStr = cppToRubyType(op->getTypeName()); - if (!typeStr.isEmpty() && typeStr != "void" && docStr.tqcontains("_returns_") == 0) { + if (!typeStr.isEmpty() && typeStr != "void" && docStr.contains("_returns_") == 0) { h << m_indentation << "# * _returns_ " << typeStr << m_endl; } } @@ -375,9 +375,9 @@ void RubyWriter::writeSingleAttributeAccessorMethods( TQTextStream &h) { TQString description = descr; - description.tqreplace(TQRegExp("m_[npb](?=[A-Z])"), ""); - description.tqreplace("m_", ""); - description.tqreplace("\n", TQString("\n") + m_indentation + "# "); + description.replace(TQRegExp("m_[npb](?=[A-Z])"), ""); + description.replace("m_", ""); + description.replace("\n", TQString("\n") + m_indentation + "# "); if (!description.isEmpty()) { h << m_indentation << "# " << description << m_endl; diff --git a/umbrello/umbrello/codegenerators/simplecodegenerator.cpp b/umbrello/umbrello/codegenerators/simplecodegenerator.cpp index ca118eb2..a3bb17df 100644 --- a/umbrello/umbrello/codegenerators/simplecodegenerator.cpp +++ b/umbrello/umbrello/codegenerators/simplecodegenerator.cpp @@ -77,7 +77,7 @@ TQString SimpleCodeGenerator::getIndent () TQString SimpleCodeGenerator::findFileName(UMLPackage* concept, const TQString &ext) { //if we already know to which file this class was written/should be written, just return it. - if (m_fileMap.tqcontains(concept)) + if (m_fileMap.contains(concept)) return m_fileMap[concept]; //else, determine the "natural" file name @@ -89,16 +89,16 @@ TQString SimpleCodeGenerator::findFileName(UMLPackage* concept, const TQString & package.simplifyWhiteSpace(); // Replace all blanks with underscore - package.tqreplace(TQRegExp(" "), "_"); + package.replace(TQRegExp(" "), "_"); // Convert all "::" to "/" : Platform-specific path separator - // package.tqreplace(TQRegExp("::"), "/"); + // package.replace(TQRegExp("::"), "/"); // if package is given add this as a directory to the file name if (!package.isEmpty() && m_createDirHierarchyForPackages) { name = package + '.' + concept->getName(); - name.tqreplace(TQRegExp("\\."),"/"); - package.tqreplace(TQRegExp("\\."), "/"); + name.replace(TQRegExp("\\."),"/"); + package.replace(TQRegExp("\\."), "/"); package = '/' + package; } else { name = concept->getFullyQualifiedName("-"); @@ -136,10 +136,10 @@ TQString SimpleCodeGenerator::findFileName(UMLPackage* concept, const TQString & name.simplifyWhiteSpace(); - name.tqreplace(TQRegExp(" "),"_"); + name.replace(TQRegExp(" "),"_"); TQString extension = ext.simplifyWhiteSpace(); - extension.tqreplace(' ', '_'); + extension.replace(' ', '_'); return overwritableName(concept, name, extension); } diff --git a/umbrello/umbrello/codegenerators/sqlwriter.cpp b/umbrello/umbrello/codegenerators/sqlwriter.cpp index 214af4ad..8582ec93 100644 --- a/umbrello/umbrello/codegenerators/sqlwriter.cpp +++ b/umbrello/umbrello/codegenerators/sqlwriter.cpp @@ -65,8 +65,8 @@ void SQLWriter::writeClass(UMLClassifier *c) { TQString str; str = getHeadingFile(".sql"); if(!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"),fileName); - str.tqreplace(TQRegExp("%filepath%"),file.name()); + str.replace(TQRegExp("%filename%"),fileName); + str.replace(TQRegExp("%filepath%"),file.name()); sql<<str<<m_endl; } @@ -140,7 +140,7 @@ void SQLWriter::writeAttributes(UMLClassifier *c, TQTextStream &sql) { } // now print the attributes; they are sorted by there scope - // in front of the first attribute shouldn't be a , -> so we need to tqfind + // in front of the first attribute shouldn't be a , -> so we need to find // out, when the first attribute was added bool first = true; diff --git a/umbrello/umbrello/codegenerators/tclwriter.cpp b/umbrello/umbrello/codegenerators/tclwriter.cpp index 913211c4..6d40b4b0 100644 --- a/umbrello/umbrello/codegenerators/tclwriter.cpp +++ b/umbrello/umbrello/codegenerators/tclwriter.cpp @@ -58,7 +58,7 @@ static const char *tclwords[] = { "llength", "load", "lrange", - "ltqreplace", + "lreplace", "method", "namespace", "private", @@ -165,8 +165,8 @@ TclWriter::writeHeaderFile(UMLClassifier * c, TQFile & fileh) // write header blurb TQString str = getHeadingFile(".tcl"); if (!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"), classifierInfo->fileName); - str.tqreplace(TQRegExp("%filepath%"), fileh.name()); + str.replace(TQRegExp("%filename%"), classifierInfo->fileName); + str.replace(TQRegExp("%filepath%"), fileh.name()); writeCode(str); } // set current namespace @@ -337,8 +337,8 @@ TclWriter::writeSourceFile(UMLClassifier * c, TQFile & filetcl) TQString str; str = getHeadingFile(".tclbody"); if (!str.isEmpty()) { - str.tqreplace(TQRegExp("%filename%"), classifierInfo->fileName + "body"); - str.tqreplace(TQRegExp("%filepath%"), filetcl.name()); + str.replace(TQRegExp("%filename%"), classifierInfo->fileName + "body"); + str.replace(TQRegExp("%filepath%"), filetcl.name()); writeCode(str); } // Start body of class @@ -599,13 +599,13 @@ TclWriter::writeAssociationRoleDecl(const TQString &fieldClassName, const TQStri // declare the association based on whether it is this a single variable // or a List (Vector). One day this will be done correctly with special // multiplicity object that we don't have to figure out what it means via regex. - if (multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) { + if (multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) { TQString fieldVarName = roleName.lower(); // record this for later consideration of initialization IF the // multi value requires 1 of these objects - if (ObjectFieldVariables.tqfindIndex(fieldVarName) == -1 && - multi.tqcontains(TQRegExp("^1$")) + if (ObjectFieldVariables.findIndex(fieldVarName) == -1 && + multi.contains(TQRegExp("^1$")) ) { // ugh. UGLY. Storing variable name and its class in pairs. ObjectFieldVariables.append(fieldVarName); @@ -619,7 +619,7 @@ TclWriter::writeAssociationRoleDecl(const TQString &fieldClassName, const TQStri // record unique occurrences for later when we want to check // for initialization of this vector - if (VectorFieldVariables.tqfindIndex(fieldVarName) == -1) + if (VectorFieldVariables.findIndex(fieldVarName) == -1) VectorFieldVariables.append(fieldVarName); writeDocu(m_endl + "@var" + scope + " variable <" + fieldClassName + "*> " + fieldVarName + m_endl + doc); @@ -888,7 +888,7 @@ TclWriter::writeAssociationRoleSource(const TQString &fieldClassName, // declare the association based on whether it is this a single variable // or a List (Vector). One day this will be done correctly with special // multiplicity object that we don't have to figure out what it means via regex. - if (multi.isEmpty() || multi.tqcontains(TQRegExp("^[01]$"))) { + if (multi.isEmpty() || multi.contains(TQRegExp("^[01]$"))) { TQString fieldVarName = roleName.lower(); writeCode("configbody " + mClassGlobal + "::" + fieldVarName + " {} {"); diff --git a/umbrello/umbrello/codegenerators/xmlschemawriter.cpp b/umbrello/umbrello/codegenerators/xmlschemawriter.cpp index 00753349..39b530bb 100644 --- a/umbrello/umbrello/codegenerators/xmlschemawriter.cpp +++ b/umbrello/umbrello/codegenerators/xmlschemawriter.cpp @@ -87,8 +87,8 @@ void XMLSchemaWriter::writeClass(UMLClassifier *c) // 1. create the header TQString headerText = getHeadingFile(".xsd"); if(!headerText.isEmpty()) { - headerText.tqreplace(TQRegExp("%filename%"),fileName); - headerText.tqreplace(TQRegExp("%filepath%"),file.name()); + headerText.replace(TQRegExp("%filename%"),fileName); + headerText.replace(TQRegExp("%filepath%"),file.name()); } if(!headerText.isEmpty()) XMLschema<<headerText<<m_endl; @@ -445,7 +445,7 @@ void XMLSchemaWriter::writeChildObjsInAssociation (UMLClassifier *c, } bool XMLSchemaWriter::hasBeenWritten(UMLClassifier *c) { - if (writtenClassifiers.tqcontains(c)) + if (writtenClassifiers.contains(c)) return true; else return false; @@ -529,7 +529,7 @@ void XMLSchemaWriter::writeComment( const TQString &comment, TQTextStream &XMLsc // need to resolve for using with MAC/WinDoze eventually I assume TQString indent = getIndent(); XMLschema<<indent<<"<!-- "; - if (comment.tqcontains(TQRegExp("\n"))) { + if (comment.contains(TQRegExp("\n"))) { XMLschema<<m_endl; TQStringList lines = TQStringList::split( "\n", comment); for(uint i= 0; i < lines.count(); i++) @@ -673,10 +673,10 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const TQString { // populate both with the actual value as long as our value isnt an asterix // In that case, use special value (from above) - if(values[0].tqcontains(TQRegExp("\\d{1,}"))) + if(values[0].contains(TQRegExp("\\d{1,}"))) minOccurs = values[0]; // use first number in sequence - if(values[values.count()-1].tqcontains(TQRegExp("\\d{1,}"))) + if(values[values.count()-1].contains(TQRegExp("\\d{1,}"))) maxOccurs = values[values.count()-1]; // use only last number in sequence } } @@ -736,8 +736,8 @@ void XMLSchemaWriter::writeAssociationRoleDecl( UMLClassifier *c, const TQString // Same thing again for "bool" to "boolean" TQString XMLSchemaWriter::fixTypeName(const TQString& string) { - // string.tqreplace(TQRegExp("^string$"),schemaNamespaceTag+":string"); - // string.tqreplace(TQRegExp("^bool$"),schemaNamespaceTag+":boolean"); + // string.replace(TQRegExp("^string$"),schemaNamespaceTag+":string"); + // string.replace(TQRegExp("^bool$"),schemaNamespaceTag+":boolean"); return schemaNamespaceTag + ':' + string; } diff --git a/umbrello/umbrello/codegenobjectwithtextblocks.cpp b/umbrello/umbrello/codegenobjectwithtextblocks.cpp index 47cd27d3..839e82b4 100644 --- a/umbrello/umbrello/codegenobjectwithtextblocks.cpp +++ b/umbrello/umbrello/codegenobjectwithtextblocks.cpp @@ -96,7 +96,7 @@ bool CodeGenObjectWithTextBlocks::addTextBlock(TextBlock* add_object ) { } } - if(m_textBlockTagMap.tqcontains(tag)) + if(m_textBlockTagMap.contains(tag)) return false; // return false, we already have some object with this tag in the list // if we get here, then the object is a "fresh" one, we havent @@ -136,7 +136,7 @@ bool CodeGenObjectWithTextBlocks::removeTextBlock ( TextBlock * remove_object ) TextBlock * CodeGenObjectWithTextBlocks::findTextBlockByTag( const TQString &tag ) { //if we already know to which file this class was written/should be written, just return it. - if(m_textBlockTagMap.tqcontains(tag)) + if(m_textBlockTagMap.contains(tag)) return m_textBlockTagMap[tag]; return (TextBlock*) NULL; diff --git a/umbrello/umbrello/codeimport/adaimport.cpp b/umbrello/umbrello/codeimport/adaimport.cpp index 05dc2f68..c568cf3f 100644 --- a/umbrello/umbrello/codeimport/adaimport.cpp +++ b/umbrello/umbrello/codeimport/adaimport.cpp @@ -132,7 +132,7 @@ TQString AdaImport::expand(const TQString& name) { return name; TQString result = name; TQString pfx = pfxRegExp.cap(1); - if (m_renaming.tqcontains(pfx)) { + if (m_renaming.contains(pfx)) { result.remove(pfxRegExp); result.prepend(m_renaming[pfx] + '.'); } @@ -146,7 +146,7 @@ void AdaImport::parseStems(const TQStringList& stems) { uint i = 0; while (1) { TQString filename = base + ".ads"; - if (! m_parsedFiles.tqcontains(filename)) { + if (! m_parsedFiles.contains(filename)) { // Save current m_source and m_srcIndex. TQStringList source(m_source); uint srcIndex = m_srcIndex; @@ -332,7 +332,7 @@ bool AdaImport::parseStmt() { } m_isAbstract = false; if (isTaggedType) { - if (! m_classesDefinedInThisScope.tqcontains(ns)) + if (! m_classesDefinedInThisScope.contains(ns)) m_classesDefinedInThisScope.append(ns); } else { ns->setStereotype("record"); @@ -478,7 +478,7 @@ bool AdaImport::parseStmt() { Uml::Object_Type t = type->getBaseType(); if ((t != Uml::ot_Interface && (t != Uml::ot_Class || type->getStereotype() == "record")) || - !m_classesDefinedInThisScope.tqcontains(type)) { + !m_classesDefinedInThisScope.contains(type)) { // Not an instance bound method - we cannot represent it. skipStmt(")"); break; diff --git a/umbrello/umbrello/codeimport/classimport.cpp b/umbrello/umbrello/codeimport/classimport.cpp index 9a7cbae9..469e4030 100644 --- a/umbrello/umbrello/codeimport/classimport.cpp +++ b/umbrello/umbrello/codeimport/classimport.cpp @@ -47,7 +47,7 @@ ClassImport *ClassImport::createImporterByFileExt(const TQString &filename) { classImporter = new PythonImport(); else if (filename.endsWith(".java")) classImporter = new JavaImport(); - else if (filename.tqcontains( TQRegExp("\\.ad[sba]$") )) + else if (filename.contains( TQRegExp("\\.ad[sba]$") )) classImporter = new AdaImport(); else if (filename.endsWith(".pas")) classImporter = new PascalImport(); diff --git a/umbrello/umbrello/codeimport/cppimport.cpp b/umbrello/umbrello/codeimport/cppimport.cpp index 68d8f731..f97a5359 100644 --- a/umbrello/umbrello/codeimport/cppimport.cpp +++ b/umbrello/umbrello/codeimport/cppimport.cpp @@ -50,7 +50,7 @@ CppImport::CppImport() { CppImport::~CppImport() {} void CppImport::feedTheModel(const TQString& fileName) { - if (ms_seenFiles.tqfind(fileName) != ms_seenFiles.end()) + if (ms_seenFiles.find(fileName) != ms_seenFiles.end()) return; ms_seenFiles.append(fileName); TQMap<TQString, Dependence> deps = ms_driver->dependences(fileName); @@ -66,7 +66,7 @@ void CppImport::feedTheModel(const TQString& fileName) { continue; } kDebug() << fileName << ": " << includeFile << " => " << it.data().first << endl; - if (ms_seenFiles.tqfind(includeFile) == ms_seenFiles.end()) + if (ms_seenFiles.find(includeFile) == ms_seenFiles.end()) feedTheModel(includeFile); } } @@ -101,7 +101,7 @@ void CppImport::initialize() { } void CppImport::parseFile(const TQString& fileName) { - if (ms_seenFiles.tqfind(fileName) != ms_seenFiles.end()) + if (ms_seenFiles.find(fileName) != ms_seenFiles.end()) return; ms_driver->parseFile( fileName ); feedTheModel(fileName); diff --git a/umbrello/umbrello/codeimport/idlimport.cpp b/umbrello/umbrello/codeimport/idlimport.cpp index 36d8992f..cd2db89d 100644 --- a/umbrello/umbrello/codeimport/idlimport.cpp +++ b/umbrello/umbrello/codeimport/idlimport.cpp @@ -84,7 +84,7 @@ void IDLImport::fillSource(const TQString& word) { } void IDLImport::parseFile(const TQString& filename) { - if (filename.tqcontains('/')) { + if (filename.contains('/')) { TQString path = filename; path.remove( TQRegExp("/[^/]+$") ); kDebug() << "IDLImport::parseFile: adding path " << path << endl; @@ -290,13 +290,13 @@ bool IDLImport::parseStmt() { // (of a member of struct or valuetype, or return type // of an operation.) Up next is the name of the attribute // or operation. - if (! keyword.tqcontains( TQRegExp("^\\w") )) { + if (! keyword.contains( TQRegExp("^\\w") )) { kError() << "importIDL: ignoring " << keyword << endl; return false; } TQString typeName = joinTypename(); TQString name = advance(); - if (name.tqcontains( TQRegExp("\\W") )) { + if (name.contains( TQRegExp("\\W") )) { kError() << "importIDL: expecting name in " << name << endl; return false; } diff --git a/umbrello/umbrello/codeimport/import_utils.cpp b/umbrello/umbrello/codeimport/import_utils.cpp index 44c8f380..5afae684 100644 --- a/umbrello/umbrello/codeimport/import_utils.cpp +++ b/umbrello/umbrello/codeimport/import_utils.cpp @@ -97,9 +97,9 @@ TQString formatComment(const TQString &comment) { lines.pop_front(); // nothing interesting on this line } TQString& last = lines.last(); - int endpos = last.tqfind("*/"); + int endpos = last.find("*/"); if (endpos != -1) { - if (last.tqcontains(wordex)) + if (last.contains(wordex)) last = last.mid(0, endpos - 1); // remove comment end else lines.pop_back(); // nothing interesting on this line @@ -142,12 +142,12 @@ UMLObject *createUMLObject(Uml::Object_Type type, bNewUMLObjectWasCreated = false; if (o == NULL) { // Strip possible adornments and look again. - int isConst = name.tqcontains(TQRegExp("^const ")); + int isConst = name.contains(TQRegExp("^const ")); name.remove(TQRegExp("^const\\s+")); TQString typeName(name); - const int isAdorned = typeName.tqcontains( TQRegExp("[^\\w:\\. ]") ); - const int isPointer = typeName.tqcontains('*'); - const int isRef = typeName.tqcontains('&'); + const int isAdorned = typeName.contains( TQRegExp("[^\\w:\\. ]") ); + const int isPointer = typeName.contains('*'); + const int isRef = typeName.contains('&'); typeName.remove(TQRegExp("[^\\w:\\. ].*$")); typeName = typeName.simplifyWhiteSpace(); UMLObject *origType = umldoc->findUMLObject(typeName, Uml::ot_UMLObject, parentPkg); @@ -157,9 +157,9 @@ UMLObject *createUMLObject(Uml::Object_Type type, parentPkg = logicalView; // Find, or create, the scopes. TQStringList components; - if (typeName.tqcontains("::")) { + if (typeName.contains("::")) { components = TQStringList::split("::", typeName); - } else if (typeName.tqcontains(".")) { + } else if (typeName.contains(".")) { components = TQStringList::split(".", typeName); } if (components.count() > 1) { @@ -449,7 +449,7 @@ TQStringList includePathList() { } void addIncludePath(const TQString& path) { - if (! incPathList.tqcontains(path)) + if (! incPathList.contains(path)) incPathList.append(path); } diff --git a/umbrello/umbrello/codeimport/javaimport.cpp b/umbrello/umbrello/codeimport/javaimport.cpp index ac37e066..0ff5b689 100644 --- a/umbrello/umbrello/codeimport/javaimport.cpp +++ b/umbrello/umbrello/codeimport/javaimport.cpp @@ -86,7 +86,7 @@ void JavaImport::fillSource(const TQString& word) { void JavaImport::spawnImport( TQString file ) { // if the file is being parsed, don't bother // - if (s_filesAlreadyParsed.tqcontains( file ) ) { + if (s_filesAlreadyParsed.contains( file ) ) { return; } if (TQFile::exists(file)) { @@ -112,7 +112,7 @@ UMLObject* JavaImport::resolveClass (TQString className) { kDebug() << "importJava trying to resolve " << className << endl; // keep track if we are dealing with an array // - bool isArray = className.tqcontains('['); + bool isArray = className.contains('['); // remove any [] so that the class itself can be resolved // TQString baseClassName = className; @@ -271,7 +271,7 @@ bool JavaImport::parseStmt() { } while (1) { const TQString arg = m_source[++start]; - if (! arg.tqcontains( TQRegExp("^[A-Za-z_]") )) { + if (! arg.contains( TQRegExp("^[A-Za-z_]") )) { kDebug() << "importJava(" << name << "): cannot handle template syntax (" << arg << ")" << endl; break; @@ -420,7 +420,7 @@ bool JavaImport::parseStmt() { // (of a member of class or interface, or return type // of an operation.) Up next is the name of the attribute // or operation. - if (! keyword.tqcontains( TQRegExp("^\\w") )) { + if (! keyword.contains( TQRegExp("^\\w") )) { kError() << "importJava: ignoring " << keyword << endl; return false; } @@ -441,7 +441,7 @@ bool JavaImport::parseStmt() { } else { nextToken = advance(); } - if (name.tqcontains( TQRegExp("\\W") )) { + if (name.contains( TQRegExp("\\W") )) { kError() << "importJava: expecting name in " << name << endl; return false; } diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast.h b/umbrello/umbrello/codeimport/kdevcppparser/ast.h index 0de3a2ed..568b480a 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/ast.h +++ b/umbrello/umbrello/codeimport/kdevcppparser/ast.h @@ -830,7 +830,7 @@ public: class ParameterDeclarationClauseAST* parameterDeclarationClause() { return m_parameterDeclarationClause.get(); } void setParameterDeclarationClause( AUTO_PTR<class ParameterDeclarationClauseAST>& parameterDeclarationClause ); - // ### tqreplace 'constant' with cvQualify + // ### replace 'constant' with cvQualify AST* constant() { return m_constant.get(); } void setConstant( AST::Node& constant ); diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp index ac33d165..a30db121 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp @@ -110,7 +110,7 @@ TQString typeSpecToString( TypeSpecifierAST* typeSpec ) /// @todo remove if( !typeSpec ) return TQString(); - return typeSpec->text().tqreplace( TQRegExp(" :: "), "::" ); + return typeSpec->text().replace( TQRegExp(" :: "), "::" ); } TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, bool skipPtrOp ) @@ -171,6 +171,6 @@ TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, b text += " const"; } - return text.tqreplace( TQRegExp(" :: "), "::" ).simplifyWhiteSpace(); + return text.replace( TQRegExp(" :: "), "::" ).simplifyWhiteSpace(); } diff --git a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp index f8e6c475..8bb7167a 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp @@ -150,7 +150,7 @@ void CppTree2Uml::parseTypedef( TypedefAST* ast ) */ bool isDatatype = Import_Utils::isDatatype(typeId, m_currentNamespace[m_nsCnt]); - if (type.tqcontains('*') || isDatatype) { + if (type.contains('*') || isDatatype) { UMLObject *inner = Import_Utils::createUMLObject( Uml::ot_Class, typeId, m_currentNamespace[m_nsCnt] ); @@ -300,7 +300,7 @@ void CppTree2Uml::parseFunctionDefinition( FunctionDefinitionAST* ast ) UMLOperation *m = Import_Utils::makeOperation(c, id); // if a class has no return type, it could be a constructor or // a destructor - if (d && returnType.isEmpty() && id.tqfind("~") == -1) + if (d && returnType.isEmpty() && id.find("~") == -1) isConstructor = true; parseFunctionArguments( d, m ); @@ -530,7 +530,7 @@ void CppTree2Uml::parseFunctionDeclaration( GroupAST* funSpec, GroupAST* storag UMLOperation *m = Import_Utils::makeOperation(c, id); // if a class has no return type, it could be a constructor or // a destructor - if (d && returnType.isEmpty() && id.tqfind("~") == -1) + if (d && returnType.isEmpty() && id.find("~") == -1) isConstructor = true; parseFunctionArguments( d, m ); diff --git a/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp b/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp index 030f7f2b..8a76b939 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp @@ -100,7 +100,7 @@ void Driver::remove( const TQString & fileName ) m_problems.remove( fileName ); removeAllMacrosInFile( fileName ); - TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.tqfind( fileName ); + TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName ); if( it != m_parsedUnits.end() ){ TranslationUnitAST* unit = *it; m_parsedUnits.remove( it ); @@ -120,7 +120,7 @@ void Driver::removeAllMacrosInFile( const TQString& fileName ) TranslationUnitAST::Node Driver::takeTranslationUnit( const TQString& fileName ) { - TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.tqfind( fileName ); + TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName ); TranslationUnitAST::Node unit( *it ); //m_parsedUnits.remove( it ); m_parsedUnits[ fileName] = 0; @@ -129,7 +129,7 @@ TranslationUnitAST::Node Driver::takeTranslationUnit( const TQString& fileName ) TranslationUnitAST* Driver::translationUnit( const TQString& fileName ) const { - TQMap<TQString, TranslationUnitAST*>::ConstIterator it = m_parsedUnits.tqfind( fileName ); + TQMap<TQString, TranslationUnitAST*>::ConstIterator it = m_parsedUnits.find( fileName ); return it != m_parsedUnits.end() ? *it : 0; } @@ -146,7 +146,7 @@ void Driver::addDependence( const TQString & fileName, const Dependence & dep ) TQString file = findIncludeFile( dep ); findOrInsertDependenceList( fileName ).insert( file, dep ); - if ( m_parsedUnits.tqfind(file) != m_parsedUnits.end() ) + if ( m_parsedUnits.find(file) != m_parsedUnits.end() ) return; if ( !TQFile::exists( file ) ) { @@ -176,7 +176,7 @@ void Driver::addProblem( const TQString & fileName, const Problem & problem ) TQMap< TQString, Dependence >& Driver::findOrInsertDependenceList( const TQString & fileName ) { - TQMap<TQString, TQMap<TQString, Dependence> >::Iterator it = m_dependences.tqfind( fileName ); + TQMap<TQString, TQMap<TQString, Dependence> >::Iterator it = m_dependences.find( fileName ); if( it != m_dependences.end() ) return it.data(); @@ -187,7 +187,7 @@ TQMap< TQString, Dependence >& Driver::findOrInsertDependenceList( const TQStrin TQValueList < Problem >& Driver::findOrInsertProblemList( const TQString & fileName ) { - TQMap<TQString, TQValueList<Problem> >::Iterator it = m_problems.tqfind( fileName ); + TQMap<TQString, TQValueList<Problem> >::Iterator it = m_problems.find( fileName ); if( it != m_problems.end() ) return it.data(); @@ -198,7 +198,7 @@ TQValueList < Problem >& Driver::findOrInsertProblemList( const TQString & fileN TQMap< TQString, Dependence > Driver::dependences( const TQString & fileName ) const { - TQMap<TQString, TQMap<TQString, Dependence> >::ConstIterator it = m_dependences.tqfind( fileName ); + TQMap<TQString, TQMap<TQString, Dependence> >::ConstIterator it = m_dependences.find( fileName ); if( it != m_dependences.end() ) return it.data(); return TQMap<TQString, Dependence>(); @@ -211,7 +211,7 @@ TQMap< TQString, Macro > Driver::macros() const TQValueList < Problem > Driver::problems( const TQString & fileName ) const { - TQMap<TQString, TQValueList<Problem> >::ConstIterator it = m_problems.tqfind( fileName ); + TQMap<TQString, TQValueList<Problem> >::ConstIterator it = m_problems.find( fileName ); if( it != m_problems.end() ) return it.data(); return TQValueList<Problem>(); @@ -222,7 +222,7 @@ void Driver::parseFile( const TQString& fileName, bool onlyPreProcess, bool forc TQFileInfo fileInfo( fileName ); TQString absFilePath = fileInfo.absFilePath(); - TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.tqfind( absFilePath ); + TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( absFilePath ); if( force && it != m_parsedUnits.end() ){ takeTranslationUnit( absFilePath ); diff --git a/umbrello/umbrello/codeimport/kdevcppparser/driver.h b/umbrello/umbrello/codeimport/kdevcppparser/driver.h index 5a300745..9c365129 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/driver.h +++ b/umbrello/umbrello/codeimport/kdevcppparser/driver.h @@ -185,7 +185,7 @@ public: TQMap<TQString, Macro> macros() const; TQValueList<Problem> problems( const TQString& fileName ) const; - bool hasMacro( const TQString& name ) const { return m_macros.tqcontains( name ); } + bool hasMacro( const TQString& name ) const { return m_macros.contains( name ); } const Macro& macro( const TQString& name ) const { return m_macros[ name ]; } Macro& macro( const TQString& name ) { return m_macros[ name ]; } diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp b/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp index 270c3d87..f51c9986 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp @@ -83,7 +83,7 @@ struct LexerData const Scope& scope = *it; ++it; - if( scope.tqcontains(name) ) + if( scope.contains(name) ) return true; } @@ -97,7 +97,7 @@ struct LexerData const Scope& scope = *it; ++it; - if( scope.tqcontains(name) ) + if( scope.contains(name) ) return scope[ name ]; } @@ -273,7 +273,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline ) int start = currentPosition(); readIdentifier(); TQString ide = m_source.mid( start, currentPosition() - start ); - int k = Lookup::tqfind( &keyword, ide ); + int k = Lookup::find( &keyword, ide ); if( m_preprocessorEnabled && m_driver->hasMacro(ide) && (k == -1 || !m_driver->macro(ide).body().isEmpty()) ){ @@ -408,7 +408,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline ) tk.setStartPosition( startLine, startColumn ); tk.setEndPosition( m_currentLine, m_currentColumn ); } else if( m_skipWordsEnabled ){ - TQMap< TQString, TQPair<SkipType, TQString> >::Iterator pos = m_words.tqfind( ide ); + TQMap< TQString, TQPair<SkipType, TQString> >::Iterator pos = m_words.find( ide ); if( pos != m_words.end() ){ if( (*pos).first == SkipWordAndArguments ){ readWhiteSpaces(); diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp b/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp index fad6627a..87b5b546 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp @@ -74,7 +74,7 @@ const HashEntry* Lookup::findEntry( const struct HashTable *table, return findEntry( table, s.tqunicode(), s.length() ); } -int Lookup::tqfind(const struct HashTable *table, +int Lookup::find(const struct HashTable *table, const TQChar *c, unsigned int len) { const HashEntry *entry = findEntry( table, c, len ); @@ -83,9 +83,9 @@ int Lookup::tqfind(const struct HashTable *table, return -1; } -int Lookup::tqfind(const struct HashTable *table, const TQString &s) +int Lookup::find(const struct HashTable *table, const TQString &s) { - return tqfind(table, s.tqunicode(), s.length()); + return find(table, s.tqunicode(), s.length()); } unsigned int Lookup::hash(const TQChar *c, unsigned int len) diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lookup.h b/umbrello/umbrello/codeimport/kdevcppparser/lookup.h index c8a07dab..b2bad4de 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/lookup.h +++ b/umbrello/umbrello/codeimport/kdevcppparser/lookup.h @@ -95,8 +95,8 @@ /** * Find an entry in the table, and return its value (i.e. the value field of HashEntry) */ - static int tqfind(const struct HashTable *table, const TQString& s); - static int tqfind(const struct HashTable *table, const TQChar *c, unsigned int len); + static int find(const struct HashTable *table, const TQString& s); + static int find(const struct HashTable *table, const TQChar *c, unsigned int len); /** * Find an entry in the table, and return the entry diff --git a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp index 5cd28356..806a29a9 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp @@ -40,14 +40,14 @@ /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::filename(const TQString & name) { - int slashPos = name.tqfindRev("/"); + int slashPos = name.findRev("/"); return slashPos<0 ? name : name.mid(slashPos+1); } /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::directory(const TQString & name) { - int slashPos = name.tqfindRev("/"); + int slashPos = name.findRev("/"); return slashPos<0 ? TQString("") : name.left(slashPos); } @@ -74,7 +74,7 @@ TQString URLUtil::relativePath(const TQString & tqparent, const TQString & child /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::upDir(const TQString & path, bool slashSuffix) { - int slashPos = path.tqfindRev("/"); + int slashPos = path.findRev("/"); if (slashPos<1) return TQString(); return path.mid(0,slashPos+ (slashSuffix ? 1 : 0) ); } @@ -103,7 +103,7 @@ KURL URLUtil::mergeURL(const KURL & source, const KURL & dest, const KURL & chil /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::getExtension(const TQString & path) { - int dotPos = path.tqfindRev('.'); + int dotPos = path.findRev('.'); if (dotPos<0) return TQString(""); return path.mid(dotPos+1); } @@ -114,7 +114,7 @@ TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &ur { TQString absBase = extractPathNameAbsolute( baseDirUrl ), absRef = extractPathNameAbsolute( url ); - int i = absRef.tqfind( absBase, 0, true ); + int i = absRef.find( absBase, 0, true ); if (i == -1) return TQString(); @@ -122,7 +122,7 @@ TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &ur if (absRef == absBase) return TQString( "." ); else - return absRef.tqreplace( 0, absBase.length(), TQString() ); + return absRef.replace( 0, absBase.length(), TQString() ); } /////////////////////////////////////////////////////////////////////////////// @@ -289,7 +289,7 @@ TQString URLUtil::envExpand ( const TQString& str ) if (len > 1 && str[0] == '$') { - int pos = str.tqfind ('/'); + int pos = str.find ('/'); if (pos < 0) pos = len; diff --git a/umbrello/umbrello/codeimport/nativeimportbase.cpp b/umbrello/umbrello/codeimport/nativeimportbase.cpp index 925e397a..b2f7dac3 100644 --- a/umbrello/umbrello/codeimport/nativeimportbase.cpp +++ b/umbrello/umbrello/codeimport/nativeimportbase.cpp @@ -113,10 +113,10 @@ bool NativeImportBase::preprocess(TQString& line) { // Check for end of multi line comment. if (m_inComment) { int delimiterLen = 0; - int pos = line.tqfind(m_multiLineCommentEnd); + int pos = line.find(m_multiLineCommentEnd); if (pos == -1) { if (! m_multiLineAltCommentEnd.isEmpty()) - pos = line.tqfind(m_multiLineAltCommentEnd); + pos = line.find(m_multiLineAltCommentEnd); if (pos == -1) { m_comment += line + "\n"; return true; // done @@ -142,20 +142,20 @@ bool NativeImportBase::preprocess(TQString& line) { // Check for start of multi line comment. int delimIntroLen = 0; int delimEndLen = 0; - int pos = line.tqfind(m_multiLineCommentIntro); + int pos = line.find(m_multiLineCommentIntro); if (pos != -1) { delimIntroLen = m_multiLineCommentIntro.length(); } else if (!m_multiLineAltCommentIntro.isEmpty()) { - pos = line.tqfind(m_multiLineAltCommentIntro); + pos = line.find(m_multiLineAltCommentIntro); if (pos != -1) delimIntroLen = m_multiLineAltCommentIntro.length(); } if (pos != -1) { - int endpos = line.tqfind(m_multiLineCommentEnd); + int endpos = line.find(m_multiLineCommentEnd); if (endpos != -1) { delimEndLen = m_multiLineCommentEnd.length(); } else if (!m_multiLineAltCommentEnd.isEmpty()) { - endpos = line.tqfind(m_multiLineAltCommentEnd); + endpos = line.find(m_multiLineAltCommentEnd); if (endpos != -1) delimEndLen = m_multiLineAltCommentEnd.length(); } @@ -237,7 +237,7 @@ void NativeImportBase::scan(TQString line) { if (preprocess(line)) return; // Check for single line comment. - int pos = line.tqfind(m_singleLineCommentIntro); + int pos = line.find(m_singleLineCommentIntro); if (pos != -1) { TQString cmnt = line.mid(pos); m_source.append(cmnt); @@ -245,7 +245,7 @@ void NativeImportBase::scan(TQString line) { return; line = line.left(pos); } - if (line.tqcontains(TQRegExp("^\\s*$"))) + if (line.contains(TQRegExp("^\\s*$"))) return; TQStringList words = split(line); for (TQStringList::Iterator it = words.begin(); it != words.end(); ++it) { @@ -263,12 +263,12 @@ void NativeImportBase::initVars() { void NativeImportBase::parseFile(const TQString& filename) { TQString nameWithoutPath = filename; nameWithoutPath.remove(TQRegExp("^.*/")); - if (m_parsedFiles.tqcontains(nameWithoutPath)) + if (m_parsedFiles.contains(nameWithoutPath)) return; m_parsedFiles.append(nameWithoutPath); TQString fname = filename; const TQString msgPrefix = "NativeImportBase::parseFile(" + filename + "): "; - if (filename.tqcontains('/')) { + if (filename.contains('/')) { TQString path = filename; path.remove( TQRegExp("/[^/]+$") ); kDebug() << msgPrefix << "adding path " << path << endl; diff --git a/umbrello/umbrello/codeimport/pascalimport.cpp b/umbrello/umbrello/codeimport/pascalimport.cpp index f2358735..30d39128 100644 --- a/umbrello/umbrello/codeimport/pascalimport.cpp +++ b/umbrello/umbrello/codeimport/pascalimport.cpp @@ -104,7 +104,7 @@ bool PascalImport::parseStmt() { continue; } TQString filename = unit + ".pas"; - if (! m_parsedFiles.tqcontains(unit)) { + if (! m_parsedFiles.contains(unit)) { // Save current m_source and m_srcIndex. TQStringList source(m_source); uint srcIndex = m_srcIndex; diff --git a/umbrello/umbrello/codeimport/pythonimport.cpp b/umbrello/umbrello/codeimport/pythonimport.cpp index cf7c0dae..2436699a 100644 --- a/umbrello/umbrello/codeimport/pythonimport.cpp +++ b/umbrello/umbrello/codeimport/pythonimport.cpp @@ -45,7 +45,7 @@ bool PythonImport::preprocess(TQString& line) { if (NativeImportBase::preprocess(line)) return true; // Handle single line comment - int pos = line.tqfind(m_singleLineCommentIntro); + int pos = line.find(m_singleLineCommentIntro); if (pos != -1) { TQString cmnt = line.mid(pos); m_source.append(cmnt); @@ -56,11 +56,11 @@ bool PythonImport::preprocess(TQString& line) { line.remove( TQRegExp("\\s+$") ); } // Transform changes in indentation into braces a la C++/Java/Perl/... - pos = line.tqfind( TQRegExp("\\S") ); + pos = line.find( TQRegExp("\\S") ); if (pos == -1) return true; bool isContinuation = false; - int leadingWhite = line.left(pos).tqcontains( TQRegExp("\\s") ); + int leadingWhite = line.left(pos).contains( TQRegExp("\\s") ); if (leadingWhite > m_srcIndent[m_srcIndentIndex]) { if (m_srcIndex == 0) { kError() << "PythonImport::preprocess(): internal error 1" << endl; @@ -80,7 +80,7 @@ bool PythonImport::preprocess(TQString& line) { } } if (line.endsWith(":")) { - line.tqreplace( TQRegExp(":$"), "{" ); + line.replace( TQRegExp(":$"), "{" ); m_braceWasOpened = true; } else { m_braceWasOpened = false; diff --git a/umbrello/umbrello/codeimport/pythonimport.h b/umbrello/umbrello/codeimport/pythonimport.h index 41de3c01..d5c62a91 100644 --- a/umbrello/umbrello/codeimport/pythonimport.h +++ b/umbrello/umbrello/codeimport/pythonimport.h @@ -62,7 +62,7 @@ protected: int m_srcIndent[100]; /** - * Index for m_srcIndent[]. Index 0 is reserved and tqcontains 0. + * Index for m_srcIndent[]. Index 0 is reserved and contains 0. */ int m_srcIndentIndex; diff --git a/umbrello/umbrello/dialogs/codeeditor.cpp b/umbrello/umbrello/dialogs/codeeditor.cpp index 934fc628..4f9f03a8 100644 --- a/umbrello/umbrello/dialogs/codeeditor.cpp +++ b/umbrello/umbrello/dialogs/codeeditor.cpp @@ -247,7 +247,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita // now do 'paragraph' background highlighting // int endLine = paragraphs()-2; - int endLine = text.tqcontains(TQRegExp("\n")) + startLine -1; + int endLine = text.contains(TQRegExp("\n")) + startLine -1; if(m_isHighlighted) for(int para=startLine;para<=endLine;para++) setParagraphBackgroundColor(para,bgcolor); @@ -255,7 +255,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita // record paragraph information // Did we already start recording info for this tqparent object? TextBlockInfo * tbinfo; - if(m_tbInfoMap->tqcontains(tqparent)) + if(m_tbInfoMap->contains(tqparent)) tbinfo = (*m_tbInfoMap)[tqparent]; else { tbinfo = new TextBlockInfo(); @@ -278,7 +278,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita // lastly, update the para info // start position is relative to the FIRST tqparent position - int start = startLine - m_textBlockList.tqfindRef(tqparent); + int start = startLine - m_textBlockList.findRef(tqparent); int size = endLine-startLine; // create the object that records this particular "paragraph" @@ -302,7 +302,7 @@ void CodeEditor::insert (const TQString & text, TextBlock * tqparent, bool edita { TextBlock * tblock = it.key(); TextBlockInfo * thisTbInfo = it.data(); - int firstLoc = m_textBlockList.tqfindRef(tblock); + int firstLoc = m_textBlockList.findRef(tblock); ParaInfo * lastPi = thisTbInfo->m_paraList.last(); for(ParaInfo * pi = thisTbInfo->m_paraList.first(); pi; pi = thisTbInfo->m_paraList.next()) @@ -621,7 +621,7 @@ void CodeEditor::slotInsertCodeBlockBeforeSelected() m_parentDoc->insertTextBlock(newBlock, tb, false); - int location = m_textBlockList.tqfindRef(m_selectedTextBlock); // find first para of selected block + int location = m_textBlockList.findRef(m_selectedTextBlock); // find first para of selected block TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n"); @@ -643,7 +643,7 @@ void CodeEditor::slotInsertCodeBlockAfterSelected() // find last para of selected block TextBlockInfo *tbinfo = (*m_tbInfoMap)[m_selectedTextBlock]; ParaInfo * lastpi = tbinfo->m_paraList.last(); - int location = m_textBlockList.tqfindRef(m_selectedTextBlock) + lastpi->start + lastpi->size + 1; + int location = m_textBlockList.findRef(m_selectedTextBlock) + lastpi->start + lastpi->size + 1; TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n"); @@ -833,7 +833,7 @@ void CodeEditor::updateTextBlockFromText (TextBlock * block) { TextBlockInfo *info = (*m_tbInfoMap)[block]; UMLObject * parentObj = info->getParent(); - int pstart = m_textBlockList.tqfindRef(block); + int pstart = m_textBlockList.findRef(block); TQString content = ""; // Assemble content from editiable paras @@ -913,7 +913,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos) int minPos = baseIndent.length(); // add indent chars to the current line, if missing - if(!m_backspacePressed && !currentParaText.tqcontains(TQRegExp('^'+baseIndent))) + if(!m_backspacePressed && !currentParaText.contains(TQRegExp('^'+baseIndent))) { insertAt(baseIndent,para,0); setCursorPosition(para,pos+minPos); @@ -957,7 +957,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos) // furthermore, IF its nothing but indentation + whitespace // we switch this back to Auto-Generated. - if(cmb && contents.tqcontains(TQRegExp('^'+baseIndent+"\\s$"))) + if(cmb && contents.contains(TQRegExp('^'+baseIndent+"\\s$"))) { cmb->setContentType(CodeBlock::AutoGenerated); cmb->syncToParent(); @@ -1006,7 +1006,7 @@ bool CodeEditor::paraIsNotSingleLine (int para) TextBlock * tBlock = m_textBlockList.at(para); if(tBlock) { - int pstart = m_textBlockList.tqfindRef(tBlock); + int pstart = m_textBlockList.findRef(tBlock); TextBlockInfo *info = (*m_tbInfoMap)[tBlock]; TQPtrList<ParaInfo> list = info->m_paraList; @@ -1030,7 +1030,7 @@ bool CodeEditor::isParaEditable (int para) { int editEnd = tBlock->lastEditableLine(); bool hasEditableRange = (editStart > 0 || editEnd < 0) ? true : false; TextBlockInfo *info = (*m_tbInfoMap)[tBlock]; - int pstart = m_textBlockList.tqfindRef(tBlock); + int pstart = m_textBlockList.findRef(tBlock); int relativeLine = para - pstart; TQPtrList<ParaInfo> list = info->m_paraList; for(ParaInfo * item = list.first(); item; item=list.next()) @@ -1055,7 +1055,7 @@ void CodeEditor::changeTextBlockHighlighting(TextBlock * tBlock, bool selected) { TextBlockInfo *info = (*m_tbInfoMap)[tBlock]; TQPtrList<ParaInfo> list = info->m_paraList; - int pstart = m_textBlockList.tqfindRef(tBlock); + int pstart = m_textBlockList.findRef(tBlock); for(ParaInfo * item = list.first(); item; item=list.next()) for(int p=(item->start+pstart);p<=(item->start+pstart+item->size);p++) if(selected) @@ -1113,7 +1113,7 @@ void CodeEditor::contractSelectedParagraph( int paraToRemove ) { TextBlock * tBlock = m_textBlockList.at(paraToRemove); if(tBlock) { - int pstart = m_textBlockList.tqfindRef(tBlock); + int pstart = m_textBlockList.findRef(tBlock); TextBlockInfo *info = (*m_tbInfoMap)[tBlock]; TQPtrList<ParaInfo> list = info->m_paraList; @@ -1149,7 +1149,7 @@ void CodeEditor::expandSelectedParagraph( int priorPara ) { m_textBlockList.insert(priorPara,tBlock); TextBlockInfo *info = (*m_tbInfoMap)[tBlock]; TQPtrList<ParaInfo> list = info->m_paraList; - int pstart = m_textBlockList.tqfindRef(tBlock); + int pstart = m_textBlockList.findRef(tBlock); // now update the paragraph information bool upStartPosition = false; diff --git a/umbrello/umbrello/dialogs/codegenerationwizard.cpp b/umbrello/umbrello/dialogs/codegenerationwizard.cpp index dbd47a94..3859d519 100644 --- a/umbrello/umbrello/dialogs/codegenerationwizard.cpp +++ b/umbrello/umbrello/dialogs/codegenerationwizard.cpp @@ -125,7 +125,7 @@ void CodeGenerationWizard::generateCode() { } void CodeGenerationWizard::classGenerated(UMLClassifier* concept, bool generated) { - TQListViewItem* item = m_statusList->tqfindItem( concept->getFullyQualifiedName(), 0 ); + TQListViewItem* item = m_statusList->findItem( concept->getFullyQualifiedName(), 0 ); if( !item ) { kError()<<"GenerationStatusPage::Error finding class in list view"<<endl; } else if (generated) { @@ -232,7 +232,7 @@ void CodeGenerationWizard::moveSelectedItems(TQListView* fromList, TQListView* t TQListViewItem* selectedItem = it.current(); TQString name = selectedItem->text(0); - if (!toList->tqfindItem(name, 0)) { + if (!toList->findItem(name, 0)) { new TQListViewItem(toList, name); } diff --git a/umbrello/umbrello/dialogs/umlattributedialog.cpp b/umbrello/umbrello/dialogs/umlattributedialog.cpp index 2568fd92..af59de17 100644 --- a/umbrello/umbrello/dialogs/umlattributedialog.cpp +++ b/umbrello/umbrello/dialogs/umlattributedialog.cpp @@ -204,7 +204,7 @@ bool UMLAttributeDialog::apply() { } else { // If it's obviously a pointer type (C++) then create a datatype. // Else we don't know what it is so as a compromise create a class. - Uml::Object_Type ot = (typeName.tqcontains('*') ? Uml::ot_Datatype : Uml::ot_Class); + Uml::Object_Type ot = (typeName.contains('*') ? Uml::ot_Datatype : Uml::ot_Class); obj = Object_Factory::createUMLObject(ot, typeName); } if (obj == NULL) diff --git a/umbrello/umbrello/dialogs/umlentityattributedialog.cpp b/umbrello/umbrello/dialogs/umlentityattributedialog.cpp index a84d302b..ba111405 100644 --- a/umbrello/umbrello/dialogs/umlentityattributedialog.cpp +++ b/umbrello/umbrello/dialogs/umlentityattributedialog.cpp @@ -227,7 +227,7 @@ bool UMLEntityAttributeDialog::apply() { if (classifier == NULL) { // If it's obviously a pointer type (C++) then create a datatype. // Else we don't know what it is so as a compromise create a class. - Uml::Object_Type ot = (typeName.tqcontains('*') ? Uml::ot_Datatype + Uml::Object_Type ot = (typeName.contains('*') ? Uml::ot_Datatype : Uml::ot_Class); obj = Object_Factory::createUMLObject(ot, typeName); if (obj == NULL) diff --git a/umbrello/umbrello/docgenerators/docbookgenerator.cpp b/umbrello/umbrello/docgenerators/docbookgenerator.cpp index f96b3d37..e577a6c3 100644 --- a/umbrello/umbrello/docgenerators/docbookgenerator.cpp +++ b/umbrello/umbrello/docgenerators/docbookgenerator.cpp @@ -54,7 +54,7 @@ bool DocbookGenerator::generateDocbookForProject() UMLDoc* umlDoc = app->getDocument(); KURL url = umlDoc->URL(); TQString fileName = url.fileName(); - fileName.tqreplace(TQRegExp(".xmi$"),""); + fileName.replace(TQRegExp(".xmi$"),""); url.setFileName(fileName); kDebug() << "Exporting to directory: " << url << endl; generateDocbookForProjectInto(url); @@ -131,7 +131,7 @@ KIO::Job* DocbookGenerator::generateDocbookForProjectInto(const KURL& destDir) KURL url = umlDoc->URL(); TQString fileName = url.fileName(); - fileName.tqreplace(TQRegExp(".xmi$"),".docbook"); + fileName.replace(TQRegExp(".xmi$"),".docbook"); url.setPath(destDir.path()); url.addPath(fileName); kDebug() << "Copying result to: " << url << endl; diff --git a/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp b/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp index 74aade2f..a0555188 100644 --- a/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp +++ b/umbrello/umbrello/docgenerators/xhtmlgenerator.cpp @@ -55,7 +55,7 @@ bool XhtmlGenerator::generateXhtmlForProject() UMLDoc* umlDoc = app->getDocument(); KURL url = umlDoc->URL(); TQString fileName = url.fileName(); - fileName.tqreplace(TQRegExp(".xmi$"),""); + fileName.replace(TQRegExp(".xmi$"),""); url.setFileName(fileName); kDebug() << "Exporting to directory: " << url << endl; return generateXhtmlForProjectInto(url); @@ -90,7 +90,7 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob) const KURL& url = umlDoc->URL(); TQString docbookName = url.fileName(); - docbookName.tqreplace(TQRegExp(".xmi$"),".docbook"); + docbookName.replace(TQRegExp(".xmi$"),".docbook"); // KURL docbookUrl(TQString("file://")+m_tmpDir.name()); KURL docbookUrl = m_destDir; docbookUrl.addPath(docbookName); @@ -115,7 +115,7 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob) if (!localXsl.isEmpty()) { localXsl = TQString("href=\"file://") + localXsl + "\""; - xslt.tqreplace(TQRegExp("href=\"http://[^\"]*\""),localXsl); + xslt.replace(TQRegExp("href=\"http://[^\"]*\""),localXsl); } KTempFile tmpXsl; *tmpXsl.textStream() << xslt; @@ -145,7 +145,7 @@ void XhtmlGenerator::slotDocbookToXhtml(KIO::Job * docbookJob) xmlCleanupParser(); TQString xhtmlName = url.fileName(); - xhtmlName.tqreplace(TQRegExp(".xmi$"),".html"); + xhtmlName.replace(TQRegExp(".xmi$"),".html"); KURL xhtmlUrl = m_destDir; xhtmlUrl.addPath(xhtmlName); diff --git a/umbrello/umbrello/floatingtextwidget.cpp b/umbrello/umbrello/floatingtextwidget.cpp index 5857ef5d..700f9de4 100644 --- a/umbrello/umbrello/floatingtextwidget.cpp +++ b/umbrello/umbrello/floatingtextwidget.cpp @@ -236,7 +236,7 @@ void FloatingTextWidget::setText(const TQString &t) { m_pLink->getSeqNumAndOp(seqNum, op); if (seqNum.length() > 0 || op.length() > 0) { if (! m_pView->getShowOpSig()) - op.tqreplace( TQRegExp("\\(.*\\)"), "()" ); + op.replace( TQRegExp("\\(.*\\)"), "()" ); m_Text = seqNum.append(": ").append( op ); } else m_Text = t; diff --git a/umbrello/umbrello/hierarchicalcodeblock.cpp b/umbrello/umbrello/hierarchicalcodeblock.cpp index 7d31bf1d..73e59bab 100644 --- a/umbrello/umbrello/hierarchicalcodeblock.cpp +++ b/umbrello/umbrello/hierarchicalcodeblock.cpp @@ -123,7 +123,7 @@ bool HierarchicalCodeBlock::insertTextBlock(TextBlock * newBlock, TextBlock * ex if(!getParentDocument()->findTextBlockByTag(tag, true)) return false; - int index = m_textblockVector.tqfindRef(existingBlock); + int index = m_textblockVector.findRef(existingBlock); if(index < 0) { // may be hiding in child hierarchical codeblock @@ -149,7 +149,7 @@ bool HierarchicalCodeBlock::insertTextBlock(TextBlock * newBlock, TextBlock * ex newBlock->setTag(new_tag); } - if(m_textBlockTagMap.tqcontains(new_tag)) + if(m_textBlockTagMap.contains(new_tag)) return false; // return false, we already have some object with this tag in the list else { m_textBlockTagMap.insert(new_tag, newBlock); diff --git a/umbrello/umbrello/import_rose.cpp b/umbrello/umbrello/import_rose.cpp index 54201a06..3968e72a 100644 --- a/umbrello/umbrello/import_rose.cpp +++ b/umbrello/umbrello/import_rose.cpp @@ -125,7 +125,7 @@ bool checkClosing(TQStringList& tokens) { * or a quoted string. */ bool isImmediateValue(TQString s) { - return s.tqcontains(TQRegExp("^[\\d\\-\"]")); + return s.contains(TQRegExp("^[\\d\\-\"]")); } /** @@ -286,7 +286,7 @@ PetalNode *readAttributes(TQStringList initialArgs, TQTextStream& stream) { TQStringList tokens = scan(line); TQString stringOrNodeOpener = shift(tokens); TQString name; - if (nt == PetalNode::nt_object && !stringOrNodeOpener.tqcontains(TQRegExp("^[A-Za-z]"))) { + if (nt == PetalNode::nt_object && !stringOrNodeOpener.contains(TQRegExp("^[A-Za-z]"))) { kError() << loc() << "unexpected line " << line << endl; return NULL; } @@ -365,15 +365,15 @@ bool loadFromMDL(TQIODevice& file) { linum = 0; while (!(line = stream.readLine()).isNull()) { linum++; - if (line.tqcontains( TQRegExp("^\\s*\\(object Petal") )) { - while (!(line = stream.readLine()).isNull() && !line.tqcontains(')')) { + if (line.contains( TQRegExp("^\\s*\\(object Petal") )) { + while (!(line = stream.readLine()).isNull() && !line.contains(')')) { linum++; // CHECK: do we need petal version info? } if (line.isNull()) break; } else { TQRegExp objectRx("^\\s*\\(object "); - if (line.tqcontains(objectRx)) { + if (line.contains(objectRx)) { nClosures = 0; TQStringList initialArgs = scan(line); initialArgs.pop_front(); // remove opening parenthesis diff --git a/umbrello/umbrello/kplayerslideraction.cpp b/umbrello/umbrello/kplayerslideraction.cpp index a4969b4b..5210f8ea 100644 --- a/umbrello/umbrello/kplayerslideraction.cpp +++ b/umbrello/umbrello/kplayerslideraction.cpp @@ -50,7 +50,7 @@ void KPlayerPopupFrame::keyPressEvent (TQKeyEvent* ev) void KPlayerPopupFrame::mousePressEvent (TQMouseEvent* ev) { TQFrame::mousePressEvent (ev); -//if ( ! rect().tqcontains (ev -> pos()) ) +//if ( ! rect().contains (ev -> pos()) ) // m_outside_mouse_press = true; } @@ -60,7 +60,7 @@ void KPlayerPopupFrame::mouseReleaseEvent (TQMouseEvent* ev) if ( m_outside_mouse_press ) { m_outside_mouse_press = false; - if ( ! rect().tqcontains (ev -> pos()) ) + if ( ! rect().contains (ev -> pos()) ) close(); } }*/ diff --git a/umbrello/umbrello/linepath.cpp b/umbrello/umbrello/linepath.cpp index b2dde5ab..12f4b6c8 100644 --- a/umbrello/umbrello/linepath.cpp +++ b/umbrello/umbrello/linepath.cpp @@ -297,7 +297,7 @@ int LinePath::onLinePath( const TQPoint &position ) { TQCanvasItemList::iterator end(list.end()); for(TQCanvasItemList::iterator item_it(list.begin()); item_it != end; ++item_it ) { - if( ( index = m_LineList.tqfindRef( (TQCanvasLine*)*item_it ) ) != -1 ) + if( ( index = m_LineList.findRef( (TQCanvasLine*)*item_it ) ) != -1 ) break; }//end for return index; diff --git a/umbrello/umbrello/messagewidget.cpp b/umbrello/umbrello/messagewidget.cpp index 3e24e7f7..6f2eea21 100644 --- a/umbrello/umbrello/messagewidget.cpp +++ b/umbrello/umbrello/messagewidget.cpp @@ -381,7 +381,7 @@ void MessageWidget::slotWidgetMoved(Uml::IDType id) { setTextPosition(); } -bool MessageWidget::tqcontains(ObjectWidget * w) { +bool MessageWidget::contains(ObjectWidget * w) { if(m_pOw[Uml::A] == w || m_pOw[Uml::B] == w) return true; else diff --git a/umbrello/umbrello/messagewidget.h b/umbrello/umbrello/messagewidget.h index a0828da7..e1374cd3 100644 --- a/umbrello/umbrello/messagewidget.h +++ b/umbrello/umbrello/messagewidget.h @@ -101,7 +101,7 @@ public: * @param w The ObjectWidget to check for. * @return true - if is contained, false - not contained. */ - bool tqcontains(ObjectWidget * w); + bool contains(ObjectWidget * w); /** * Returns the related widget on the given side. diff --git a/umbrello/umbrello/model_utils.cpp b/umbrello/umbrello/model_utils.cpp index 9c6cfbc2..3f012e08 100644 --- a/umbrello/umbrello/model_utils.cpp +++ b/umbrello/umbrello/model_utils.cpp @@ -113,14 +113,14 @@ UMLObject* findUMLObject(const UMLObjectList& inList, if (UMLApp::app()->getActiveLanguage() == Uml::pl_Cpp) { if (name.endsWith("*")) name.remove("*"); - else if (name.tqcontains("&")) + else if (name.contains("&")) name.remove("&"); } #endif TQString nameWithoutFirstPrefix; - if (name.tqcontains("::")) + if (name.contains("::")) components = TQStringList::split("::", name); - else if (name.tqcontains(".")) + else if (name.contains(".")) components = TQStringList::split(".", name); if (components.size() > 1) { name = components.front(); @@ -146,7 +146,7 @@ UMLObject* findUMLObject(const UMLObjectList& inList, return pkg; } } - if (seenPkgs.tqfindRef(pkg) != -1) { + if (seenPkgs.findRef(pkg) != -1) { kError() << "findUMLObject(" << name << "): " << "breaking out of cycle involving " << pkg->getName() << endl; @@ -438,7 +438,7 @@ Parse_tqStatus parseAttribute(TQString a, NameAndType& nmTp, UMLClassifier *owni if (a.isEmpty()) return PS_Empty; - int colonPos = a.tqfind(':'); + int colonPos = a.find(':'); if (colonPos < 0) { nmTp = NameAndType(a, NULL); return PS_OK; @@ -500,7 +500,7 @@ Parse_tqStatus parseOperation(TQString m, OpDescriptor& desc, UMLClassifier *own m = m.simplifyWhiteSpace(); if (m.isEmpty()) return PS_Empty; - if (m.tqcontains(TQRegExp("operator *()"))) { + if (m.contains(TQRegExp("operator *()"))) { // C++ special case: two sets of parentheses desc.m_name = "operator()"; m.remove(TQRegExp("operator *()")); diff --git a/umbrello/umbrello/model_utils.h b/umbrello/umbrello/model_utils.h index 600e841c..6660ff64 100644 --- a/umbrello/umbrello/model_utils.h +++ b/umbrello/umbrello/model_utils.h @@ -56,7 +56,7 @@ UMLObject * findObjectInList(Uml::IDType id, const UMLObjectList& inList); * * @param inList List in which to seek the object. * @param name Name of the object to find. - * @param type Object_Type of the object to tqfind (optional.) + * @param type Object_Type of the object to find (optional.) * When the given type is ot_UMLObject the type is * disregarded, i.e. the given name is the only * search criterion. diff --git a/umbrello/umbrello/objectwidget.cpp b/umbrello/umbrello/objectwidget.cpp index 79384852..504c8650 100644 --- a/umbrello/umbrello/objectwidget.cpp +++ b/umbrello/umbrello/objectwidget.cpp @@ -322,7 +322,7 @@ int ObjectWidget::getEndLineY() { } void ObjectWidget::messageAdded(MessageWidget* message) { - if (messageWidgetList.tqcontainsRef(message) ) { + if (messageWidgetList.containsRef(message) ) { kError() << "ObjectWidget::messageAdded(" << message->getName() << ") : duplicate entry !" << endl; diff --git a/umbrello/umbrello/operation.cpp b/umbrello/umbrello/operation.cpp index 28cd1d11..3f62bf05 100644 --- a/umbrello/umbrello/operation.cpp +++ b/umbrello/umbrello/operation.cpp @@ -65,7 +65,7 @@ void UMLOperation::moveParmLeft(UMLAttribute * a) { << endl; disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified())); int idx; - if ( (idx=m_List.tqfind( a )) == -1 ) { + if ( (idx=m_List.find( a )) == -1 ) { kDebug() << "Error move parm left " << a->getName() << endl; return; } @@ -85,7 +85,7 @@ void UMLOperation::moveParmRight(UMLAttribute * a) { << endl; disconnect(a,TQT_SIGNAL(modified()),this,TQT_SIGNAL(modified())); int idx; - if ( (idx=m_List.tqfind( a )) == -1 ) { + if ( (idx=m_List.find( a )) == -1 ) { kDebug() << "Error move parm right " << a->getName() << endl; return; } diff --git a/umbrello/umbrello/package.cpp b/umbrello/umbrello/package.cpp index 59553a9e..04e8c14d 100644 --- a/umbrello/umbrello/package.cpp +++ b/umbrello/umbrello/package.cpp @@ -100,7 +100,7 @@ bool UMLPackage::addObject(UMLObject *pObject) { << endl; return false; } - if (m_objects.tqfind(pObject) != -1) { + if (m_objects.find(pObject) != -1) { kDebug() << "UMLPackage::addObject: " << pObject->getName() << " is already there" << endl; return false; @@ -129,7 +129,7 @@ void UMLPackage::removeObject(UMLObject *pObject) { UMLAssociation *assoc = static_cast<UMLAssociation*>(o); removeAssocFromConcepts(assoc); } - if (m_objects.tqfindRef(pObject) == -1) + if (m_objects.findRef(pObject) == -1) kDebug() << m_Name << " removeObject: object with id=" << ID2STR(pObject->getID()) << "not found." << endl; else diff --git a/umbrello/umbrello/petaltree2uml.cpp b/umbrello/umbrello/petaltree2uml.cpp index 42fa038d..6bd4086f 100644 --- a/umbrello/umbrello/petaltree2uml.cpp +++ b/umbrello/umbrello/petaltree2uml.cpp @@ -77,7 +77,7 @@ TQString quidu(const PetalNode *node) { Uml::Object_Type typeToCreate(const TQString& name) { TQString n = name; n.remove(TQRegExp("^.*::")); // don't consider the scope prefix, it may contain spaces - Uml::Object_Type t = (n.tqcontains(TQRegExp("\\W")) ? Uml::ot_Datatype : Uml::ot_Class); + Uml::Object_Type t = (n.contains(TQRegExp("\\W")) ? Uml::ot_Datatype : Uml::ot_Class); return t; } @@ -556,12 +556,12 @@ bool importView(PetalNode *root, const TQString& rootName, const TQString& modelsName, UMLListViewItem *lvParent) { PetalNode *viewRoot = root->findAttribute(rootName).node; if (viewRoot == NULL) { - kDebug() << "importView: cannot tqfind " << rootName << endl; + kDebug() << "importView: cannot find " << rootName << endl; return false; } PetalNode *models = viewRoot->findAttribute(modelsName).node; if (models == NULL) { - kError() << "importView: cannot tqfind " << modelsName + kError() << "importView: cannot find " << modelsName << " of " << rootName << endl; return false; } diff --git a/umbrello/umbrello/pluginloader.cpp b/umbrello/umbrello/pluginloader.cpp index 9321ac15..eb3fd1e0 100644 --- a/umbrello/umbrello/pluginloader.cpp +++ b/umbrello/umbrello/pluginloader.cpp @@ -63,7 +63,7 @@ PluginLoader::loadPlugin(const TQString &name) // if the plugin has already been loaded, increment // its reference and return. - if((it = _plugins.tqfind(name)) != _plugins.end()) { + if((it = _plugins.find(name)) != _plugins.end()) { plugin = it.data(); plugin->ref(); return plugin; @@ -127,7 +127,7 @@ Plugin * PluginLoader::findPlugin(const TQString &name) { Plugin *ret = NULL; - PluginMap::iterator it = _plugins.tqfind(name); + PluginMap::iterator it = _plugins.find(name); if(it != _plugins.end()) { ret = it.data(); } diff --git a/umbrello/umbrello/statewidget.cpp b/umbrello/umbrello/statewidget.cpp index 72ce43ea..942ae0ab 100644 --- a/umbrello/umbrello/statewidget.cpp +++ b/umbrello/umbrello/statewidget.cpp @@ -192,7 +192,7 @@ bool StateWidget::addActivity( const TQString &activity ) { bool StateWidget::removeActivity( const TQString &activity ) { int index = - 1; - if( ( index = m_Activities.tqfindIndex( activity ) ) == -1 ) + if( ( index = m_Activities.findIndex( activity ) ) == -1 ) return false; m_Activities.remove( m_Activities.at( index ) ); updateComponentSize(); @@ -210,7 +210,7 @@ TQStringList & StateWidget::getActivityList() { bool StateWidget::renameActivity( const TQString &activity, const TQString &newName ) { int index = - 1; - if( ( index = m_Activities.tqfindIndex( activity ) ) == -1 ) + if( ( index = m_Activities.findIndex( activity ) ) == -1 ) return false; m_Activities[ index ] = newName; return true; diff --git a/umbrello/umbrello/textblock.cpp b/umbrello/umbrello/textblock.cpp index 1beae001..1a66c113 100644 --- a/umbrello/umbrello/textblock.cpp +++ b/umbrello/umbrello/textblock.cpp @@ -205,12 +205,12 @@ TQString TextBlock::formatMultiLineText ( const TQString &work, const TQString & TQString output = ""; TQString text = work; TQString endLine = getNewLineEndingChars(); - int matches = text.tqcontains(TQRegExp(breakStr)); + int matches = text.contains(TQRegExp(breakStr)); if(matches) { // check that last part of string matches, if not, then // we have to tack on extra match - if(!text.tqcontains(TQRegExp(breakStr+"\\$"))) + if(!text.contains(TQRegExp(breakStr+"\\$"))) matches++; for(int i=0; i < matches; i++) @@ -280,7 +280,7 @@ void TextBlock::setAttributesFromNode (TQDomElement & root ) { // entity. TQString TextBlock::encodeText(const TQString& text, const TQString &endLine) { TQString encoded = text; - encoded.tqreplace(TQRegExp(endLine),"
"); + encoded.replace(TQRegExp(endLine),"
"); return encoded; } @@ -289,7 +289,7 @@ TQString TextBlock::encodeText(const TQString& text, const TQString &endLine) { // entity. TQString TextBlock::decodeText(const TQString& text, const TQString &endLine) { TQString decoded = text; - decoded.tqreplace(TQRegExp("
"),endLine); + decoded.replace(TQRegExp("
"),endLine); return decoded; } diff --git a/umbrello/umbrello/uml.cpp b/umbrello/umbrello/uml.cpp index 6f4d65f5..91986427 100644 --- a/umbrello/umbrello/uml.cpp +++ b/umbrello/umbrello/uml.cpp @@ -1616,7 +1616,7 @@ TQPopupMenu* UMLApp::findMenu(TQMenuData* menu, const TQString &name) { for (int i=0; i<menuCount; i++) { int idAt = menu->idAt(i); - TQPopupMenu* popupMenu = menu->tqfindItem(idAt)->popup(); + TQPopupMenu* popupMenu = menu->findItem(idAt)->popup(); if (popupMenu) { TQString menuName = popupMenu->name(); if( menuName == name) { @@ -1640,7 +1640,7 @@ void UMLApp::slotChangeTabLeft() { } UMLViewList views = m_doc->getViewIterator(); UMLView *currView = m_view; - if (views.tqfind(currView) < 0) { + if (views.find(currView) < 0) { kError() << "UMLApp::slotChangeTabLeft(): currView not found in viewlist" << endl; return; } @@ -1657,7 +1657,7 @@ void UMLApp::slotChangeTabRight() { } UMLViewList views = m_doc->getViewIterator(); UMLView *currView = m_view; - if (views.tqfind(currView) < 0) { + if (views.find(currView) < 0) { kError() << "UMLApp::slotChangeTabRight(): currView not found in viewlist" << endl; return; } diff --git a/umbrello/umbrello/umlcanvasobject.cpp b/umbrello/umbrello/umlcanvasobject.cpp index 8a4a30e0..800336e3 100644 --- a/umbrello/umbrello/umlcanvasobject.cpp +++ b/umbrello/umbrello/umlcanvasobject.cpp @@ -80,7 +80,7 @@ bool UMLCanvasObject::addAssociationEnd(UMLAssociation* assoc) { } bool UMLCanvasObject::hasAssociation(UMLAssociation* assoc) { - if(m_List.tqcontainsRef(assoc) > 0) + if(m_List.containsRef(assoc) > 0) return true; return false; } diff --git a/umbrello/umbrello/umlcanvasobject.h b/umbrello/umbrello/umlcanvasobject.h index 9a3ea04e..7ddaf48f 100644 --- a/umbrello/umbrello/umlcanvasobject.h +++ b/umbrello/umbrello/umlcanvasobject.h @@ -165,7 +165,7 @@ public: * Find a child object with the given name. * * @param n The name of the object to find. - * @param t The type to tqfind (optional.) If not given then + * @param t The type to find (optional.) If not given then * any object type will match. * @return Pointer to the object found; NULL if none found. */ diff --git a/umbrello/umbrello/umldoc.cpp b/umbrello/umbrello/umldoc.cpp index de6fc9af..4f692cba 100644 --- a/umbrello/umbrello/umldoc.cpp +++ b/umbrello/umbrello/umldoc.cpp @@ -365,10 +365,10 @@ bool UMLDoc::openDocument(const KURL& url, const char* /*format =0*/) { // check if the xmi file is a compressed archive like tar.bzip2 or tar.gz TQString filetype = m_doc_url.fileName(true); TQString mimetype = ""; - if (filetype.tqfind(TQRegExp("\\.tgz$")) != -1) + if (filetype.find(TQRegExp("\\.tgz$")) != -1) { mimetype = "application/x-gzip"; - } else if (filetype.tqfind(TQRegExp("\\.tar.bz2$")) != -1) { + } else if (filetype.find(TQRegExp("\\.tar.bz2$")) != -1) { mimetype = "application/x-bzip2"; } @@ -572,9 +572,9 @@ bool UMLDoc::saveDocument(const KURL& url, const char * /* format */) { TQString tmpTQString = url.fileName(); if (fileFormat == "tgz") { - tmpTQString.tqreplace(TQRegExp("\\.tgz$"), ""); + tmpTQString.replace(TQRegExp("\\.tgz$"), ""); } else { - tmpTQString.tqreplace(TQRegExp("\\.tar\\.bz2$"), ""); + tmpTQString.replace(TQRegExp("\\.tar\\.bz2$"), ""); } archive->addLocalFile(tmp_xmi_file.name(), tmpTQString); archive->close(); @@ -740,12 +740,12 @@ bool UMLDoc::addUMLObject(UMLObject* object) { } void UMLDoc::addStereotype(const UMLStereotype *s) { - if (! m_stereoList.tqcontains(s)) + if (! m_stereoList.contains(s)) m_stereoList.append(s); } void UMLDoc::removeStereotype(const UMLStereotype *s) { - if (m_stereoList.tqcontains(s)) + if (m_stereoList.contains(s)) m_stereoList.remove(s); } @@ -1298,7 +1298,7 @@ void UMLDoc::saveToXMI(TQIODevice& file) { for (UMLStereotype *s = m_stereoList.first(); s; s = m_stereoList.next() ) { TQString stName = s->getName(); Uml::IDType stID = s->getID(); - if (!stereoNames.tqcontains(stName) && !stereoIDs.tqcontains(stID)) { + if (!stereoNames.contains(stName) && !stereoIDs.contains(stID)) { s->saveToXMI(doc, ownedNS); stereoNames.append(stName); stereoIDs.append(stID); @@ -2113,7 +2113,7 @@ void UMLDoc::slotAutoSave() { // don't overwrite manually saved file with autosave content TQString fileName = tempURL.fileName(); Settings::OptionState optionState = Settings::getOptionState(); - fileName.tqreplace( ".xmi", optionState.generalState.autosavesuffix ); + fileName.replace( ".xmi", optionState.generalState.autosavesuffix ); tempURL.setFileName( fileName ); // End Achim Spangler diff --git a/umbrello/umbrello/umldoc.h b/umbrello/umbrello/umldoc.h index ad62c698..60154fa9 100644 --- a/umbrello/umbrello/umldoc.h +++ b/umbrello/umbrello/umldoc.h @@ -330,7 +330,7 @@ public: * Used to find a @ref UMLObject by its type and name. * * @param name The name of the @ref UMLObject to find. - * @param type Object_Type of the object to tqfind (optional.) + * @param type Object_Type of the object to find (optional.) * When the given type is ot_UMLObject the type is * disregarded, i.e. the given name is the only * search criterion. diff --git a/umbrello/umbrello/umllistview.cpp b/umbrello/umbrello/umllistview.cpp index 7b570eab..992e0f7f 100644 --- a/umbrello/umbrello/umllistview.cpp +++ b/umbrello/umbrello/umllistview.cpp @@ -349,7 +349,7 @@ void UMLListView::popupMenuSel(int sel) { fileDialog.setOperationMode(KFileDialog::Other); // set a sensible default filename TQString defaultFilename = current->getText().lower(); - defaultFilename.tqreplace(TQRegExp("\\W+"), "_"); + defaultFilename.replace(TQRegExp("\\W+"), "_"); defaultFilename.append(".xml"); // default extension fileDialog.setSelection(defaultFilename); fileDialog.exec(); @@ -600,7 +600,7 @@ UMLListViewItem* UMLListView::determineParentItem(UMLObject* object) const { if (pkg) { UMLListViewItem* pkgItem = findUMLObject(pkg); if (pkgItem == NULL) - kError() << "UMLListView::determineParentItem: could not tqfind " + kError() << "UMLListView::determineParentItem: could not find " << "tqparent package " << pkg->getName() << endl; else parentItem = pkgItem; @@ -1900,7 +1900,7 @@ bool UMLListView::itemRenamed( TQListViewItem * item , int /*col*/ ) { renamedItem -> setCreating( false ); // If the type is empty then delete it. - if (newText.isEmpty() || newText.tqcontains(TQRegExp("^\\s+$"))) { + if (newText.isEmpty() || newText.contains(TQRegExp("^\\s+$"))) { KMessageBox::error( kapp -> mainWidget(), i18n( "The name you entered was invalid.\nCreation process has been canceled." ), diff --git a/umbrello/umbrello/umllistviewitem.cpp b/umbrello/umbrello/umllistviewitem.cpp index 2c81fc0f..e6b7e569 100644 --- a/umbrello/umbrello/umllistviewitem.cpp +++ b/umbrello/umbrello/umllistviewitem.cpp @@ -561,8 +561,8 @@ int UMLListViewItem::compare(TQListViewItem *other, int col, bool ascending) con return retval; } UMLClassifierListItemList items = ourParent->getFilteredList(thisUmlItem->getBaseType()); - int myIndex = items.tqfindRef(thisUmlItem); - int otherIndex = items.tqfindRef(otherUmlItem); + int myIndex = items.findRef(thisUmlItem); + int otherIndex = items.findRef(otherUmlItem); if (myIndex < 0) { retval = (subItem ? -1 : alphaOrder); kError() << dbgPfx << retval << " because (myIndex < 0)" << endl; @@ -607,7 +607,7 @@ UMLListViewItem* UMLListViewItem::findUMLObject(const UMLObject *o) { } UMLListViewItem* UMLListViewItem::findChildObject(UMLClassifierListItem *cli) { - ChildObjectMap::iterator it = m_comap.tqfind(cli); + ChildObjectMap::iterator it = m_comap.find(cli); if (it != m_comap.end()) { return *it; } diff --git a/umbrello/umbrello/umlnamespace.cpp b/umbrello/umbrello/umlnamespace.cpp index 391b0560..45c40de6 100644 --- a/umbrello/umbrello/umlnamespace.cpp +++ b/umbrello/umbrello/umlnamespace.cpp @@ -18,7 +18,7 @@ bool tagEq (const TQString& inTag, const TQString& inPattern) { TQString tag = inTag; TQString pattern = inPattern; tag.remove( TQRegExp("^\\w+:") ); // remove leading "UML:" or other - int patSections = pattern.tqcontains( '.' ) + 1; + int patSections = pattern.contains( '.' ) + 1; TQString tagEnd = tag.section( '.', -patSections ); return (tagEnd.lower() == pattern.lower()); } diff --git a/umbrello/umbrello/umlobject.cpp b/umbrello/umbrello/umlobject.cpp index a1896839..b9a1b2d8 100644 --- a/umbrello/umbrello/umlobject.cpp +++ b/umbrello/umbrello/umlobject.cpp @@ -343,7 +343,7 @@ TQString UMLObject::getPackage(const TQString& separator, bool includeRoot) { if (tempSeparator.isEmpty()) tempSeparator = UMLApp::app()->activeLanguageScopeSeparator(); TQString fqn = getFullyQualifiedName(tempSeparator, includeRoot); - if (!fqn.tqcontains(tempSeparator)) + if (!fqn.contains(tempSeparator)) return ""; TQString scope = fqn.left(fqn.length() - tempSeparator.length() - m_Name.length()); return scope; @@ -448,7 +448,7 @@ bool UMLObject::resolveRef() { } // Work around Object_Factory::createUMLObject()'s incapability // of on-the-fly scope creation: - if (m_SecondaryId.tqcontains("::")) { + if (m_SecondaryId.contains("::")) { // TODO: Merge Import_Utils::createUMLObject() into Object_Factory::createUMLObject() m_pSecondary = Import_Utils::createUMLObject(Uml::ot_UMLObject, m_SecondaryId, m_pUMLPackage); if (m_pSecondary) { @@ -472,8 +472,8 @@ bool UMLObject::resolveRef() { // This is very C++ specific - we rely on some '*' or // '&' to decide it's a ref type. Plus, we don't recognize // typedefs of ref types. - bool isReferenceType = ( m_SecondaryId.tqcontains('*') || - m_SecondaryId.tqcontains('&') ); + bool isReferenceType = ( m_SecondaryId.contains('*') || + m_SecondaryId.contains('&') ); Uml::Object_Type ot = Uml::ot_Class; if (isReferenceType) { ot = Uml::ot_Datatype; diff --git a/umbrello/umbrello/umlview.cpp b/umbrello/umbrello/umlview.cpp index 17c3bb27..7054105d 100644 --- a/umbrello/umbrello/umlview.cpp +++ b/umbrello/umbrello/umlview.cpp @@ -687,7 +687,7 @@ void UMLView::checkMessages(ObjectWidget * w) { MessageWidget *obj; while ( (obj = it.current()) != 0 ) { ++it; - if(! obj -> tqcontains(w)) + if(! obj -> contains(w)) continue; //make sure message doesn't have any associations removeAssociations(obj); @@ -1791,7 +1791,7 @@ void UMLView::removeAssociations(UMLWidget* Widget) { AssociationWidget* assocwidget = 0; while((assocwidget=assoc_it.current())) { ++assoc_it; - if(assocwidget->tqcontains(Widget)) { + if(assocwidget->contains(Widget)) { removeAssoc(assocwidget); } } @@ -2060,7 +2060,7 @@ void UMLView::createAutoAssociations( UMLWidget * widget ) { if (w->getID() != id) continue; // if the containedWidget is not physically located inside this widget - if (widget->rect().tqcontains(w->rect())) + if (widget->rect().contains(w->rect())) continue; // create the containment AssocWidget AssociationWidget *a = new AssociationWidget(this, widget, @@ -2085,7 +2085,7 @@ void UMLView::createAutoAssociations( UMLWidget * widget ) { if (pWidget->getID() == pkgID) break; } - if (pWidget == NULL || pWidget->rect().tqcontains(widget->rect())) + if (pWidget == NULL || pWidget->rect().contains(widget->rect())) return; // create the containment AssocWidget AssociationWidget *a = new AssociationWidget(this, pWidget, at_Containment, widget); diff --git a/umbrello/umbrello/umlviewimageexportermodel.cpp b/umbrello/umbrello/umlviewimageexportermodel.cpp index d99c85f4..0fab653a 100644 --- a/umbrello/umbrello/umlviewimageexportermodel.cpp +++ b/umbrello/umbrello/umlviewimageexportermodel.cpp @@ -298,7 +298,7 @@ bool UMLViewImageExporterModel::fixEPS(const TQString &fileName, const TQRect& r const int pos = rx.search(fileContent); if (pos < 0) { kError() << "UMLViewImageExporterModel::fixEPS(" << fileName - << "): cannot tqfind %%BoundingBox" << endl; + << "): cannot find %%BoundingBox" << endl; return false; } @@ -319,7 +319,7 @@ bool UMLViewImageExporterModel::fixEPS(const TQString &fileName, const TQRect& r const int bottom = int(floor(epstop)) - rect.height() + 1; // modify content - fileContent.tqreplace(pos,rx.cap(0).length(), + fileContent.replace(pos,rx.cap(0).length(), TQString("%%BoundingBox: %1 %2 %3 %4").tqarg(left).tqarg(bottom).tqarg(right).tqarg(top)); ts << fileContent; diff --git a/umbrello/umbrello/umlwidget.cpp b/umbrello/umbrello/umlwidget.cpp index c9733df2..3acfa781 100644 --- a/umbrello/umbrello/umlwidget.cpp +++ b/umbrello/umbrello/umlwidget.cpp @@ -537,7 +537,7 @@ void UMLWidget::setActivated(bool Active /*=true*/) { } void UMLWidget::addAssoc(AssociationWidget* pAssoc) { - if (pAssoc && !m_Assocs.tqcontains(pAssoc)) { + if (pAssoc && !m_Assocs.contains(pAssoc)) { m_Assocs.append(pAssoc); } } |