summaryrefslogtreecommitdiffstats
path: root/languages/cpp/subclassingdlg.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
commit330c33ab6f97b279737bf9527c9add7bb1475450 (patch)
tree85cb998d3077ae295d65944ebb4d0189fc660ead /languages/cpp/subclassingdlg.cpp
parent093de0db4fea89b3f94a2359c6981f353d035eb7 (diff)
downloadtdevelop-330c33ab6f97b279737bf9527c9add7bb1475450.tar.gz
tdevelop-330c33ab6f97b279737bf9527c9add7bb1475450.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/subclassingdlg.cpp')
-rw-r--r--languages/cpp/subclassingdlg.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/languages/cpp/subclassingdlg.cpp b/languages/cpp/subclassingdlg.cpp
index 27b08f27..72db362b 100644
--- a/languages/cpp/subclassingdlg.cpp
+++ b/languages/cpp/subclassingdlg.cpp
@@ -145,7 +145,7 @@ m_newFileNames(dummy), m_cppSupport( cppSupport )
{
kdDebug() << "base class " << baseClass << " class " << (*classIt)->name()
<< " parents " << (*classIt)->baseClassList().join(",") << endl;
- if ( (*classIt)->baseClassList().tqfindIndex(baseClass) != -1 )
+ if ( (*classIt)->baseClassList().findIndex(baseClass) != -1 )
{
kdDebug() << "base class matched " << endl;
m_edClassName->setText((*classIt)->name());
@@ -167,7 +167,7 @@ bool SubclassingDlg::alreadyInSubclass(const TQString &method)
{
for (uint i=0;i<m_parsedMethods.count();i++)
{
- if (method.tqfind(m_parsedMethods[i])==0)
+ if (method.find(m_parsedMethods[i])==0)
return true;
}
return false;
@@ -276,14 +276,14 @@ void SubclassingDlg::updateDlg()
{
}
-void SubclassingDlg::tqreplace(TQString &string, const TQString& search, const TQString& tqreplace)
+void SubclassingDlg::replace(TQString &string, const TQString& search, const TQString& replace)
{
- int nextPos = string.tqfind(search);
+ int nextPos = string.find(search);
unsigned int searchLength = search.length();
while (nextPos>-1)
{
- string = string.tqreplace(nextPos,searchLength,tqreplace);
- nextPos = string.tqfind(search,nextPos+tqreplace.length());
+ string = string.replace(nextPos,searchLength,replace);
+ nextPos = string.find(search,nextPos+replace.length());
}
}
@@ -304,24 +304,24 @@ bool SubclassingDlg::loadBuffer(TQString &buffer, const TQString& filename)
bool SubclassingDlg::replaceKeywords(TQString &buffer,bool canBeModal)
{
- tqreplace(buffer,"$NEWFILENAMEUC$",m_edFileName->text().upper());
- tqreplace(buffer,"$BASEFILENAMELC$",m_formName.lower());
- tqreplace(buffer,"$BASEFILENAME$",m_formName);
- tqreplace(buffer,"$NEWCLASS$",m_edClassName->text());
- tqreplace(buffer,"$TQTBASECLASS$", m_qtBaseClassName );
- tqreplace(buffer,"$BASECLASS$",m_baseClassName);
- tqreplace(buffer,"$NEWFILENAMELC$",m_edFileName->text().lower());
+ replace(buffer,"$NEWFILENAMEUC$",m_edFileName->text().upper());
+ replace(buffer,"$BASEFILENAMELC$",m_formName.lower());
+ replace(buffer,"$BASEFILENAME$",m_formName);
+ replace(buffer,"$NEWCLASS$",m_edClassName->text());
+ replace(buffer,"$TQTBASECLASS$", m_qtBaseClassName );
+ replace(buffer,"$BASECLASS$",m_baseClassName);
+ replace(buffer,"$NEWFILENAMELC$",m_edFileName->text().lower());
if (canBeModal)
{
- tqreplace(buffer,"$CAN_BE_MODAL_H$",", bool modal = FALSE");
- tqreplace(buffer,"$CAN_BE_MODAL_CPP1$",", bool modal");
- tqreplace(buffer,"$CAN_BE_MODAL_CPP2$",", modal");
+ replace(buffer,"$CAN_BE_MODAL_H$",", bool modal = FALSE");
+ replace(buffer,"$CAN_BE_MODAL_CPP1$",", bool modal");
+ replace(buffer,"$CAN_BE_MODAL_CPP2$",", modal");
}
else
{
- tqreplace(buffer,"$CAN_BE_MODAL_H$","");
- tqreplace(buffer,"$CAN_BE_MODAL_CPP1$","");
- tqreplace(buffer,"$CAN_BE_MODAL_CPP2$","");
+ replace(buffer,"$CAN_BE_MODAL_H$","");
+ replace(buffer,"$CAN_BE_MODAL_CPP1$","");
+ replace(buffer,"$CAN_BE_MODAL_CPP2$","");
}
return true;
@@ -378,8 +378,8 @@ void SubclassingDlg::accept()
TQFileInfo fi(m_filename + ".h");
TQString module = fi.baseName();
TQString basefilename = fi.baseName(true);
- buffer.tqreplace(TQRegExp("\\$MODULE\\$"),module);
- buffer.tqreplace(TQRegExp("\\$FILENAME\\$"),basefilename);
+ buffer.replace(TQRegExp("\\$MODULE\\$"),module);
+ buffer.replace(TQRegExp("\\$FILENAME\\$"),basefilename);
}
else
loadBuffer(buffer,m_filename+".h");
@@ -411,12 +411,12 @@ void SubclassingDlg::accept()
if (!slitem->m_isFunc)
{
declBuild += spacer.fill(' ',43-declBuild.length()) + slitem->m_methodName + ";";
- tqreplace(buffer,"/*$PUBLIC_SLOTS$*/",declBuild);
+ replace(buffer,"/*$PUBLIC_SLOTS$*/",declBuild);
}
else
{
declBuild += spacer.fill(' ',47-declBuild.length()) + slitem->m_methodName + ";";
- tqreplace(buffer,"/*$PUBLIC_FUNCTIONS$*/",declBuild);
+ replace(buffer,"/*$PUBLIC_FUNCTIONS$*/",declBuild);
}
}
if (slitem->m_access=="protected")
@@ -424,12 +424,12 @@ void SubclassingDlg::accept()
if (!slitem->m_isFunc)
{
declBuild += spacer.fill(' ',46-declBuild.length()) + slitem->m_methodName + ";";
- tqreplace(buffer,"/*$PROTECTED_SLOTS$*/",declBuild);
+ replace(buffer,"/*$PROTECTED_SLOTS$*/",declBuild);
}
else
{
declBuild += spacer.fill(' ',50-declBuild.length()) + slitem->m_methodName + ";";
- tqreplace(buffer,"/*$PROTECTED_FUNCTIONS$*/",declBuild);
+ replace(buffer,"/*$PROTECTED_FUNCTIONS$*/",declBuild);
}
}
}
@@ -473,8 +473,8 @@ void SubclassingDlg::accept()
TQFileInfo fi(m_filename + ".cpp");
TQString module = fi.baseName();
TQString basefilename = fi.baseName(true);
- buffer.tqreplace(TQRegExp("\\$MODULE\\$"),module);
- buffer.tqreplace(TQRegExp("\\$FILENAME\\$"),basefilename);
+ buffer.replace(TQRegExp("\\$MODULE\\$"),module);
+ buffer.replace(TQRegExp("\\$FILENAME\\$"),basefilename);
if ( (m_cppSupport->project()) && (m_cppSupport->project()->options() & KDevProject::UsesAutotoolsBuildSystem))
buffer += "\n#include \"$NEWFILENAMELC$.tqmoc\"\n";
}
@@ -489,11 +489,11 @@ void SubclassingDlg::accept()
slitem->m_alreadyInSubclass)
continue;
TQString impl = slitem->m_callBaseClass ? implementation_callbase : implementation;
- tqreplace(impl,"$RETURNTYPE$",slitem->m_returnType);
- tqreplace(impl,"$NEWCLASS$",m_edClassName->text());
- tqreplace(impl,"$METHOD$", slitem->m_methodName);
- tqreplace(impl,"$TQTBASECLASS$", m_qtBaseClassName);
- tqreplace(buffer,"/*$SPECIALIZATION$*/",impl);
+ replace(impl,"$RETURNTYPE$",slitem->m_returnType);
+ replace(impl,"$NEWCLASS$",m_edClassName->text());
+ replace(impl,"$METHOD$", slitem->m_methodName);
+ replace(impl,"$TQTBASECLASS$", m_qtBaseClassName);
+ replace(buffer,"/*$SPECIALIZATION$*/",impl);
}
if (reformat_box->isChecked())