summaryrefslogtreecommitdiffstats
path: root/languages/kjssupport
diff options
context:
space:
mode:
Diffstat (limited to 'languages/kjssupport')
-rw-r--r--languages/kjssupport/kjssupport_part.cpp6
-rw-r--r--languages/kjssupport/subclassingdlg.cpp48
-rw-r--r--languages/kjssupport/subclassingdlg.h2
3 files changed, 28 insertions, 28 deletions
diff --git a/languages/kjssupport/kjssupport_part.cpp b/languages/kjssupport/kjssupport_part.cpp
index 8f6afda3..2c894b17 100644
--- a/languages/kjssupport/kjssupport_part.cpp
+++ b/languages/kjssupport/kjssupport_part.cpp
@@ -157,7 +157,7 @@ void kjsSupportPart::savedFile(const TQString &fileName)
{
- if (project()->allFiles().tqcontains(fileName.mid ( project()->projectDirectory().length() + 1 )))
+ if (project()->allFiles().contains(fileName.mid ( project()->projectDirectory().length() + 1 )))
{
kdDebug(9014) << "parse file " << fileName << endl;
parse( fileName );
@@ -326,10 +326,10 @@ void kjsSupportPart::parse(const TQString &fileName)
m_problemReporter->addLine(m_file->fileName(), lineNo, errorMessage.qstring());
}
- if( line.tqcontains("{") )
+ if( line.contains("{") )
++depth;
- if( line.tqcontains("}") )
+ if( line.contains("}") )
--depth;
++lineNo;
diff --git a/languages/kjssupport/subclassingdlg.cpp b/languages/kjssupport/subclassingdlg.cpp
index a74b1e00..a4697569 100644
--- a/languages/kjssupport/subclassingdlg.cpp
+++ b/languages/kjssupport/subclassingdlg.cpp
@@ -165,7 +165,7 @@ m_newFileNames(dummy), m_kjsSupport( kjsSupport )
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;
}
@@ -293,15 +293,15 @@ 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());
}
}
@@ -324,23 +324,23 @@ 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,"$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,"$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;
@@ -397,8 +397,8 @@ void SubclassingDlg::accept()
TQFileInfo fi(m_filename + ".js");
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+".js");
@@ -419,11 +419,11 @@ void SubclassingDlg::accept()
slitem->m_alreadyInSubclass)
continue;
TQString impl = 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);
}
kdDebug() << buffer << endl;
diff --git a/languages/kjssupport/subclassingdlg.h b/languages/kjssupport/subclassingdlg.h
index c3573643..b6836037 100644
--- a/languages/kjssupport/subclassingdlg.h
+++ b/languages/kjssupport/subclassingdlg.h
@@ -54,7 +54,7 @@ private:
TQString readBaseClassName();
void updateDlg();
bool replaceKeywords(TQString &buffer, bool canBeModal=true);
- void tqreplace(TQString &string, const TQString& search, const TQString& tqreplace);
+ void replace(TQString &string, const TQString& search, const TQString& replace);
bool saveBuffer(TQString &buffer, const TQString& filename);
bool loadBuffer(TQString &buffer, const TQString& filename);
bool alreadyInSubclass(const TQString &method);