summaryrefslogtreecommitdiffstats
path: root/languages/php/phpfile.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/php/phpfile.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/php/phpfile.cpp')
-rw-r--r--languages/php/phpfile.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/languages/php/phpfile.cpp b/languages/php/phpfile.cpp
index 6e258569..3e3fbd68 100644
--- a/languages/php/phpfile.cpp
+++ b/languages/php/phpfile.cpp
@@ -138,7 +138,7 @@ void PHPFile::Analyse() {
}
bool PHPFile::ParseClass(TQString line, int lineNo) {
- if (line.tqfind("class ", 0, FALSE) == -1)
+ if (line.find("class ", 0, FALSE) == -1)
return FALSE;
TQRegExp Class("^[ \t]*(abstract|final|)[ \t]*class[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*(extends[ \t]*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*))?.*$");
@@ -159,7 +159,7 @@ bool PHPFile::ParseClass(TQString line, int lineNo) {
}
bool PHPFile::ParseFunction(TQString line, int lineNo) {
- if (line.tqfind("function", 0, FALSE) == -1)
+ if (line.find("function", 0, FALSE) == -1)
return FALSE;
TQRegExp function("^[ \t]*(final|abstract|static|)[ \t]*(public|private|protected|)[ \t]*(static|)[ \t]*function[ \t&]*([_a-zA-Z\x7f-\xff][_a-zA-Z0-9\x7f-\xff]*)[ \t]*\\(([_a-zA-Z\x7f-\xff]*[_$, &'\\\"0-9A-Za-z\x7f-\xff\t-=]*)\\).*$");
@@ -198,7 +198,7 @@ bool PHPFile::ParseFunction(TQString line, int lineNo) {
}
bool PHPFile::ParseVariable(TQString line, int lineNo) {
- if (line.tqfind("var") == -1 && line.tqfind("public") == -1 && line.tqfind("private") == -1 && line.tqfind("protected") == -1)
+ if (line.find("var") == -1 && line.find("public") == -1 && line.find("private") == -1 && line.find("protected") == -1)
return FALSE;
TQRegExp variable("^[ \t]*(var|public|private|protected|static)[ \t]*\\$([a-zA-Z_\x7f-\xff][0-9A-Za-z_\x7f-\xff]*)[ \t;=].*$");
@@ -227,7 +227,7 @@ bool PHPFile::ParseVariable(TQString line, int lineNo) {
}
bool PHPFile::ParseThisMember(TQString line, int lineNo) {
- if (line.tqfind("$this->", 0, FALSE) == -1)
+ if (line.find("$this->", 0, FALSE) == -1)
return FALSE;
TQRegExp createthis;
@@ -240,7 +240,7 @@ bool PHPFile::ParseThisMember(TQString line, int lineNo) {
return TRUE;
}
- if (line.tqfind("true", 0, FALSE) != -1 || line.tqfind("false", 0, FALSE) != -1) {
+ if (line.find("true", 0, FALSE) != -1 || line.find("false", 0, FALSE) != -1) {
createthis.setPattern("\\$(this->([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*(true|false)[ \t]*;");
if (createthis.search(line) != -1) {
if (AddVariable(createthis.cap(1), "boolean", lineNo, TRUE) == FALSE)
@@ -249,7 +249,7 @@ bool PHPFile::ParseThisMember(TQString line, int lineNo) {
}
}
- if (line.tqfind("new", 0, FALSE) != -1) {
+ if (line.find("new", 0, FALSE) != -1) {
createthis.setPattern("\\$this->([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t&]*new[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)");
if (createthis.search(line) != -1) {
if (AddVariable(createthis.cap(1), createthis.cap(2), lineNo, TRUE) == FALSE)
@@ -258,7 +258,7 @@ bool PHPFile::ParseThisMember(TQString line, int lineNo) {
}
}
- if (line.tqfind("array", 0, FALSE) != -1) {
+ if (line.find("array", 0, FALSE) != -1) {
createthis.setPattern("\\$this->([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t&]*(new|)[ \t&]*(array)[ \t]*[\\(;]+");
if (createthis.search(line) != -1) {
if (AddVariable(createthis.cap(1), "array", lineNo, TRUE) == FALSE)
@@ -271,7 +271,7 @@ bool PHPFile::ParseThisMember(TQString line, int lineNo) {
}
bool PHPFile::ParseMember(TQString line, int lineNo) {
- if (line.tqfind("$", 0, FALSE) == -1)
+ if (line.find("$", 0, FALSE) == -1)
return FALSE;
/// @todo Ajouter plus de test ....
@@ -293,7 +293,7 @@ bool PHPFile::ParseMember(TQString line, int lineNo) {
return TRUE;
}
- if (line.tqfind("true", 0, FALSE) != -1 || line.tqfind("false", 0, FALSE) != -1) {
+ if (line.find("true", 0, FALSE) != -1 || line.find("false", 0, FALSE) != -1) {
createmember.setPattern("\\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*(true|false)[ \t]*;");
if (createmember.search(line) != -1) {
if (AddVariable(createmember.cap(1), "boolean", lineNo) == FALSE)
@@ -302,7 +302,7 @@ bool PHPFile::ParseMember(TQString line, int lineNo) {
}
}
- if (line.tqfind("new", 0, FALSE) != -1) {
+ if (line.find("new", 0, FALSE) != -1) {
createmember.setPattern("\\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t&]*new[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)");
if (createmember.search(line) != -1) {
if (AddVariable(createmember.cap(1), createmember.cap(2), lineNo) == FALSE)
@@ -311,7 +311,7 @@ bool PHPFile::ParseMember(TQString line, int lineNo) {
}
}
- if (line.tqfind("array", 0, FALSE) != -1) {
+ if (line.find("array", 0, FALSE) != -1) {
createmember.setPattern("\\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t&]*(new|)[ \t&]*(array)[ \t]*[\\(;]+");
if (createmember.search(line) != -1) {
if (AddVariable(createmember.cap(1), "array", lineNo) == FALSE)
@@ -326,7 +326,7 @@ bool PHPFile::ParseMember(TQString line, int lineNo) {
bool PHPFile::ParseReturn(TQString line, int lineNo) {
TQString rettype;
- if (line.tqfind("return", 0, FALSE) == -1)
+ if (line.find("return", 0, FALSE) == -1)
return FALSE;
TQRegExp typeex;
@@ -337,7 +337,7 @@ bool PHPFile::ParseReturn(TQString line, int lineNo) {
TQString varname = typeex.cap(2).ascii();
rettype = varname;
- if (varname.tqfind("$") == 0) {
+ if (varname.find("$") == 0) {
/// @todo search in variable
/*
varname = varname.mid(1);
@@ -357,7 +357,7 @@ bool PHPFile::ParseReturn(TQString line, int lineNo) {
rettype = "null";
}
- if (rettype.tqfind("$") == 0)
+ if (rettype.find("$") == 0)
kdDebug(9018) << "ParseReturn value" << " " << rettype.latin1() << endl;
}
@@ -366,7 +366,7 @@ bool PHPFile::ParseReturn(TQString line, int lineNo) {
}
bool PHPFile::ParseTodo(TQString line, int lineNo) {
- if (line.tqfind("todo", 0, FALSE) == -1)
+ if (line.find("todo", 0, FALSE) == -1)
return FALSE;
TQRegExp todo("/[/]+[ \t]*[@]*todo([ \t]*:[ \t]*|[ \t]*)[ \t]*(.*)$");
@@ -381,7 +381,7 @@ bool PHPFile::ParseTodo(TQString line, int lineNo) {
}
bool PHPFile::ParseFixme(TQString line, int lineNo) {
- if (line.tqfind("fixme", 0, FALSE) == -1)
+ if (line.find("fixme", 0, FALSE) == -1)
return FALSE;
TQRegExp fixme("/[/]+[ \t]*[@]*fixme([ \t]*:[ \t]*|[ \t]*)[ \t]*(.*)$");
@@ -411,7 +411,7 @@ void PHPFile::ParseSource() {
line = (*it).local8Bit();
if (!line.isNull()) {
- if (line.tqfind("include", 0, FALSE) != -1 || line.tqfind("require", 0, FALSE) != -1) {
+ if (line.find("include", 0, FALSE) != -1 || line.find("require", 0, FALSE) != -1) {
if (includere.search(line) != -1) {
TQStringList include_path;
include_path = include_path.split(":", m_part->getIncludePath());
@@ -432,16 +432,16 @@ void PHPFile::ParseSource() {
if ( inMethod == TRUE ) {
- bracketFuncOpen += line.tqcontains("{");
- bracketFuncClose += line.tqcontains("}");
+ bracketFuncOpen += line.contains("{");
+ bracketFuncClose += line.contains("}");
if (bracketFuncOpen == bracketFuncClose && bracketFuncOpen != 0 && bracketFuncClose != 0) {
CloseFunction( lineNo );
}
}
if ( inMethod == FALSE ) {
- bracketOpen += line.tqcontains("{");
- bracketClose += line.tqcontains("}");
+ bracketOpen += line.contains("{");
+ bracketClose += line.contains("}");
if (bracketOpen == bracketClose && bracketOpen != 0 && bracketClose != 0 && inClass == TRUE) {
CloseClass( lineNo );
}
@@ -449,8 +449,8 @@ void PHPFile::ParseSource() {
if ( inClass == FALSE ) {
if (ParseClass(line, lineNo) == TRUE) {
- bracketOpen = line.tqcontains("{");
- bracketClose = line.tqcontains("}");
+ bracketOpen = line.contains("{");
+ bracketClose = line.contains("}");
}
}
@@ -459,8 +459,8 @@ void PHPFile::ParseSource() {
}
if (ParseFunction(line, lineNo) == TRUE) {
- bracketFuncOpen = line.tqcontains("{");
- bracketFuncClose = line.tqcontains("}");
+ bracketFuncOpen = line.contains("{");
+ bracketFuncClose = line.contains("}");
}
if ( inMethod == TRUE )