summaryrefslogtreecommitdiffstats
path: root/languages/php
diff options
context:
space:
mode:
Diffstat (limited to 'languages/php')
-rw-r--r--languages/php/phpcodecompletion.cpp34
-rw-r--r--languages/php/phperrorview.cpp2
-rw-r--r--languages/php/phpfile.cpp212
-rw-r--r--languages/php/phpfile.h2
-rw-r--r--languages/php/phpsupport_event.h8
-rw-r--r--languages/php/phpsupportpart.cpp8
6 files changed, 133 insertions, 133 deletions
diff --git a/languages/php/phpcodecompletion.cpp b/languages/php/phpcodecompletion.cpp
index 3ed864bc..a50335a1 100644
--- a/languages/php/phpcodecompletion.cpp
+++ b/languages/php/phpcodecompletion.cpp
@@ -159,7 +159,7 @@ void PHPCodeCompletion::cursorPositionChanged(){
}
if (m_config->getCodeCompletion()) {
- if (m_completionBoxShow == true) {
+ if (m_completionBoxShow) {
return;
}
@@ -204,7 +204,7 @@ bool PHPCodeCompletion::showCompletionBox(TQValueList<KTextEditor::CompletionEnt
return false;
}
m_completionBoxShow = true;
- m_codeInterface->showCompletionBox(list, max, FALSE);
+ m_codeInterface->showCompletionBox(list, max, false);
return true;
}
return false;
@@ -218,7 +218,7 @@ bool PHPCodeCompletion::checkForStaticFunction(TQString line, int col) {
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]*|)");
- Class.setCaseSensitive(FALSE);
+ Class.setCaseSensitive(false);
if (Class.search(line) != -1) {
TQString classname = Class.cap(1);
@@ -234,7 +234,7 @@ bool PHPCodeCompletion::checkForStaticFunction(TQString line, int col) {
for (funcIt = funcList.begin(); funcIt != funcList.end(); ++funcIt) {
FunctionDom nFunc = *funcIt;
- if ((function.isEmpty() || nFunc->name().startsWith(function, FALSE)) && nFunc->isStatic()) {
+ if ((function.isEmpty() || nFunc->name().startsWith(function, false)) && nFunc->isStatic()) {
KTextEditor::CompletionEntry e;
e.prefix = nClass->name() + " ::";
e.text = nFunc->name();
@@ -267,11 +267,11 @@ bool PHPCodeCompletion::checkForNew(TQString line, int col){
kdDebug(9018) << "checkForNew" << endl;
TQValueList<KTextEditor::CompletionEntry> list;
- if (line.find("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]*|)");
- New.setCaseSensitive(FALSE);
+ New.setCaseSensitive(false);
if (New.search(line) != -1) {
list = getClasses( New.cap(1) );
@@ -297,11 +297,11 @@ bool PHPCodeCompletion::checkForExtends(TQString line, int col){
kdDebug(9018) << "checkForExtends" << endl;
TQValueList<KTextEditor::CompletionEntry> list;
- if (line.find("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]*|)");
- extends.setCaseSensitive(FALSE);
+ extends.setCaseSensitive(false);
if (extends.search(line) != -1) {
list = getClasses(extends.cap(1));
@@ -362,7 +362,7 @@ TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getClasses(TQString
ClassList::Iterator classIt;
for (classIt = classList.begin(); classIt != classList.end(); ++classIt) {
ClassDom nClass = *classIt;
- if (name == NULL || name.isEmpty() || nClass->name().startsWith(name, FALSE)) {
+ if (name == NULL || name.isEmpty() || nClass->name().startsWith(name, false)) {
KTextEditor::CompletionEntry e;
TQStringList::Iterator it = added.find(nClass->name());
@@ -383,7 +383,7 @@ TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars
if (classname.isEmpty()) {
TQValueList<FunctionCompletionEntry>::Iterator it;
for( it = m_globalFunctions.begin(); it != m_globalFunctions.end(); ++it ) {
- if((*it).text.startsWith(function, FALSE)){
+ if((*it).text.startsWith(function, false)){
KTextEditor::CompletionEntry e;
e = (*it);
list.append(e);
@@ -393,7 +393,7 @@ TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars
FunctionList methodList = m_model->globalNamespace()->functionList();
FunctionList::Iterator methodIt;
for (methodIt = methodList.begin(); methodIt != methodList.end(); ++methodIt) {
- if ((*methodIt)->name().startsWith(function, FALSE)){
+ if ((*methodIt)->name().startsWith(function, false)){
KTextEditor::CompletionEntry e;
e.text = (*methodIt)->name();
ArgumentDom pArg = (*methodIt)->argumentList().first();
@@ -416,7 +416,7 @@ TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars
FunctionList::Iterator methodIt;
for (methodIt = methodList.begin(); methodIt != methodList.end(); ++methodIt) {
FunctionDom pMethod = *methodIt;
- if (function.isEmpty() || pMethod->name().startsWith(function, FALSE)) {
+ if (function.isEmpty() || pMethod->name().startsWith(function, false)) {
KTextEditor::CompletionEntry e;
ArgumentDom arg = pMethod->argumentList().first();
@@ -430,7 +430,7 @@ TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars
VariableList::Iterator attrIt;
for (attrIt = attrList.begin(); attrIt != attrList.end(); ++attrIt) {
VariableDom pVar = *attrIt;
- if (function.isEmpty() || pVar->name().startsWith(function, FALSE)) {
+ if (function.isEmpty() || pVar->name().startsWith(function, false)) {
KTextEditor::CompletionEntry e;
e.prefix = nClass->name() + " ::";
e.text = pVar->name();
@@ -517,7 +517,7 @@ TQStringList PHPCodeCompletion::getArguments(TQString classname, TQString functi
TQString PHPCodeCompletion::getCurrentClassName() {
kdDebug(9018) << "getCurrentClassName" << endl;
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]*))?.*$");
- Class.setCaseSensitive(FALSE);
+ Class.setCaseSensitive(false);
for(int i = m_currentLine; i >= 0; i--){
TQString line = m_editInterface->textLine(i);
@@ -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.find(varName,0 , FALSE) != -1) {
+ if (!line.isNull() && line.find(varName,0 , false) != -1) {
if (createmember.search(line) != -1) {
TQString right = createmember.cap(1).stripWhiteSpace();
@@ -637,12 +637,12 @@ bool PHPCodeCompletion::checkForArgHint(TQString line, int col) {
TQValueList<KTextEditor::CompletionEntry> list;
TQStringList argsList;
- if (m_argWidgetShow == true)
+ if (m_argWidgetShow)
return false;
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);
+ Static.setCaseSensitive(false);
if (Static.search(line) != -1) {
TQString classname = Static.cap(1);
diff --git a/languages/php/phperrorview.cpp b/languages/php/phperrorview.cpp
index 85cbf4e7..5d8dccdc 100644
--- a/languages/php/phperrorview.cpp
+++ b/languages/php/phperrorview.cpp
@@ -184,7 +184,7 @@ void PHPErrorView::InitListView(TDEListView* listview)
listview->addColumn( i18n("Line") );
listview->addColumn( i18n("Column") );
listview->addColumn( i18n("Problem") );
- listview->setAllColumnsShowFocus( TRUE );
+ listview->setAllColumnsShowFocus( true );
connect( listview, TQ_SIGNAL(executed(TQListViewItem*)),
this, TQ_SLOT(slotSelected(TQListViewItem*)) );
diff --git a/languages/php/phpfile.cpp b/languages/php/phpfile.cpp
index a9861678..d20bde2a 100644
--- a/languages/php/phpfile.cpp
+++ b/languages/php/phpfile.cpp
@@ -39,8 +39,8 @@ PHPFile::PHPFile(PHPSupportPart *phpSupport, const TQString& fileName)
m_fileinfo = new TQFileInfo(fileName);
m_part = phpSupport;
modified = true;
- inClass = FALSE;
- inMethod = FALSE;
+ inClass = false;
+ inMethod = false;
/*
phpCheckProc = new KShellProcess("/bin/sh");
@@ -120,8 +120,8 @@ void PHPFile::Analyse() {
postEvent( new FileParseEvent( Event_StartParse, this->fileName() ) );
- inClass = FALSE;
- inMethod = FALSE;
+ inClass = false;
+ inMethod = false;
/*
m_contents = readFromEditor();
@@ -138,36 +138,36 @@ void PHPFile::Analyse() {
}
bool PHPFile::ParseClass(TQString line, int lineNo) {
- if (line.find("class ", 0, FALSE) == -1)
- return FALSE;
+ 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]*))?.*$");
- Class.setCaseSensitive(FALSE);
+ Class.setCaseSensitive(false);
if (Class.search(line) != -1) {
- if (AddClass(Class.cap(2), Class.cap(4), lineNo) == FALSE)
- return FALSE;
+ if (!AddClass(Class.cap(2), Class.cap(4), lineNo))
+ return false;
/// @fixme Activate when it exists in ClassModel
// if (Class.cap(1).lower() == "abstract")
// SetClass("abstract");
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool PHPFile::ParseFunction(TQString line, int lineNo) {
- if (line.find("function", 0, FALSE) == -1)
- return FALSE;
+ 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-=]*)\\).*$");
- function.setCaseSensitive(FALSE);
+ function.setCaseSensitive(false);
if (function.search(line) != -1) {
- if (AddFunction(function.cap(4), function.cap(5), lineNo) == FALSE)
- return FALSE;
+ if (!AddFunction(function.cap(4), function.cap(5), lineNo))
+ return false;
if (function.cap(3).lower() == "static" || function.cap(1).lower() == "static")
SetFunction("static");
@@ -175,7 +175,7 @@ bool PHPFile::ParseFunction(TQString line, int lineNo) {
if (function.cap(1).lower() == "abstract") {
SetFunction("abstract");
CloseFunction( lineNo );
- return FALSE;
+ return false;
}
/// @fixme Activate when it exists in FunctionModel
@@ -191,22 +191,22 @@ bool PHPFile::ParseFunction(TQString line, int lineNo) {
if (function.cap(2).lower() == "protected")
SetFunction("protected");
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool PHPFile::ParseVariable(TQString line, int lineNo) {
if (line.find("var") == -1 && line.find("public") == -1 && line.find("private") == -1 && line.find("protected") == -1)
- return FALSE;
+ return false;
TQRegExp variable("^[ \t]*(var|public|private|protected|static)[ \t]*\\$([a-zA-Z_\x7f-\xff][0-9A-Za-z_\x7f-\xff]*)[ \t;=].*$");
- variable.setCaseSensitive(FALSE);
+ variable.setCaseSensitive(false);
if (variable.search(line) != -1) {
- if (AddVariable(variable.cap(2), "", lineNo) == FALSE)
- return FALSE;
+ if (!AddVariable(variable.cap(2), "", lineNo))
+ return false;
if (variable.cap(1).lower() == "private")
SetVariable( "private" );
@@ -220,117 +220,117 @@ bool PHPFile::ParseVariable(TQString line, int lineNo) {
if (variable.cap(1).lower() == "static")
SetVariable( "static" );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool PHPFile::ParseThisMember(TQString line, int lineNo) {
- if (line.find("$this->", 0, FALSE) == -1)
- return FALSE;
+ if (line.find("$this->", 0, false) == -1)
+ return false;
TQRegExp createthis;
- createthis.setCaseSensitive(FALSE);
+ createthis.setCaseSensitive(false);
createthis.setPattern("\\$this->([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*([0-9]*)[ \t]*;");
if (createthis.search(line) != -1) {
- if (AddVariable(createthis.cap(1), "integer", lineNo, TRUE) == FALSE)
- return FALSE;
- return TRUE;
+ if (!AddVariable(createthis.cap(1), "integer", lineNo, true))
+ return false;
+ return true;
}
- if (line.find("true", 0, FALSE) != -1 || line.find("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)
- return FALSE;
- return TRUE;
+ if (!AddVariable(createthis.cap(1), "boolean", lineNo, true))
+ return false;
+ return true;
}
}
- if (line.find("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)
- return FALSE;
- return TRUE;
+ if (!AddVariable(createthis.cap(1), createthis.cap(2), lineNo, true))
+ return false;
+ return true;
}
}
- if (line.find("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)
- return FALSE;
- return TRUE;
+ if (!AddVariable(createthis.cap(1), "array", lineNo, true))
+ return false;
+ return true;
}
}
- return FALSE;
+ return false;
}
bool PHPFile::ParseMember(TQString line, int lineNo) {
- if (line.find("$", 0, FALSE) == -1)
- return FALSE;
+ if (line.find("$", 0, false) == -1)
+ return false;
/// @todo Ajouter plus de test ....
TQRegExp createmember;
- createmember.setCaseSensitive(FALSE);
+ createmember.setCaseSensitive(false);
createmember.setPattern("\\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*([0-9]*)[ \t]*;");
if (createmember.search(line) != -1) {
- if (AddVariable(createmember.cap(1), "integer", lineNo) == FALSE)
- return FALSE;
- return TRUE;
+ if (!AddVariable(createmember.cap(1), "integer", lineNo))
+ return false;
+ return true;
}
createmember.setPattern("\\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*[\"']+(.*)[\"']+[ \t]*;");
if (createmember.search(line) != -1) {
- if (AddVariable(createmember.cap(1), "string", lineNo) == FALSE)
- return FALSE;
- return TRUE;
+ if (!AddVariable(createmember.cap(1), "string", lineNo))
+ return false;
+ return true;
}
- if (line.find("true", 0, FALSE) != -1 || line.find("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)
- return FALSE;
- return TRUE;
+ if (!AddVariable(createmember.cap(1), "boolean", lineNo))
+ return false;
+ return true;
}
}
- if (line.find("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)
- return FALSE;
- return TRUE;
+ if (!AddVariable(createmember.cap(1), createmember.cap(2), lineNo))
+ return false;
+ return true;
}
}
- if (line.find("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)
- return FALSE;
- return TRUE;
+ if (!AddVariable(createmember.cap(1), "array", lineNo))
+ return false;
+ return true;
}
}
- return FALSE;
+ return false;
}
bool PHPFile::ParseReturn(TQString line, int lineNo) {
TQString rettype;
- if (line.find("return", 0, FALSE) == -1)
- return FALSE;
+ if (line.find("return", 0, false) == -1)
+ return false;
TQRegExp typeex;
- typeex.setCaseSensitive(FALSE);
+ typeex.setCaseSensitive(false);
typeex.setPattern("return[ \t]*(\\(|)([a-zA-Z_\x7f-\xff$][a-zA-Z0-9_\x7f-\xff]*)(\\)|)[ \t]*;");
if (typeex.search(line) != -1) {
@@ -362,37 +362,37 @@ bool PHPFile::ParseReturn(TQString line, int lineNo) {
}
SetFunction("result", rettype);
- return TRUE;
+ return true;
}
bool PHPFile::ParseTodo(TQString line, int lineNo) {
- if (line.find("todo", 0, FALSE) == -1)
- return FALSE;
+ if (line.find("todo", 0, false) == -1)
+ return false;
TQRegExp todo("/[/]+[ \t]*[@]*todo([ \t]*:[ \t]*|[ \t]*)[ \t]*(.*)$");
- todo.setCaseSensitive(FALSE);
+ todo.setCaseSensitive(false);
if (todo.search(line) != -1) {
AddTodo( todo.cap(2), lineNo );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool PHPFile::ParseFixme(TQString line, int lineNo) {
- if (line.find("fixme", 0, FALSE) == -1)
- return FALSE;
+ if (line.find("fixme", 0, false) == -1)
+ return false;
TQRegExp fixme("/[/]+[ \t]*[@]*fixme([ \t]*:[ \t]*|[ \t]*)[ \t]*(.*)$");
- fixme.setCaseSensitive(FALSE);
+ fixme.setCaseSensitive(false);
if (fixme.search(line) != -1) {
AddFixme( fixme.cap(2), lineNo );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void PHPFile::ParseSource() {
@@ -405,13 +405,13 @@ void PHPFile::ParseSource() {
TQRegExp includere("^[ \t]*(include|require|include_once|require_once)[ \t]*(\\(|)[ \t]*[\"'](.*)[\"'][ \t]*(\\)|)[ \t]*;$");
- includere.setCaseSensitive(FALSE);
+ includere.setCaseSensitive(false);
for ( TQStringList::Iterator it = m_contents.begin(); it != m_contents.end(); ++it ) {
line = (*it).local8Bit();
if (!line.isNull()) {
- if (line.find("include", 0, FALSE) != -1 || line.find("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());
@@ -431,7 +431,7 @@ void PHPFile::ParseSource() {
}
- if ( inMethod == TRUE ) {
+ if ( inMethod ) {
bracketFuncOpen += line.contains("{");
bracketFuncClose += line.contains("}");
if (bracketFuncOpen == bracketFuncClose && bracketFuncOpen != 0 && bracketFuncClose != 0) {
@@ -439,31 +439,31 @@ void PHPFile::ParseSource() {
}
}
- if ( inMethod == FALSE ) {
+ if ( !inMethod ) {
bracketOpen += line.contains("{");
bracketClose += line.contains("}");
- if (bracketOpen == bracketClose && bracketOpen != 0 && bracketClose != 0 && inClass == TRUE) {
+ if (bracketOpen == bracketClose && bracketOpen != 0 && bracketClose != 0 && inClass) {
CloseClass( lineNo );
}
}
- if ( inClass == FALSE ) {
- if (ParseClass(line, lineNo) == TRUE) {
+ if ( !inClass ) {
+ if (ParseClass(line, lineNo)) {
bracketOpen = line.contains("{");
bracketClose = line.contains("}");
}
}
- if ( inClass == TRUE ) {
+ if ( inClass ) {
ParseThisMember(line, lineNo);
}
- if (ParseFunction(line, lineNo) == TRUE) {
+ if (ParseFunction(line, lineNo)) {
bracketFuncOpen = line.contains("{");
bracketFuncClose = line.contains("}");
}
- if ( inMethod == TRUE )
+ if ( inMethod )
ParseReturn(line, lineNo);
ParseVariable(line, lineNo);
@@ -582,58 +582,58 @@ void PHPFile::postEvent(FileParseEvent *event) {
bool PHPFile::AddClass(TQString name, TQString extends, int start) {
postEvent( new FileParseEvent( Event_AddClass, this->fileName(), name, extends, start ) );
- inClass = TRUE;
- return TRUE;
+ inClass = true;
+ return true;
}
bool PHPFile::SetClass(TQString arguments) {
postEvent( new FileParseEvent( Event_SetClass, this->fileName(), "", arguments ) );
- return TRUE;
+ return true;
}
bool PHPFile::CloseClass(int end) {
postEvent( new FileParseEvent( Event_CloseClass, this->fileName(), end ) );
- inClass = FALSE;
- return TRUE;
+ inClass = false;
+ return true;
}
bool PHPFile::AddFunction(TQString name, TQString arguments, int start) {
postEvent( new FileParseEvent( Event_AddFunction, this->fileName(), name, arguments, start ) );
- inMethod = TRUE;
- return TRUE;
+ inMethod = true;
+ return true;
}
bool PHPFile::SetFunction(TQString name, TQString arguments) {
postEvent( new FileParseEvent( Event_SetFunction, this->fileName(), name, arguments ) );
- return TRUE;
+ return true;
}
bool PHPFile::CloseFunction(int end) {
postEvent( new FileParseEvent( Event_CloseFunction, this->fileName(), end ) );
- inMethod = FALSE;
- return TRUE;
+ inMethod = false;
+ return true;
}
bool PHPFile::AddVariable(TQString name, TQString type, int position, bool classvar) {
postEvent( new FileParseEvent( Event_AddVariable, this->fileName(), name, type, position, classvar ) );
- return TRUE;
+ return true;
}
bool PHPFile::SetVariable(TQString arguments) {
postEvent( new FileParseEvent( Event_SetVariable, this->fileName(), "", arguments ) );
- return TRUE;
+ return true;
}
bool PHPFile::AddTodo(TQString arguments, int position) {
postEvent( new FileParseEvent( Event_AddTodo, this->fileName(), "", arguments, position ) );
- inClass = TRUE;
- return TRUE;
+ inClass = true;
+ return true;
}
bool PHPFile::AddFixme(TQString arguments, int position) {
postEvent( new FileParseEvent( Event_AddFixme, this->fileName(), "", arguments, position ) );
- inClass = TRUE;
- return TRUE;
+ inClass = true;
+ return true;
}
#include "phpfile.moc"
diff --git a/languages/php/phpfile.h b/languages/php/phpfile.h
index da4da636..6dbf4a13 100644
--- a/languages/php/phpfile.h
+++ b/languages/php/phpfile.h
@@ -98,7 +98,7 @@ private:
bool SetFunction(TQString name, TQString arguments = "");
bool CloseFunction(int end);
- bool AddVariable(TQString name, TQString type, int position, bool classvar = FALSE);
+ bool AddVariable(TQString name, TQString type, int position, bool classvar = false);
bool SetVariable(TQString arguments);
bool AddTodo(TQString arguments, int position);
diff --git a/languages/php/phpsupport_event.h b/languages/php/phpsupport_event.h
index 28713efb..c3dfcd02 100644
--- a/languages/php/phpsupport_event.h
+++ b/languages/php/phpsupport_event.h
@@ -51,7 +51,7 @@ public:
m_name = "";
m_arguments = "";
m_position = 0;
- m_global = FALSE;
+ m_global = false;
}
FileParseEvent(long event, const TQString& fileName, int position )
@@ -59,20 +59,20 @@ public:
{
m_name = "";
m_arguments = "";
- m_global = FALSE;
+ m_global = false;
}
FileParseEvent(long event, const TQString& fileName, const TQString& name, const TQString& arguments )
: TQCustomEvent(event), m_fileName( fileName ), m_name( name ), m_arguments( arguments )
{
m_position = 0;
- m_global = FALSE;
+ m_global = false;
}
FileParseEvent(long event, const TQString& fileName, const TQString& name, const TQString& arguments, int position )
: TQCustomEvent(event), m_fileName( fileName ), m_name( name ), m_arguments( arguments ), m_position( position )
{
- m_global = FALSE;
+ m_global = false;
}
FileParseEvent(long event, const TQString& fileName, const TQString& name, const TQString& arguments, int position, bool global )
diff --git a/languages/php/phpsupportpart.cpp b/languages/php/phpsupportpart.cpp
index cf498060..25de7864 100644
--- a/languages/php/phpsupportpart.cpp
+++ b/languages/php/phpsupportpart.cpp
@@ -443,7 +443,7 @@ bool PHPSupportPart::parseProject()
_jd->dir.setPath( project()->projectDirectory() );
TQTimer::singleShot( 0, this, TQ_SLOT( slotParseFiles() ) );
- return TRUE;
+ return true;
}
void PHPSupportPart::slotParseFiles()
@@ -609,7 +609,7 @@ void PHPSupportPart::customEvent( TQCustomEvent* ev )
nClass->setStartPosition( event->posititon(), 0);
m_file->addClass( nClass );
- if ( event->arguments().isEmpty() != TRUE )
+ if ( !event->arguments().isEmpty() )
nClass->addBaseClass( event->arguments() );
ns->addClass( nClass );
@@ -690,10 +690,10 @@ void PHPSupportPart::customEvent( TQCustomEvent* ev )
nVariable->setStartPosition( event->posititon(), 0 );
nVariable->setAccess(VariableModel::Public);
- if ( event->arguments().isEmpty() != TRUE )
+ if ( !event->arguments().isEmpty() )
nVariable->setType( event->arguments() );
- if ( LastClass != NULL && ( LastMethod == NULL || event->global() == TRUE ) ) {
+ if ( LastClass != NULL && ( LastMethod == NULL || event->global() ) ) {
// kdDebug(9018) << "AddVariable To Class " << LastClass->name() << " " << nVariable->name() << endl;
LastClass->addVariable(nVariable);
} else {