summaryrefslogtreecommitdiffstats
path: root/languages/php/phpcodecompletion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/php/phpcodecompletion.cpp')
-rw-r--r--languages/php/phpcodecompletion.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/languages/php/phpcodecompletion.cpp b/languages/php/phpcodecompletion.cpp
index 8f0a9298..c8af6b94 100644
--- a/languages/php/phpcodecompletion.cpp
+++ b/languages/php/phpcodecompletion.cpp
@@ -146,9 +146,9 @@ void PHPCodeCompletion::cursorPositionChanged(){
}
if (m_config->getCodeHinting()) {
- int pos1 = lineStr.tqfindRev("(", col - 1);
- int pos2 = lineStr.tqfindRev(TQRegExp("[ \\t=;\\$\\.\\(\\)]"), pos1 - 1);
- int pos3 = lineStr.tqfindRev(")", col);
+ int pos1 = lineStr.findRev("(", col - 1);
+ int pos2 = lineStr.findRev(TQRegExp("[ \\t=;\\$\\.\\(\\)]"), pos1 - 1);
+ int pos3 = lineStr.findRev(")", col);
if (pos1 > pos2 && pos1 != -1 && pos3 < pos1) {
TQString line = lineStr.mid(pos2 + 1, pos1 - pos2 - 1).stripWhiteSpace();
@@ -163,7 +163,7 @@ void PHPCodeCompletion::cursorPositionChanged(){
return;
}
- int pos = lineStr.tqfindRev(TQRegExp("[ \\t=;\\$\\.\\(\\)]"), col - 1);
+ int pos = lineStr.findRev(TQRegExp("[ \\t=;\\$\\.\\(\\)]"), col - 1);
TQString line = lineStr.mid(pos + 1, col - pos).stripWhiteSpace();
if (checkForVariable(line, col)) {
@@ -180,7 +180,7 @@ kdDebug(9018) << "end checkForGlobalFunction" << endl;
return;
}
- pos = lineStr.stripWhiteSpace().tqfindRev(TQRegExp("[ \\t=;\\$\\.\\(\\)]"), col - 1);
+ pos = lineStr.stripWhiteSpace().findRev(TQRegExp("[ \\t=;\\$\\.\\(\\)]"), col - 1);
line = lineStr.mid(pos + 1, col - pos);
if (checkForNew(line, col)) {
@@ -214,7 +214,7 @@ bool PHPCodeCompletion::checkForStaticFunction(TQString line, int col) {
kdDebug(9018) << "checkForStaticFunction" << endl;
TQValueList<KTextEditor::CompletionEntry> list;
- if (line.tqfind("::") == -1)
+ if (line.find("::") == -1)
return false;
TQRegExp Class("([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)::([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|)");
@@ -267,7 +267,7 @@ bool PHPCodeCompletion::checkForNew(TQString line, int col){
kdDebug(9018) << "checkForNew" << endl;
TQValueList<KTextEditor::CompletionEntry> list;
- if (line.tqfind("new ", 0, FALSE) == -1)
+ if (line.find("new ", 0, FALSE) == -1)
return false;
TQRegExp New("[& \t]*new[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|)");
@@ -297,7 +297,7 @@ bool PHPCodeCompletion::checkForExtends(TQString line, int col){
kdDebug(9018) << "checkForExtends" << endl;
TQValueList<KTextEditor::CompletionEntry> list;
- if (line.tqfind("extends", 0, FALSE) == -1)
+ if (line.find("extends", 0, FALSE) == -1)
return false;
TQRegExp extends("[ \t]*extends[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|)");
@@ -316,12 +316,12 @@ bool PHPCodeCompletion::checkForVariable(TQString line, int col){
TQValueList<KTextEditor::CompletionEntry> list;
TQString args;
- if (line.tqfind("->") == -1) {
+ if (line.find("->") == -1) {
return false;
}
if (line.left(2) != "->") {
- int pos = line.tqfindRev("->");
+ int pos = line.findRev("->");
args = line.mid(pos + 2, line.length() - pos);
line = line.mid(0, pos);
}
@@ -365,7 +365,7 @@ TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getClasses(TQString
if (name == NULL || name.isEmpty() || nClass->name().tqstartsWith(name, FALSE)) {
KTextEditor::CompletionEntry e;
- TQStringList::Iterator it = added.tqfind(nClass->name());
+ TQStringList::Iterator it = added.find(nClass->name());
if (it == added.end()) {
e.text = nClass->name();
list.append(e);
@@ -532,7 +532,7 @@ TQString PHPCodeCompletion::getCurrentClassName() {
TQString PHPCodeCompletion::getClassName(TQString varName, TQString classname) {
kdDebug(9018) << "getClassName " << varName << "::" << classname << endl;
- if (varName.tqfind("$") == 0)
+ if (varName.find("$") == 0)
varName = varName.mid(1);
if (varName.lower() == "this")
@@ -577,7 +577,7 @@ TQString PHPCodeCompletion::getClassName(TQString varName, TQString classname) {
for(int i = m_currentLine; i >= 0; i--){
TQString line = m_editInterface->textLine(i);
- if (!line.isNull() && line.tqfind(varName,0 , FALSE) != -1) {
+ if (!line.isNull() && line.find(varName,0 , FALSE) != -1) {
if (createmember.search(line) != -1) {
TQString right = createmember.cap(1).stripWhiteSpace();
@@ -640,7 +640,7 @@ bool PHPCodeCompletion::checkForArgHint(TQString line, int col) {
if (m_argWidgetShow == true)
return false;
- if (line.tqfind("::") != -1) {
+ if (line.find("::") != -1) {
TQRegExp Static("([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)::([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)");
Static.setCaseSensitive(FALSE);
@@ -658,8 +658,8 @@ bool PHPCodeCompletion::checkForArgHint(TQString line, int col) {
}
}
- if (line.tqfindRev("->") != -1) {
- int pos1 = line.tqfindRev("->");
+ if (line.findRev("->") != -1) {
+ int pos1 = line.findRev("->");
TQString classname;
TQString function = line.mid(pos1 + 2);