summaryrefslogtreecommitdiffstats
path: root/languages/php/phpfile.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/php/phpfile.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/php/phpfile.cpp')
-rw-r--r--languages/php/phpfile.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/languages/php/phpfile.cpp b/languages/php/phpfile.cpp
index d54028da..6e258569 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.find("class ", 0, FALSE) == -1)
+ if (line.tqfind("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.find("function", 0, FALSE) == -1)
+ if (line.tqfind("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.find("var") == -1 && line.find("public") == -1 && line.find("private") == -1 && line.find("protected") == -1)
+ if (line.tqfind("var") == -1 && line.tqfind("public") == -1 && line.tqfind("private") == -1 && line.tqfind("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.find("$this->", 0, FALSE) == -1)
+ if (line.tqfind("$this->", 0, FALSE) == -1)
return FALSE;
TQRegExp createthis;
@@ -240,7 +240,7 @@ bool PHPFile::ParseThisMember(TQString line, int lineNo) {
return TRUE;
}
- if (line.find("true", 0, FALSE) != -1 || line.find("false", 0, FALSE) != -1) {
+ if (line.tqfind("true", 0, FALSE) != -1 || line.tqfind("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.find("new", 0, FALSE) != -1) {
+ if (line.tqfind("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.find("array", 0, FALSE) != -1) {
+ if (line.tqfind("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.find("$", 0, FALSE) == -1)
+ if (line.tqfind("$", 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.find("true", 0, FALSE) != -1 || line.find("false", 0, FALSE) != -1) {
+ if (line.tqfind("true", 0, FALSE) != -1 || line.tqfind("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.find("new", 0, FALSE) != -1) {
+ if (line.tqfind("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.find("array", 0, FALSE) != -1) {
+ if (line.tqfind("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.find("return", 0, FALSE) == -1)
+ if (line.tqfind("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.find("$") == 0) {
+ if (varname.tqfind("$") == 0) {
/// @todo search in variable
/*
varname = varname.mid(1);
@@ -346,7 +346,7 @@ bool PHPFile::ParseReturn(TQString line, int lineNo) {
while ( it != m_vars.end() ) {
Action *p = *it++;
- if (p->parent() == current && p->name() == varname) {
+ if (p->tqparent() == current && p->name() == varname) {
rettype = p->args();
}
}
@@ -357,7 +357,7 @@ bool PHPFile::ParseReturn(TQString line, int lineNo) {
rettype = "null";
}
- if (rettype.find("$") == 0)
+ if (rettype.tqfind("$") == 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.find("todo", 0, FALSE) == -1)
+ if (line.tqfind("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.find("fixme", 0, FALSE) == -1)
+ if (line.tqfind("fixme", 0, FALSE) == -1)
return FALSE;
TQRegExp fixme("/[/]+[ \t]*[@]*fixme([ \t]*:[ \t]*|[ \t]*)[ \t]*(.*)$");
@@ -411,14 +411,14 @@ void PHPFile::ParseSource() {
line = (*it).local8Bit();
if (!line.isNull()) {
- if (line.find("include", 0, FALSE) != -1 || line.find("require", 0, FALSE) != -1) {
+ if (line.tqfind("include", 0, FALSE) != -1 || line.tqfind("require", 0, FALSE) != -1) {
if (includere.search(line) != -1) {
TQStringList include_path;
include_path = include_path.split(":", m_part->getIncludePath());
include_path.append(URLUtil::directory(fileName()) + "/");
include_path.append("");
- TQStringList list = includere.capturedTexts();
+ TQStringList list = includere.tqcapturedTexts();
for ( TQStringList::Iterator it = include_path.begin(); it != include_path.end(); ++it ) {
TQString abso = URLUtil::canonicalPath(*it + "/" + list[3]);
@@ -432,16 +432,16 @@ void PHPFile::ParseSource() {
if ( inMethod == TRUE ) {
- bracketFuncOpen += line.contains("{");
- bracketFuncClose += line.contains("}");
+ bracketFuncOpen += line.tqcontains("{");
+ bracketFuncClose += line.tqcontains("}");
if (bracketFuncOpen == bracketFuncClose && bracketFuncOpen != 0 && bracketFuncClose != 0) {
CloseFunction( lineNo );
}
}
if ( inMethod == FALSE ) {
- bracketOpen += line.contains("{");
- bracketClose += line.contains("}");
+ bracketOpen += line.tqcontains("{");
+ bracketClose += line.tqcontains("}");
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.contains("{");
- bracketClose = line.contains("}");
+ bracketOpen = line.tqcontains("{");
+ bracketClose = line.tqcontains("}");
}
}
@@ -459,8 +459,8 @@ void PHPFile::ParseSource() {
}
if (ParseFunction(line, lineNo) == TRUE) {
- bracketFuncOpen = line.contains("{");
- bracketFuncClose = line.contains("}");
+ bracketFuncOpen = line.tqcontains("{");
+ bracketFuncClose = line.tqcontains("}");
}
if ( inMethod == TRUE )