summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/codegenerators/rubycodeoperation.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit0813b39aed2cf4c84157a22c4c9594336d93d412 (patch)
tree0f6157f9c9ecc6ed26cb98f058219a8021d3f4a6 /umbrello/umbrello/codegenerators/rubycodeoperation.cpp
parent35dc58791106d7a1864264063df5f3ee3f1f0f15 (diff)
downloadtdesdk-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/umbrello/codegenerators/rubycodeoperation.cpp')
-rw-r--r--umbrello/umbrello/codegenerators/rubycodeoperation.cpp32
1 files changed, 16 insertions, 16 deletions
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;
}