summaryrefslogtreecommitdiffstats
path: root/languages/php
diff options
context:
space:
mode:
Diffstat (limited to 'languages/php')
-rw-r--r--languages/php/phpcodecompletion.cpp174
-rw-r--r--languages/php/phpcodecompletion.h38
-rw-r--r--languages/php/phpconfigdata.cpp4
-rw-r--r--languages/php/phpconfigdata.h44
-rw-r--r--languages/php/phpconfigwidget.cpp30
-rw-r--r--languages/php/phpconfigwidget.h8
-rw-r--r--languages/php/phperrorview.cpp128
-rw-r--r--languages/php/phperrorview.h32
-rw-r--r--languages/php/phpfile.cpp142
-rw-r--r--languages/php/phpfile.h66
-rw-r--r--languages/php/phpnewclassdlg.cpp62
-rw-r--r--languages/php/phpnewclassdlg.h8
-rw-r--r--languages/php/phpparser.cpp36
-rw-r--r--languages/php/phpparser.h26
-rw-r--r--languages/php/phpsupport_event.h42
-rw-r--r--languages/php/phpsupportpart.cpp164
-rw-r--r--languages/php/phpsupportpart.h38
17 files changed, 521 insertions, 521 deletions
diff --git a/languages/php/phpcodecompletion.cpp b/languages/php/phpcodecompletion.cpp
index c9bd7213..b2b1eb33 100644
--- a/languages/php/phpcodecompletion.cpp
+++ b/languages/php/phpcodecompletion.cpp
@@ -26,9 +26,9 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <iostream>
@@ -36,7 +36,7 @@
using namespace std;
-PHPCodeCompletion::PHPCodeCompletion(PHPSupportPart *phpSupport, PHPConfigData *config) : QObject(), m_cursorInterface(0), m_codeInterface(0), m_editInterface(0), m_selectionInterface(0) {
+PHPCodeCompletion::PHPCodeCompletion(PHPSupportPart *phpSupport, PHPConfigData *config) : TQObject(), m_cursorInterface(0), m_codeInterface(0), m_editInterface(0), m_selectionInterface(0) {
m_phpSupport = phpSupport;
m_config = config;
@@ -52,21 +52,21 @@ PHPCodeCompletion::~PHPCodeCompletion(){
void PHPCodeCompletion::readGlobalPHPFunctionsFile(){
KStandardDirs *dirs = PHPSupportFactory::instance()->dirs();
- QString phpFuncFile = dirs->findResource("data","kdevphpsupport/phpfunctions");
- QRegExp lineReg(":([0-9A-Za-z_]+) ([0-9A-Za-z_]+)\\((.*)\\)");
+ TQString phpFuncFile = dirs->findResource("data","kdevphpsupport/phpfunctions");
+ TQRegExp lineReg(":([0-9A-Za-z_]+) ([0-9A-Za-z_]+)\\((.*)\\)");
FunctionCompletionEntry e;
- QFile f(phpFuncFile);
+ TQFile f(phpFuncFile);
if ( f.open(IO_ReadOnly) ) { // file opened successfully
- QTextStream t( &f ); // use a text stream
- QString s;
+ TQTextStream t( &f ); // use a text stream
+ TQString s;
while ( !t.eof() ) { // until end of file...
s = t.readLine(); // line of text excluding '\n'
if (lineReg.search(s.local8Bit()) != -1) {
e.prefix = lineReg.cap(1);
e.text = lineReg.cap(2);
- e.postfix = "(" + QString(lineReg.cap(3)) + ")";
- e.prototype = QString(lineReg.cap(1)) + " " + QString(lineReg.cap(2)) + "(" + QString(lineReg.cap(3)) + ")";
+ e.postfix = "(" + TQString(lineReg.cap(3)) + ")";
+ e.prototype = TQString(lineReg.cap(1)) + " " + TQString(lineReg.cap(2)) + "(" + TQString(lineReg.cap(3)) + ")";
m_globalFunctions.append(e);
}
}
@@ -119,11 +119,11 @@ void PHPCodeCompletion::setActiveEditorPart(KParts::Part *part)
}
disconnect(part->widget(), 0, this, 0 ); // to make sure that it is't connected twice
-// connect(part->widget(), SIGNAL(cursorPositionChanged()), this, SLOT(cursorPositionChanged()));
- connect( part, SIGNAL(textChanged()), this, SLOT(cursorPositionChanged()) );
- connect(part->widget(), SIGNAL(argHintHidden()), this, SLOT(argHintHided()));
- connect(part->widget(), SIGNAL(completionAborted()), this, SLOT(completionBoxHided()));
- connect(part->widget(), SIGNAL(completionDone()), this, SLOT(completionBoxHided()));
+// connect(part->widget(), TQT_SIGNAL(cursorPositionChanged()), this, TQT_SLOT(cursorPositionChanged()));
+ connect( part, TQT_SIGNAL(textChanged()), this, TQT_SLOT(cursorPositionChanged()) );
+ connect(part->widget(), TQT_SIGNAL(argHintHidden()), this, TQT_SLOT(argHintHided()));
+ connect(part->widget(), TQT_SIGNAL(completionAborted()), this, TQT_SLOT(completionBoxHided()));
+ connect(part->widget(), TQT_SIGNAL(completionDone()), this, TQT_SLOT(completionBoxHided()));
}
void PHPCodeCompletion::cursorPositionChanged(){
@@ -135,7 +135,7 @@ void PHPCodeCompletion::cursorPositionChanged(){
kdDebug(9018) << "cursorPositionChanged:" << line << ":" << col << endl;
m_currentLine = line;
- QString lineStr = m_editInterface->textLine(line);
+ TQString lineStr = m_editInterface->textLine(line);
if (lineStr.isNull() || lineStr.isEmpty()) {
return;
}
@@ -147,11 +147,11 @@ void PHPCodeCompletion::cursorPositionChanged(){
if (m_config->getCodeHinting()) {
int pos1 = lineStr.findRev("(", col - 1);
- int pos2 = lineStr.findRev(QRegExp("[ \\t=;\\$\\.\\(\\)]"), pos1 - 1);
+ int pos2 = lineStr.findRev(TQRegExp("[ \\t=;\\$\\.\\(\\)]"), pos1 - 1);
int pos3 = lineStr.findRev(")", col);
if (pos1 > pos2 && pos1 != -1 && pos3 < pos1) {
- QString line = lineStr.mid(pos2 + 1, pos1 - pos2 - 1).stripWhiteSpace();
+ TQString line = lineStr.mid(pos2 + 1, pos1 - pos2 - 1).stripWhiteSpace();
checkForArgHint(line, col);
kdDebug(9018) << "end checkForArgHint" << endl;
}
@@ -163,8 +163,8 @@ void PHPCodeCompletion::cursorPositionChanged(){
return;
}
- int pos = lineStr.findRev(QRegExp("[ \\t=;\\$\\.\\(\\)]"), col - 1);
- QString line = lineStr.mid(pos + 1, col - pos).stripWhiteSpace();
+ int pos = lineStr.findRev(TQRegExp("[ \\t=;\\$\\.\\(\\)]"), col - 1);
+ TQString line = lineStr.mid(pos + 1, col - pos).stripWhiteSpace();
if (checkForVariable(line, col)) {
kdDebug(9018) << "end checkForVariable" << endl;
@@ -180,7 +180,7 @@ kdDebug(9018) << "end checkForGlobalFunction" << endl;
return;
}
- pos = lineStr.stripWhiteSpace().findRev(QRegExp("[ \\t=;\\$\\.\\(\\)]"), col - 1);
+ pos = lineStr.stripWhiteSpace().findRev(TQRegExp("[ \\t=;\\$\\.\\(\\)]"), col - 1);
line = lineStr.mid(pos + 1, col - pos);
if (checkForNew(line, col)) {
@@ -196,7 +196,7 @@ kdDebug(9018) << "end checkFor" << endl;
}
}
-bool PHPCodeCompletion::showCompletionBox(QValueList<KTextEditor::CompletionEntry> list, unsigned long max) {
+bool PHPCodeCompletion::showCompletionBox(TQValueList<KTextEditor::CompletionEntry> list, unsigned long max) {
if (list.count() > 0) {
if (list.count() == 1) {
KTextEditor::CompletionEntry e = list.first();
@@ -210,19 +210,19 @@ bool PHPCodeCompletion::showCompletionBox(QValueList<KTextEditor::CompletionEntr
return false;
}
-bool PHPCodeCompletion::checkForStaticFunction(QString line, int col) {
+bool PHPCodeCompletion::checkForStaticFunction(TQString line, int col) {
kdDebug(9018) << "checkForStaticFunction" << endl;
- QValueList<KTextEditor::CompletionEntry> list;
+ TQValueList<KTextEditor::CompletionEntry> list;
if (line.find("::") == -1)
return false;
- QRegExp Class("([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)::([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|)");
+ 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);
if (Class.search(line) != -1) {
- QString classname = Class.cap(1);
- QString function = Class.cap(2);
+ TQString classname = Class.cap(1);
+ TQString function = Class.cap(2);
ClassList classList = getClassByName(classname);
@@ -248,8 +248,8 @@ bool PHPCodeCompletion::checkForStaticFunction(QString line, int col) {
}
if (nClass->baseClassList().count() != 0) {
- QStringList base = nClass->baseClassList();
- QStringList::Iterator nameIt;
+ TQStringList base = nClass->baseClassList();
+ TQStringList::Iterator nameIt;
for (nameIt = base.begin(); nameIt != base.end(); ++nameIt) {
ClassList baseList = getClassByName(*nameIt);
ClassList::Iterator baseIt;
@@ -263,14 +263,14 @@ bool PHPCodeCompletion::checkForStaticFunction(QString line, int col) {
return false;
}
-bool PHPCodeCompletion::checkForNew(QString line, int col){
+bool PHPCodeCompletion::checkForNew(TQString line, int col){
kdDebug(9018) << "checkForNew" << endl;
- QValueList<KTextEditor::CompletionEntry> list;
+ TQValueList<KTextEditor::CompletionEntry> list;
if (line.find("new ", 0, FALSE) == -1)
return false;
- QRegExp New("[& \t]*new[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|)");
+ TQRegExp New("[& \t]*new[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|)");
New.setCaseSensitive(FALSE);
if (New.search(line) != -1) {
@@ -293,14 +293,14 @@ bool PHPCodeCompletion::checkForNew(QString line, int col){
return false;
}
-bool PHPCodeCompletion::checkForExtends(QString line, int col){
+bool PHPCodeCompletion::checkForExtends(TQString line, int col){
kdDebug(9018) << "checkForExtends" << endl;
- QValueList<KTextEditor::CompletionEntry> list;
+ TQValueList<KTextEditor::CompletionEntry> list;
if (line.find("extends", 0, FALSE) == -1)
return false;
- QRegExp extends("[ \t]*extends[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|)");
+ TQRegExp extends("[ \t]*extends[ \t]+([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|)");
extends.setCaseSensitive(FALSE);
if (extends.search(line) != -1) {
@@ -311,10 +311,10 @@ bool PHPCodeCompletion::checkForExtends(QString line, int col){
return false;
}
-bool PHPCodeCompletion::checkForVariable(QString line, int col){
+bool PHPCodeCompletion::checkForVariable(TQString line, int col){
kdDebug(9018) << "checkForVariable" << endl;
- QValueList<KTextEditor::CompletionEntry> list;
- QString args;
+ TQValueList<KTextEditor::CompletionEntry> list;
+ TQString args;
if (line.find("->") == -1) {
return false;
@@ -326,10 +326,10 @@ bool PHPCodeCompletion::checkForVariable(QString line, int col){
line = line.mid(0, pos);
}
- QStringList vars = QStringList::split("->", line);
- QString classname;
+ TQStringList vars = TQStringList::split("->", line);
+ TQString classname;
- for ( QStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) {
+ for ( TQStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) {
classname = getClassName(*it, classname);
}
@@ -343,9 +343,9 @@ bool PHPCodeCompletion::checkForVariable(QString line, int col){
return showCompletionBox(list, args.length());
}
-bool PHPCodeCompletion::checkForGlobalFunction(QString line, int col) {
+bool PHPCodeCompletion::checkForGlobalFunction(TQString line, int col) {
kdDebug(9018) << "checkForGlobalFunction(" + line + "," << col << endl;
- QValueList<KTextEditor::CompletionEntry> list;
+ TQValueList<KTextEditor::CompletionEntry> list;
if (line.length() < 3)
return false;
@@ -354,9 +354,9 @@ bool PHPCodeCompletion::checkForGlobalFunction(QString line, int col) {
return showCompletionBox(list, line.length());
}
-QValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getClasses(QString name) {
- QValueList<KTextEditor::CompletionEntry> list;
- QStringList added;
+TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getClasses(TQString name) {
+ TQValueList<KTextEditor::CompletionEntry> list;
+ TQStringList added;
ClassList classList = m_model->globalNamespace()->classList();
ClassList::Iterator classIt;
@@ -365,7 +365,7 @@ QValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getClasses(QString n
if (name == NULL || name.isEmpty() || nClass->name().startsWith(name, FALSE)) {
KTextEditor::CompletionEntry e;
- QStringList::Iterator it = added.find(nClass->name());
+ TQStringList::Iterator it = added.find(nClass->name());
if (it == added.end()) {
e.text = nClass->name();
list.append(e);
@@ -376,12 +376,12 @@ QValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getClasses(QString n
return list;
}
-QValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars(QString classname, QString function) {
+TQValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars(TQString classname, TQString function) {
kdDebug(9018) << "getFunctionsAndVars " << classname << endl;
- QValueList<KTextEditor::CompletionEntry> list;
+ TQValueList<KTextEditor::CompletionEntry> list;
if (classname.isEmpty()) {
- QValueList<FunctionCompletionEntry>::Iterator it;
+ TQValueList<FunctionCompletionEntry>::Iterator it;
for( it = m_globalFunctions.begin(); it != m_globalFunctions.end(); ++it ) {
if((*it).text.startsWith(function, FALSE)){
KTextEditor::CompletionEntry e;
@@ -440,8 +440,8 @@ QValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars(
}
if (nClass->baseClassList().count() != 0) {
- QStringList base = nClass->baseClassList();
- QStringList::Iterator nameIt;
+ TQStringList base = nClass->baseClassList();
+ TQStringList::Iterator nameIt;
for (nameIt = base.begin(); nameIt != base.end(); ++nameIt) {
ClassList baseList = getClassByName(*nameIt);
ClassList::Iterator baseIt;
@@ -453,12 +453,12 @@ QValueList<KTextEditor::CompletionEntry> PHPCodeCompletion::getFunctionsAndVars(
return list;
}
-QStringList PHPCodeCompletion::getArguments(QString classname, QString function) {
+TQStringList PHPCodeCompletion::getArguments(TQString classname, TQString function) {
kdDebug(9018) << "getArguments " << function << endl;
- QStringList list;
+ TQStringList list;
if (classname.isEmpty()) {
- QValueList<FunctionCompletionEntry>::Iterator it;
+ TQValueList<FunctionCompletionEntry>::Iterator it;
for( it = m_globalFunctions.begin(); it != m_globalFunctions.end(); ++it ) {
if((*it).text.lower() == function.lower()){
KTextEditor::CompletionEntry e = (*it);
@@ -472,7 +472,7 @@ QStringList PHPCodeCompletion::getArguments(QString classname, QString function)
if ((*methodIt)->name().lower() == function.lower()){
KTextEditor::CompletionEntry e;
ArgumentDom pArgs;
- QString args = "()";
+ TQString args = "()";
ArgumentDom pArg = (*methodIt)->argumentList().first();
if (pArgs)
@@ -500,8 +500,8 @@ QStringList PHPCodeCompletion::getArguments(QString classname, QString function)
}
if (nClass->baseClassList().count() != 0) {
- QStringList base = nClass->baseClassList();
- QStringList::Iterator nameIt;
+ TQStringList base = nClass->baseClassList();
+ TQStringList::Iterator nameIt;
for (nameIt = base.begin(); nameIt != base.end(); ++nameIt) {
ClassList baseList = getClassByName(*nameIt);
ClassList::Iterator baseIt;
@@ -514,22 +514,22 @@ QStringList PHPCodeCompletion::getArguments(QString classname, QString function)
return list;
}
-QString PHPCodeCompletion::getCurrentClassName() {
+TQString PHPCodeCompletion::getCurrentClassName() {
kdDebug(9018) << "getCurrentClassName" << endl;
- QRegExp 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]*))?.*$");
+ 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);
for(int i = m_currentLine; i >= 0; i--){
- QString line = m_editInterface->textLine(i);
+ TQString line = m_editInterface->textLine(i);
if (!line.isNull()) {
if (Class.search(line) != -1)
return Class.cap(2);
}
}
- return QString::null;
+ return TQString::null;
}
-QString PHPCodeCompletion::getClassName(QString varName, QString classname) {
+TQString PHPCodeCompletion::getClassName(TQString varName, TQString classname) {
kdDebug(9018) << "getClassName " << varName << "::" << classname << endl;
if (varName.find("$") == 0)
@@ -557,7 +557,7 @@ QString PHPCodeCompletion::getClassName(QString varName, QString classname) {
FunctionList::Iterator funcIt;
for (funcIt = funcList.begin(); funcIt != funcList.end(); ++funcIt) {
- if (QString((*funcIt)->name().lower() + "(") == varName.lower())
+ if (TQString((*funcIt)->name().lower() + "(") == varName.lower())
return (*funcIt)->resultType();
}
@@ -573,23 +573,23 @@ QString PHPCodeCompletion::getClassName(QString varName, QString classname) {
kdDebug(9018) << "Need " << classname << " " << varName << endl;
/*
/// @fixme peut devenir recursif voir xbutton.php ligne 204
- QRegExp createmember("\\" + varName + "[ \t]*=[ \t]*(.*)[ \t]*;");
+ TQRegExp createmember("\\" + varName + "[ \t]*=[ \t]*(.*)[ \t]*;");
for(int i = m_currentLine; i >= 0; i--){
- QString line = m_editInterface->textLine(i);
+ TQString line = m_editInterface->textLine(i);
if (!line.isNull() && line.find(varName,0 , FALSE) != -1) {
if (createmember.search(line) != -1) {
- QString right = createmember.cap(1).stripWhiteSpace();
+ TQString right = createmember.cap(1).stripWhiteSpace();
- QStringList vars = QStringList::split("->", right);
- for ( QStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) {
- QString objet = *it;
+ TQStringList vars = TQStringList::split("->", right);
+ for ( TQStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) {
+ TQString objet = *it;
++it;
if (it == vars.end())
break;
- QString var = *it;
+ TQString var = *it;
if (objet.lower() == "$this")
objet = this->getCurrentClassName();
@@ -597,9 +597,9 @@ QString PHPCodeCompletion::getClassName(QString varName, QString classname) {
classname = getClassName(var, objet);
NamespaceDom varns = m_model->globalNamespace()->namespaceByName("varsns");
- QString fromns;
+ TQString fromns;
if (varns) {
- QString name = objet + "::" + var;
+ TQString name = objet + "::" + var;
kdDebug(9018) << name << endl;
VariableDom nVar = varns->variableByName(name);
fromns = nVar->type();
@@ -618,8 +618,8 @@ QString PHPCodeCompletion::getClassName(QString varName, QString classname) {
return "";
}
-QValueList<ClassDom> PHPCodeCompletion::getClassByName(QString classname) {
- QValueList<ClassDom> CList;
+TQValueList<ClassDom> PHPCodeCompletion::getClassByName(TQString classname) {
+ TQValueList<ClassDom> CList;
ClassList classList = m_model->globalNamespace()->classList();
@@ -632,21 +632,21 @@ QValueList<ClassDom> PHPCodeCompletion::getClassByName(QString classname) {
return CList;
}
-bool PHPCodeCompletion::checkForArgHint(QString line, int col) {
+bool PHPCodeCompletion::checkForArgHint(TQString line, int col) {
kdDebug(9018) << "checkForArgHint" << endl;
- QValueList<KTextEditor::CompletionEntry> list;
- QStringList argsList;
+ TQValueList<KTextEditor::CompletionEntry> list;
+ TQStringList argsList;
if (m_argWidgetShow == true)
return false;
if (line.find("::") != -1) {
- QRegExp Static("([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)::([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)");
+ 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);
if (Static.search(line) != -1) {
- QString classname = Static.cap(1);
- QString function = Static.cap(2);
+ TQString classname = Static.cap(1);
+ TQString function = Static.cap(2);
argsList = getArguments(classname, function);
@@ -661,16 +661,16 @@ bool PHPCodeCompletion::checkForArgHint(QString line, int col) {
if (line.findRev("->") != -1) {
int pos1 = line.findRev("->");
- QString classname;
- QString function = line.mid(pos1 + 2);
+ TQString classname;
+ TQString function = line.mid(pos1 + 2);
line = line.mid(0, pos1);
kdDebug(9018) << "checkForArgHint 2 " << line << endl;
- QStringList vars = QStringList::split("->", line);
+ TQStringList vars = TQStringList::split("->", line);
- for ( QStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) {
+ for ( TQStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) {
kdDebug(9018) << "for " << line << endl;
classname = getClassName(*it, classname);
kdDebug(9018) << "next " << line << endl;
@@ -705,7 +705,7 @@ kdDebug(9018) << "checkForArgHint 0 " << line << endl;
return false;
}
-void PHPCodeCompletion::setStatusBar(QString expr, QString type) {
+void PHPCodeCompletion::setStatusBar(TQString expr, TQString type) {
m_phpSupport->mainWindow()->statusBar()->message( i18n("Type of %1 is %2").arg(expr).arg(type), 1000 );
}
diff --git a/languages/php/phpcodecompletion.h b/languages/php/phpcodecompletion.h
index 41d79934..505bdcbd 100644
--- a/languages/php/phpcodecompletion.h
+++ b/languages/php/phpcodecompletion.h
@@ -23,7 +23,7 @@
#include <codemodel.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kregexp.h>
#include <kparts/part.h>
@@ -42,10 +42,10 @@ class PHPConfigData;
class FunctionCompletionEntry : public KTextEditor::CompletionEntry {
public:
- QString prototype;
+ TQString prototype;
};
-class PHPCodeCompletion : public QObject {
+class PHPCodeCompletion : public TQObject {
Q_OBJECT
public:
@@ -61,29 +61,29 @@ protected slots:
void completionBoxHided();
protected:
- bool showCompletionBox(QValueList<KTextEditor::CompletionEntry> list, unsigned long max);
+ bool showCompletionBox(TQValueList<KTextEditor::CompletionEntry> list, unsigned long max);
- bool checkForVariable(QString line, int col);
- bool checkForStaticFunction(QString line, int col);
- bool checkForNew(QString line, int col);
- bool checkForExtends(QString line, int col);
- bool checkForGlobalFunction(QString line, int col);
+ bool checkForVariable(TQString line, int col);
+ bool checkForStaticFunction(TQString line, int col);
+ bool checkForNew(TQString line, int col);
+ bool checkForExtends(TQString line, int col);
+ bool checkForGlobalFunction(TQString line, int col);
- bool checkForArgHint(QString line, int col);
+ bool checkForArgHint(TQString line, int col);
- QValueList<KTextEditor::CompletionEntry> getClasses(QString name);
- QValueList<KTextEditor::CompletionEntry> getFunctionsAndVars(QString classname, QString str);
- QStringList getArguments(QString classname, QString function);
- QString getCurrentClassName();
- QString getClassName(QString varName, QString classname);
- QValueList<ClassDom> getClassByName(QString classname);
+ TQValueList<KTextEditor::CompletionEntry> getClasses(TQString name);
+ TQValueList<KTextEditor::CompletionEntry> getFunctionsAndVars(TQString classname, TQString str);
+ TQStringList getArguments(TQString classname, TQString function);
+ TQString getCurrentClassName();
+ TQString getClassName(TQString varName, TQString classname);
+ TQValueList<ClassDom> getClassByName(TQString classname);
void readGlobalPHPFunctionsFile();
- void setStatusBar(QString expr, QString type);
+ void setStatusBar(TQString expr, TQString type);
private:
int m_currentLine;
- QValueList<FunctionCompletionEntry> m_globalFunctions;
+ TQValueList<FunctionCompletionEntry> m_globalFunctions;
PHPSupportPart* m_phpSupport;
PHPConfigData* m_config;
@@ -97,7 +97,7 @@ protected:
KTextEditor::ViewCursorInterface *m_cursorInterface;
KTextEditor::SelectionInterface *m_selectionInterface;
- QString findDeclaration(QString name, int line = -1);
+ TQString findDeclaration(TQString name, int line = -1);
};
#endif
diff --git a/languages/php/phpconfigdata.cpp b/languages/php/phpconfigdata.cpp
index 45f27a79..00baec12 100644
--- a/languages/php/phpconfigdata.cpp
+++ b/languages/php/phpconfigdata.cpp
@@ -22,8 +22,8 @@
#include "domutil.h"
#include <iostream>
-PHPConfigData::PHPConfigData(QDomDocument* dom) {
- QString file = KStandardDirs::findExe("php");
+PHPConfigData::PHPConfigData(TQDomDocument* dom) {
+ TQString file = KStandardDirs::findExe("php");
if (file.isEmpty())
file = "/usr/local/bin/php";
diff --git a/languages/php/phpconfigdata.h b/languages/php/phpconfigdata.h
index 0c7a49eb..49c49da8 100644
--- a/languages/php/phpconfigdata.h
+++ b/languages/php/phpconfigdata.h
@@ -20,15 +20,15 @@
#ifndef PHPCONFIGDATA_H
#define PHPCONFIGDATA_H
-#include <qstring.h>
-#include <qdom.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqdom.h>
+#include <tqobject.h>
/**
*@author Sandy Meier
*/
-class PHPConfigData : public QObject {
+class PHPConfigData : public TQObject {
Q_OBJECT
signals:
@@ -38,7 +38,7 @@ public:
enum InvocationMode {Web=1,Shell=2};
enum StartupFileMode {Current=1,Default=2};
- PHPConfigData(QDomDocument* document);
+ PHPConfigData(TQDomDocument* document);
~PHPConfigData();
/** returns true if the configuration is ok, false if something is missing
@@ -57,43 +57,43 @@ public:
}
// web
- QString getWebURL() {
+ TQString getWebURL() {
return webURL;
}
- void setWebURL(QString weburl) {
+ void setWebURL(TQString weburl) {
webURL = weburl;
}
// shell
- QString getPHPExecPath() {
+ TQString getPHPExecPath() {
return phpExePath;
}
- void setPHPExePath(QString path) {
+ void setPHPExePath(TQString path) {
phpExePath = path;
}
// config
- QString getPHPIniPath() {
+ TQString getPHPIniPath() {
return phpIniPath;
}
- void setPHPIniPath(QString path) {
+ void setPHPIniPath(TQString path) {
phpIniPath = path;
}
// options
- QString getPHPIncludePath() {
+ TQString getPHPIncludePath() {
return phpIncludePath;
}
- void setPHPIncludePath(QString path) {
+ void setPHPIncludePath(TQString path) {
phpIncludePath = path;
}
- QString getStartupFile() {
+ TQString getStartupFile() {
return phpStartupFile;
}
- void setStartupFile(QString defaultFile) {
+ void setStartupFile(TQString defaultFile) {
phpStartupFile = defaultFile;
}
@@ -131,19 +131,19 @@ public:
}
private:
- QDomDocument* document;
+ TQDomDocument* document;
InvocationMode invocationMode;
// web
- QString webURL;
+ TQString webURL;
// shell
- QString phpExePath;
- QString phpIniPath;
- QString phpStartupFile;
+ TQString phpExePath;
+ TQString phpIniPath;
+ TQString phpStartupFile;
// options
- QString phpIncludePath;
- QString phpDefaultFile;
+ TQString phpIncludePath;
+ TQString phpDefaultFile;
StartupFileMode phpStartupFileMode;
// code help
diff --git a/languages/php/phpconfigwidget.cpp b/languages/php/phpconfigwidget.cpp
index 829e3038..5b5dfda7 100644
--- a/languages/php/phpconfigwidget.cpp
+++ b/languages/php/phpconfigwidget.cpp
@@ -1,11 +1,11 @@
#include "domutil.h"
#include <kprocess.h>
#include <klineedit.h>
-#include <qcheckbox.h>
-#include <qmultilineedit.h>
-#include <qcstring.h>
+#include <tqcheckbox.h>
+#include <tqmultilineedit.h>
+#include <tqcstring.h>
#include <iostream>
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
#include <kfiledialog.h>
#include <kstandarddirs.h>
@@ -16,7 +16,7 @@
using namespace std;
-PHPConfigWidget::PHPConfigWidget(PHPConfigData* data,QWidget* parent, const char* name, WFlags fl )
+PHPConfigWidget::PHPConfigWidget(PHPConfigData* data,TQWidget* parent, const char* name, WFlags fl )
: PHPConfigWidgetBase( parent, name, fl )
{
configData = data;
@@ -34,15 +34,15 @@ PHPConfigWidget::PHPConfigWidget(PHPConfigData* data,QWidget* parent, const cha
}
// page webserver
- QString weburl = configData->getWebURL();
+ TQString weburl = configData->getWebURL();
if (weburl.isEmpty())
weburl = "http://localhost/";
weburl_edit->setText(weburl);
// page shell
- QString exepath = configData->getPHPExecPath();
+ TQString exepath = configData->getPHPExecPath();
if (exepath.isEmpty()) {
- QString fiexepath = KStandardDirs::findExe("php");
+ TQString fiexepath = KStandardDirs::findExe("php");
if (exepath.isEmpty())
exepath = "/usr/local/bin/php";
@@ -52,7 +52,7 @@ PHPConfigWidget::PHPConfigWidget(PHPConfigData* data,QWidget* parent, const cha
// page options
PHPConfigData::StartupFileMode phpStartupFileMode = configData->getStartupFileMode();
- QString phpStartupFile = configData->getStartupFile();
+ TQString phpStartupFile = configData->getStartupFile();
useDefaultFile_edit->setText(phpStartupFile);
@@ -64,7 +64,7 @@ PHPConfigWidget::PHPConfigWidget(PHPConfigData* data,QWidget* parent, const cha
useDefaultFile_radio->setChecked(true);
}
- QString includepath = configData->getPHPIncludePath();
+ TQString includepath = configData->getPHPIncludePath();
include_path_edit->setText(includepath);
codeCompletion_checkbox->setChecked(configData->getCodeCompletion());
@@ -129,8 +129,8 @@ void PHPConfigWidget::slotAboutClicked()
proc << exe_edit->text();
proc << "-m";
- connect( &proc, SIGNAL(receivedStdout (KProcess*, char*, int)),
- this, SLOT(slotReceivedPHPInfo (KProcess*, char*, int)));
+ connect( &proc, TQT_SIGNAL(receivedStdout (KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedPHPInfo (KProcess*, char*, int)));
proc.start(KProcess::Block,KProcess::Stdout);
PHPInfoDlg dlg(this,"phpinfo",true);
dlg.php_edit->setText(m_phpInfo);
@@ -139,11 +139,11 @@ void PHPConfigWidget::slotAboutClicked()
}
void PHPConfigWidget::slotReceivedPHPInfo (KProcess* /*proc*/, char* buffer, int buflen){
- m_phpInfo += QCString(buffer,buflen+1);
+ m_phpInfo += TQCString(buffer,buflen+1);
}
void PHPConfigWidget::slotPHPExeButtonClicked(){
- QString exe = KFileDialog::getOpenFileName(QFileInfo(exe_edit->text()).filePath());
+ TQString exe = KFileDialog::getOpenFileName(TQFileInfo(exe_edit->text()).filePath());
if (!exe.isEmpty()){
exe_edit->setText(exe);
}
@@ -151,7 +151,7 @@ void PHPConfigWidget::slotPHPExeButtonClicked(){
void PHPConfigWidget::slotPHPIniButtonClicked()
{
- QString file = KFileDialog::getOpenFileName(QFileInfo(exe_edit->text()).filePath(), QString("*.ini|INI File (*.ini)"));
+ TQString file = KFileDialog::getOpenFileName(TQFileInfo(exe_edit->text()).filePath(), TQString("*.ini|INI File (*.ini)"));
if (!file.isEmpty()){
ini_edit->setText(file);
diff --git a/languages/php/phpconfigwidget.h b/languages/php/phpconfigwidget.h
index 87bb6ab3..c404643c 100644
--- a/languages/php/phpconfigwidget.h
+++ b/languages/php/phpconfigwidget.h
@@ -2,7 +2,7 @@
#define PHPCONFIGWIDGET_H
#include "phpconfigwidgetbase.h"
-#include <qstring.h>
+#include <tqstring.h>
class KProcess;
class PHPConfigData;
@@ -11,7 +11,7 @@ class PHPConfigWidget : public PHPConfigWidgetBase
Q_OBJECT
public:
- PHPConfigWidget( PHPConfigData* data,QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ PHPConfigWidget( PHPConfigData* data,TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~PHPConfigWidget();
public slots:
@@ -23,8 +23,8 @@ public slots:
void slotReceivedPHPInfo (KProcess* proc, char* buffer, int buflen);
private:
- QDomDocument* dom;
- QString m_phpInfo;
+ TQDomDocument* dom;
+ TQString m_phpInfo;
PHPConfigData* configData;
};
diff --git a/languages/php/phperrorview.cpp b/languages/php/phperrorview.cpp
index 011e8b77..e5d479ec 100644
--- a/languages/php/phperrorview.cpp
+++ b/languages/php/phperrorview.cpp
@@ -43,28 +43,28 @@
#include <kconfig.h>
-#include <qtimer.h>
-#include <qregexp.h>
-#include <qvbox.h>
-#include <qfileinfo.h>
-#include <qwhatsthis.h>
-#include <qtabbar.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
+#include <tqvbox.h>
+#include <tqfileinfo.h>
+#include <tqwhatsthis.h>
+#include <tqtabbar.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
class ProblemItem: public KListViewItem
{
public:
- ProblemItem( QListView* parent, const QString& problem,
- const QString& file, const QString& line, const QString& column )
+ ProblemItem( TQListView* parent, const TQString& problem,
+ const TQString& file, const TQString& line, const TQString& column )
: KListViewItem( parent, problem, file, line, column ) {}
- ProblemItem( QListViewItem* parent, const QString& problem,
- const QString& file, const QString& line, const QString& column )
+ ProblemItem( TQListViewItem* parent, const TQString& problem,
+ const TQString& file, const TQString& line, const TQString& column )
: KListViewItem( parent, problem, file, line, column ) {}
- int compare( QListViewItem* item, int column, bool ascending ) const {
+ int compare( TQListViewItem* item, int column, bool ascending ) const {
if( column == 2 || column == 3 ){
int a = text( column ).toInt();
int b = item->text( column ).toInt();
@@ -77,20 +77,20 @@ public:
};
-PHPErrorView::PHPErrorView( PHPSupportPart* part, QWidget* parent, const char* name )
- : QWidget( parent, name ? name : "problemreporter" ),
+PHPErrorView::PHPErrorView( PHPSupportPart* part, TQWidget* parent, const char* name )
+ : TQWidget( parent, name ? name : "problemreporter" ),
m_phpSupport( part ),
m_document( 0 ),
m_markIface( 0 )
{
- QWhatsThis::add(this, i18n("<b>Problem reporter</b><p>This window shows various \"problems\" in your project. "
+ TQWhatsThis::add(this, i18n("<b>Problem reporter</b><p>This window shows various \"problems\" in your project. "
"It displays TODO entries, FIXME's and errors reported by a language parser. "
"To add a TODO or FIXME entry, just type<br>"
"<tt>//@todo my todo</tt><br>"
"<tt>//TODO: my todo</tt><br>"
"<tt>//FIXME fix this</tt>"));
- m_gridLayout = new QGridLayout(this,2,3);
+ m_gridLayout = new TQGridLayout(this,2,3);
m_errorList = new KListView(this);
m_fixmeList = new KListView(this);
@@ -109,19 +109,19 @@ PHPErrorView::PHPErrorView( PHPSupportPart* part, QWidget* parent, const char* n
InitListView(m_currentList);
m_currentList->removeColumn(1);
- m_widgetStack = new QWidgetStack(this);
+ m_widgetStack = new TQWidgetStack(this);
m_widgetStack->addWidget(m_currentList,0);
m_widgetStack->addWidget(m_errorList,1);
m_widgetStack->addWidget(m_fixmeList,2);
m_widgetStack->addWidget(m_todoList,3);
m_widgetStack->addWidget(m_filteredList,4);
- m_tabBar = new QTabBar(this);
- m_tabBar->insertTab(new QTab(i18n("Current")),0);
- m_tabBar->insertTab(new QTab(i18n("Errors")),1);
- m_tabBar->insertTab(new QTab(i18n("Fixme")),2);
- m_tabBar->insertTab(new QTab(i18n("Todo")),3);
- m_tabBar->insertTab(new QTab(i18n("Filtered")),4);
+ m_tabBar = new TQTabBar(this);
+ m_tabBar->insertTab(new TQTab(i18n("Current")),0);
+ m_tabBar->insertTab(new TQTab(i18n("Errors")),1);
+ m_tabBar->insertTab(new TQTab(i18n("Fixme")),2);
+ m_tabBar->insertTab(new TQTab(i18n("Todo")),3);
+ m_tabBar->insertTab(new TQTab(i18n("Filtered")),4);
m_tabBar->setTabEnabled(0,false);
m_tabBar->setTabEnabled(4,false);
@@ -129,19 +129,19 @@ PHPErrorView::PHPErrorView( PHPSupportPart* part, QWidget* parent, const char* n
m_filterEdit = new KLineEdit(this);
- QLabel* m_filterLabel = new QLabel(i18n("Lookup:"),this);
+ TQLabel* m_filterLabel = new TQLabel(i18n("Lookup:"),this);
m_gridLayout->addWidget(m_tabBar,0,0);
m_gridLayout->addMultiCellWidget(m_widgetStack,1,1,0,2);
m_gridLayout->addWidget(m_filterLabel,0,1,Qt::AlignRight);
m_gridLayout->addWidget(m_filterEdit,0,2,Qt::AlignLeft);
- connect( m_filterEdit, SIGNAL(returnPressed()), this, SLOT(slotFilter()) );
- connect( m_filterEdit, SIGNAL(textChanged( const QString & )), this, SLOT(slotFilter()) );
- connect( m_tabBar, SIGNAL(selected(int)), this, SLOT(slotTabSelected(int)) );
- connect( part->partController(), SIGNAL(activePartChanged(KParts::Part*)), this, SLOT(slotActivePartChanged(KParts::Part*)) );
- connect( part->partController(), SIGNAL(partAdded(KParts::Part*)), this, SLOT(slotPartAdded(KParts::Part*)) );
- connect( part->partController(), SIGNAL(partRemoved(KParts::Part*)), this, SLOT(slotPartRemoved(KParts::Part*)) );
+ connect( m_filterEdit, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotFilter()) );
+ connect( m_filterEdit, TQT_SIGNAL(textChanged( const TQString & )), this, TQT_SLOT(slotFilter()) );
+ connect( m_tabBar, TQT_SIGNAL(selected(int)), this, TQT_SLOT(slotTabSelected(int)) );
+ connect( part->partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SLOT(slotActivePartChanged(KParts::Part*)) );
+ connect( part->partController(), TQT_SIGNAL(partAdded(KParts::Part*)), this, TQT_SLOT(slotPartAdded(KParts::Part*)) );
+ connect( part->partController(), TQT_SIGNAL(partRemoved(KParts::Part*)), this, TQT_SLOT(slotPartRemoved(KParts::Part*)) );
slotActivePartChanged( part->partController()->activePart() );
}
@@ -162,9 +162,9 @@ void PHPErrorView::slotFilter()
}
-void PHPErrorView::filterList(KListView* listview, const QString& level)
+void PHPErrorView::filterList(KListView* listview, const TQString& level)
{
- QListViewItemIterator it( listview );
+ TQListViewItemIterator it( listview );
while ( it.current() ) {
if ( it.current()->text(3).contains(m_filterEdit->text(),false))
new KListViewItem(m_filteredList,level,
@@ -186,11 +186,11 @@ void PHPErrorView::InitListView(KListView* listview)
listview->addColumn( i18n("Problem") );
listview->setAllColumnsShowFocus( TRUE );
- connect( listview, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotSelected(QListViewItem*)) );
+ connect( listview, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotSelected(TQListViewItem*)) );
- connect( listview, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(slotSelected(QListViewItem* )) );
+ connect( listview, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(slotSelected(TQListViewItem* )) );
}
@@ -223,11 +223,11 @@ void PHPErrorView::slotActivePartChanged( KParts::Part* part )
m_markIface = dynamic_cast<KTextEditor::MarkInterface*>( part );
}
-void PHPErrorView::removeAllItems( QListView* listview, const QString& filename )
+void PHPErrorView::removeAllItems( TQListView* listview, const TQString& filename )
{
- QListViewItem* current = listview->firstChild();
+ TQListViewItem* current = listview->firstChild();
while( current ){
- QListViewItem* i = current;
+ TQListViewItem* i = current;
current = current->nextSibling();
if( i->text(0) == filename )
@@ -235,9 +235,9 @@ void PHPErrorView::removeAllItems( QListView* listview, const QString& filename
}
}
-void PHPErrorView::removeAllProblems( const QString& filename )
+void PHPErrorView::removeAllProblems( const TQString& filename )
{
- QString relFileName = filename;
+ TQString relFileName = filename;
relFileName.remove(m_phpSupport->project()->projectDirectory());
kdDebug(9008) << "PHPErrorView::removeAllProblems()" << relFileName << endl;
@@ -250,8 +250,8 @@ void PHPErrorView::removeAllProblems( const QString& filename )
removeAllItems(m_todoList,relFileName);
if ( m_document && m_markIface ) {
- QPtrList<KTextEditor::Mark> marks = m_markIface->marks();
- QPtrListIterator<KTextEditor::Mark> it( marks );
+ TQPtrList<KTextEditor::Mark> marks = m_markIface->marks();
+ TQPtrListIterator<KTextEditor::Mark> it( marks );
while( it.current() ) {
m_markIface->removeMark( it.current()->line, KTextEditor::MarkInterface::markType07 );
++it;
@@ -263,7 +263,7 @@ void PHPErrorView::initCurrentList()
{
m_tabBar->setTabEnabled(0,true);
- QString relFileName = m_fileName;
+ TQString relFileName = m_fileName;
if (m_phpSupport->project())
relFileName.remove(m_phpSupport->project()->projectDirectory());
@@ -275,17 +275,17 @@ void PHPErrorView::initCurrentList()
updateCurrentWith(m_todoList,i18n("Todo"),relFileName);
}
-void PHPErrorView::updateCurrentWith(QListView* listview, const QString& level, const QString& filename)
+void PHPErrorView::updateCurrentWith(TQListView* listview, const TQString& level, const TQString& filename)
{
- QListViewItemIterator it(listview);
+ TQListViewItemIterator it(listview);
while ( it.current() ) {
if ( it.current()->text(0) == filename)
- new QListViewItem(m_currentList,level,it.current()->text(1),it.current()->text(2),it.current()->text(3));
+ new TQListViewItem(m_currentList,level,it.current()->text(1),it.current()->text(2),it.current()->text(3));
++it;
}
}
-void PHPErrorView::slotSelected( QListViewItem* item )
+void PHPErrorView::slotSelected( TQListViewItem* item )
{
bool is_filtered = false;
bool is_current = false;
@@ -300,17 +300,17 @@ void PHPErrorView::slotSelected( QListViewItem* item )
m_phpSupport->partController()->editDocument( url, line-1 );
}
-void PHPErrorView::reportProblem( int level, const QString& fileName, int line, const QString& text)
+void PHPErrorView::reportProblem( int level, const TQString& fileName, int line, const TQString& text)
{
int markType = levelToMarkType( level );
if ( markType != -1 && m_document && m_markIface && m_fileName == fileName ) {
m_markIface->addMark( line, markType );
}
- QString msg = text;
- msg = msg.replace( QRegExp("\n"), "" );
+ TQString msg = text;
+ msg = msg.replace( TQRegExp("\n"), "" );
- QString relFileName = fileName;
+ TQString relFileName = fileName;
relFileName.remove(m_phpSupport->project()->projectDirectory());
KListView* list;
@@ -342,11 +342,11 @@ void PHPErrorView::reportProblem( int level, const QString& fileName, int line,
if (list) {
kdDebug(9018) << "PB " << msg << endl;
- new ProblemItem( list, relFileName, QString::number( line + 1 ), 0, msg );
+ new ProblemItem( list, relFileName, TQString::number( line + 1 ), 0, msg );
}
if (fileName == m_fileName)
- new QListViewItem(m_currentList, levelToString( level ), QString::number( line + 1 ), 0, msg);
+ new TQListViewItem(m_currentList, levelToString( level ), TQString::number( line + 1 ), 0, msg);
}
void PHPErrorView::slotPartAdded( KParts::Part* part )
@@ -367,30 +367,30 @@ void PHPErrorView::slotPartRemoved( KParts::Part* part )
}
}
-QString PHPErrorView::levelToString( int level ) const
+TQString PHPErrorView::levelToString( int level ) const
{
switch( level )
{
case ErrorNoSuchFunction:
- return QString( i18n("Undefined function") );
+ return TQString( i18n("Undefined function") );
case ErrorParse:
- return QString( i18n("Parse Error") );
+ return TQString( i18n("Parse Error") );
case Error:
- return QString( i18n("Error") );
+ return TQString( i18n("Error") );
case Warning:
- return QString( i18n("Warning") );
+ return TQString( i18n("Warning") );
case Todo:
- return QString( i18n("Todo") );
+ return TQString( i18n("Todo") );
case Fixme:
- return QString( i18n("Fixme") );
+ return TQString( i18n("Fixme") );
default:
- return QString::null;
+ return TQString::null;
}
}
diff --git a/languages/php/phperrorview.h b/languages/php/phperrorview.h
index bc8b0df5..aaf3f9f3 100644
--- a/languages/php/phperrorview.h
+++ b/languages/php/phperrorview.h
@@ -22,7 +22,7 @@
#include <klistview.h>
#include <klineedit.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include "phpfile.h"
class PHPSupportPart;
@@ -54,36 +54,36 @@ enum Errors
Fixme = 5
};
-class PHPErrorView: public QWidget {
+class PHPErrorView: public TQWidget {
Q_OBJECT
public:
- PHPErrorView( PHPSupportPart* part, QWidget* parent=0, const char* name=0 );
+ PHPErrorView( PHPSupportPart* part, TQWidget* parent=0, const char* name=0 );
virtual ~PHPErrorView();
- void removeAllProblems( const QString& filename );
- void reportProblem( int level, const QString& fileName, int line, const QString& text);
+ void removeAllProblems( const TQString& filename );
+ void reportProblem( int level, const TQString& fileName, int line, const TQString& text);
private slots:
void slotPartAdded( KParts::Part* );
void slotPartRemoved( KParts::Part* );
void slotActivePartChanged( KParts::Part* );
- void slotSelected( QListViewItem* );
+ void slotSelected( TQListViewItem* );
void slotTabSelected( int tabindex );
void slotFilter();
private:
- QString levelToString( int level ) const;
+ TQString levelToString( int level ) const;
int levelToMarkType( int level ) const;
void InitListView(KListView* listview);
- void removeAllItems( QListView* listview, const QString& filename );
- void filterList(KListView* listview, const QString& level);
- void updateCurrentWith(QListView* listview, const QString& level, const QString& filename);
+ void removeAllItems( TQListView* listview, const TQString& filename );
+ void filterList(KListView* listview, const TQString& level);
+ void updateCurrentWith(TQListView* listview, const TQString& level, const TQString& filename);
void initCurrentList();
private:
- QGridLayout* m_gridLayout;
- QTabBar* m_tabBar;
- QWidgetStack* m_widgetStack;
+ TQGridLayout* m_gridLayout;
+ TQTabBar* m_tabBar;
+ TQWidgetStack* m_widgetStack;
KListView* m_currentList;
KListView* m_errorList;
KListView* m_fixmeList;
@@ -93,10 +93,10 @@ private:
KLineEdit* m_filterEdit;
PHPSupportPart* m_phpSupport;
- QGuardedPtr<KTextEditor::Document> m_document;
+ TQGuardedPtr<KTextEditor::Document> m_document;
KTextEditor::MarkInterface* m_markIface;
- QTimer* m_timer;
- QString m_fileName;
+ TQTimer* m_timer;
+ TQString m_fileName;
int m_active;
int m_delay;
};
diff --git a/languages/php/phpfile.cpp b/languages/php/phpfile.cpp
index afd741bd..d54028da 100644
--- a/languages/php/phpfile.cpp
+++ b/languages/php/phpfile.cpp
@@ -17,9 +17,9 @@
*/
#include <kapplication.h>
-#include <qstring.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqstring.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include <urlutil.h>
#include <kprocess.h>
@@ -34,9 +34,9 @@
using namespace std;
-PHPFile::PHPFile(PHPSupportPart *phpSupport, const QString& fileName)
+PHPFile::PHPFile(PHPSupportPart *phpSupport, const TQString& fileName)
{
- m_fileinfo = new QFileInfo(fileName);
+ m_fileinfo = new TQFileInfo(fileName);
m_part = phpSupport;
modified = true;
inClass = FALSE;
@@ -44,9 +44,9 @@ PHPFile::PHPFile(PHPSupportPart *phpSupport, const QString& fileName)
/*
phpCheckProc = new KShellProcess("/bin/sh");
- connect(phpCheckProc, SIGNAL(receivedStdout (KProcess*, char*, int)), this, SLOT(slotReceivedPHPCheckStdout (KProcess*, char*, int)));
- connect(phpCheckProc, SIGNAL(receivedStderr (KProcess*, char*, int)), this, SLOT(slotReceivedPHPCheckStderr (KProcess*, char*, int)));
- connect(phpCheckProc, SIGNAL(processExited(KProcess*)), this, SLOT(slotPHPCheckExited(KProcess*)));
+ connect(phpCheckProc, TQT_SIGNAL(receivedStdout (KProcess*, char*, int)), this, TQT_SLOT(slotReceivedPHPCheckStdout (KProcess*, char*, int)));
+ connect(phpCheckProc, TQT_SIGNAL(receivedStderr (KProcess*, char*, int)), this, TQT_SLOT(slotReceivedPHPCheckStderr (KProcess*, char*, int)));
+ connect(phpCheckProc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotPHPCheckExited(KProcess*)));
*/
}
@@ -58,22 +58,22 @@ PHPFile::~PHPFile()
// delete phpCheckProc;
}
-QStringList PHPFile::getContents()
+TQStringList PHPFile::getContents()
{
return m_contents;
}
-QString PHPFile::fileName() {
+TQString PHPFile::fileName() {
return m_fileinfo->filePath();
}
-QStringList PHPFile::readFromEditor()
+TQStringList PHPFile::readFromEditor()
{
- QStringList contents;
+ TQStringList contents;
kapp->lock();
- QPtrList<KParts::Part> parts( *m_part->partController()->parts() );
- QPtrListIterator<KParts::Part> it( parts );
+ TQPtrList<KParts::Part> parts( *m_part->partController()->parts() );
+ TQPtrListIterator<KParts::Part> it( parts );
while( it.current() ){
KTextEditor::Document* doc = dynamic_cast<KTextEditor::Document*>( it.current() );
++it;
@@ -82,7 +82,7 @@ QStringList PHPFile::readFromEditor()
if ( !doc || !editIface || doc->url().path() != fileName() )
continue;
- contents = QStringList::split("\n", editIface->text().ascii(), true);
+ contents = TQStringList::split("\n", editIface->text().ascii(), true);
break;
}
kapp->unlock();
@@ -90,15 +90,15 @@ QStringList PHPFile::readFromEditor()
return contents;
}
-QStringList PHPFile::readFromDisk()
+TQStringList PHPFile::readFromDisk()
{
- QStringList contents;
- QFile f( fileName() );
+ TQStringList contents;
+ TQFile f( fileName() );
if (f.open(IO_ReadOnly)) {
- QTextStream stream( &f );
- QStringList list;
- QString rawline;
+ TQTextStream stream( &f );
+ TQStringList list;
+ TQString rawline;
while (!stream.eof()) {
rawline = stream.readLine();
contents.append(rawline.stripWhiteSpace().local8Bit());
@@ -137,11 +137,11 @@ void PHPFile::Analyse() {
postEvent( new FileParseEvent( Event_EndParse, this->fileName() ) );
}
-bool PHPFile::ParseClass(QString line, int lineNo) {
+bool PHPFile::ParseClass(TQString line, int lineNo) {
if (line.find("class ", 0, FALSE) == -1)
return FALSE;
- QRegExp 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]*))?.*$");
+ 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);
if (Class.search(line) != -1) {
@@ -158,11 +158,11 @@ bool PHPFile::ParseClass(QString line, int lineNo) {
return FALSE;
}
-bool PHPFile::ParseFunction(QString line, int lineNo) {
+bool PHPFile::ParseFunction(TQString line, int lineNo) {
if (line.find("function", 0, FALSE) == -1)
return FALSE;
- QRegExp 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-=]*)\\).*$");
+ 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);
if (function.search(line) != -1) {
@@ -197,11 +197,11 @@ bool PHPFile::ParseFunction(QString line, int lineNo) {
return FALSE;
}
-bool PHPFile::ParseVariable(QString 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)
return FALSE;
- QRegExp variable("^[ \t]*(var|public|private|protected|static)[ \t]*\\$([a-zA-Z_\x7f-\xff][0-9A-Za-z_\x7f-\xff]*)[ \t;=].*$");
+ TQRegExp variable("^[ \t]*(var|public|private|protected|static)[ \t]*\\$([a-zA-Z_\x7f-\xff][0-9A-Za-z_\x7f-\xff]*)[ \t;=].*$");
variable.setCaseSensitive(FALSE);
if (variable.search(line) != -1) {
@@ -226,11 +226,11 @@ bool PHPFile::ParseVariable(QString line, int lineNo) {
return FALSE;
}
-bool PHPFile::ParseThisMember(QString line, int lineNo) {
+bool PHPFile::ParseThisMember(TQString line, int lineNo) {
if (line.find("$this->", 0, FALSE) == -1)
return FALSE;
- QRegExp createthis;
+ TQRegExp createthis;
createthis.setCaseSensitive(FALSE);
createthis.setPattern("\\$this->([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*([0-9]*)[ \t]*;");
@@ -270,13 +270,13 @@ bool PHPFile::ParseThisMember(QString line, int lineNo) {
return FALSE;
}
-bool PHPFile::ParseMember(QString line, int lineNo) {
+bool PHPFile::ParseMember(TQString line, int lineNo) {
if (line.find("$", 0, FALSE) == -1)
return FALSE;
/// @todo Ajouter plus de test ....
- QRegExp createmember;
+ TQRegExp createmember;
createmember.setCaseSensitive(FALSE);
createmember.setPattern("\\$([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[ \t]*=[ \t]*([0-9]*)[ \t]*;");
@@ -323,18 +323,18 @@ bool PHPFile::ParseMember(QString line, int lineNo) {
return FALSE;
}
-bool PHPFile::ParseReturn(QString line, int lineNo) {
- QString rettype;
+bool PHPFile::ParseReturn(TQString line, int lineNo) {
+ TQString rettype;
if (line.find("return", 0, FALSE) == -1)
return FALSE;
- QRegExp typeex;
+ TQRegExp typeex;
typeex.setCaseSensitive(FALSE);
typeex.setPattern("return[ \t]*(\\(|)([a-zA-Z_\x7f-\xff$][a-zA-Z0-9_\x7f-\xff]*)(\\)|)[ \t]*;");
if (typeex.search(line) != -1) {
- QString varname = typeex.cap(2).ascii();
+ TQString varname = typeex.cap(2).ascii();
rettype = varname;
if (varname.find("$") == 0) {
@@ -342,7 +342,7 @@ bool PHPFile::ParseReturn(QString line, int lineNo) {
/*
varname = varname.mid(1);
- QValueList<Action *>::ConstIterator it = m_vars.begin();
+ TQValueList<Action *>::ConstIterator it = m_vars.begin();
while ( it != m_vars.end() ) {
Action *p = *it++;
@@ -365,11 +365,11 @@ bool PHPFile::ParseReturn(QString line, int lineNo) {
return TRUE;
}
-bool PHPFile::ParseTodo(QString line, int lineNo) {
+bool PHPFile::ParseTodo(TQString line, int lineNo) {
if (line.find("todo", 0, FALSE) == -1)
return FALSE;
- QRegExp todo("/[/]+[ \t]*[@]*todo([ \t]*:[ \t]*|[ \t]*)[ \t]*(.*)$");
+ TQRegExp todo("/[/]+[ \t]*[@]*todo([ \t]*:[ \t]*|[ \t]*)[ \t]*(.*)$");
todo.setCaseSensitive(FALSE);
if (todo.search(line) != -1) {
@@ -380,11 +380,11 @@ bool PHPFile::ParseTodo(QString line, int lineNo) {
return FALSE;
}
-bool PHPFile::ParseFixme(QString line, int lineNo) {
+bool PHPFile::ParseFixme(TQString line, int lineNo) {
if (line.find("fixme", 0, FALSE) == -1)
return FALSE;
- QRegExp fixme("/[/]+[ \t]*[@]*fixme([ \t]*:[ \t]*|[ \t]*)[ \t]*(.*)$");
+ TQRegExp fixme("/[/]+[ \t]*[@]*fixme([ \t]*:[ \t]*|[ \t]*)[ \t]*(.*)$");
fixme.setCaseSensitive(FALSE);
if (fixme.search(line) != -1) {
@@ -396,34 +396,34 @@ bool PHPFile::ParseFixme(QString line, int lineNo) {
}
void PHPFile::ParseSource() {
- QString line;
+ TQString line;
int lineNo = 0;
int bracketOpen = 0;
int bracketClose = 0;
int bracketFuncOpen = 0;
int bracketFuncClose = 0;
- QRegExp includere("^[ \t]*(include|require|include_once|require_once)[ \t]*(\\(|)[ \t]*[\"'](.*)[\"'][ \t]*(\\)|)[ \t]*;$");
+ TQRegExp includere("^[ \t]*(include|require|include_once|require_once)[ \t]*(\\(|)[ \t]*[\"'](.*)[\"'][ \t]*(\\)|)[ \t]*;$");
includere.setCaseSensitive(FALSE);
- for ( QStringList::Iterator it = m_contents.begin(); it != m_contents.end(); ++it ) {
+ 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 (includere.search(line) != -1) {
- QStringList include_path;
+ TQStringList include_path;
include_path = include_path.split(":", m_part->getIncludePath());
include_path.append(URLUtil::directory(fileName()) + "/");
include_path.append("");
- QStringList list = includere.capturedTexts();
+ TQStringList list = includere.capturedTexts();
- for ( QStringList::Iterator it = include_path.begin(); it != include_path.end(); ++it ) {
- QString abso = URLUtil::canonicalPath(*it + "/" + list[3]);
+ for ( TQStringList::Iterator it = include_path.begin(); it != include_path.end(); ++it ) {
+ TQString abso = URLUtil::canonicalPath(*it + "/" + list[3]);
if (!abso.isNull()) {
- QString rel = URLUtil::relativePathToFile (m_part->project()->projectDirectory(), abso);
+ TQString rel = URLUtil::relativePathToFile (m_part->project()->projectDirectory(), abso);
postEvent( new FileParseEvent( Event_AddFile, abso ) );
}
}
@@ -492,7 +492,7 @@ void PHPFile::PHPCheck() {
/*
char buf[255];
- FILE *fd = popen(QString(m_phpSupport->getExePath() + " -l -f " + KShellProcess::quote(fileName())).ascii(), "r");
+ FILE *fd = popen(TQString(m_phpSupport->getExePath() + " -l -f " + KShellProcess::quote(fileName())).ascii(), "r");
while (!feof(fd)) {
memset(buf, 0, 255);
fgets(buf, 255, fd);
@@ -507,12 +507,12 @@ void PHPFile::PHPCheck() {
/*
void PHPFile::slotReceivedPHPCheckStdout (KProcess* proc, char* buffer, int buflen) {
kdDebug(9018) << "slotPHPExeStdout()" << endl;
- m_phpCheckOutput += QString::fromLocal8Bit(buffer,buflen+1);
+ m_phpCheckOutput += TQString::fromLocal8Bit(buffer,buflen+1);
}
void PHPFile::slotReceivedPHPCheckStderr (KProcess* proc, char* buffer, int buflen) {
kdDebug(9018) << "slotPHPExeStderr()" << endl;
- m_phpCheckOutput += QString::fromLocal8Bit(buffer,buflen+1);
+ m_phpCheckOutput += TQString::fromLocal8Bit(buffer,buflen+1);
}
void PHPFile::slotPHPCheckExited (KProcess* proc) {
@@ -520,15 +520,15 @@ void PHPFile::slotPHPCheckExited (KProcess* proc) {
}
*/
-void PHPFile::ParseStdout(QString phpOutput) {
+void PHPFile::ParseStdout(TQString phpOutput) {
kdDebug(9018) << "ParseStdout()" << endl;
- QRegExp parseError("^(<b>|)Parse error(</b>|): parse error, (.*) in (<b>|)(.*)(</b>|) on line (<b>|)(.*)(</b>|).*$");
- QRegExp undefFunctionError("^(<b>|)Fatal error(</b>|): Call to undefined function: (.*) in (<b>|)(.*)(</b>|) on line (<b>|)(.*)(</b>|).*$");
- QRegExp warning("^(<b>|)Warning(</b>|): (<b>|)(.*)(</b>|) in (.*) on line (<b>|)(.*)(</b>|).*$");
- QRegExp generalFatalError("^(<b>|)Fatal error(</b>|): (.*) in (<b>|)(.*)(</b>|) on line (<b>|)(.*)(</b>|).*$");
+ TQRegExp parseError("^(<b>|)Parse error(</b>|): parse error, (.*) in (<b>|)(.*)(</b>|) on line (<b>|)(.*)(</b>|).*$");
+ TQRegExp undefFunctionError("^(<b>|)Fatal error(</b>|): Call to undefined function: (.*) in (<b>|)(.*)(</b>|) on line (<b>|)(.*)(</b>|).*$");
+ TQRegExp warning("^(<b>|)Warning(</b>|): (<b>|)(.*)(</b>|) in (.*) on line (<b>|)(.*)(</b>|).*$");
+ TQRegExp generalFatalError("^(<b>|)Fatal error(</b>|): (.*) in (<b>|)(.*)(</b>|) on line (<b>|)(.*)(</b>|).*$");
- QStringList list = QStringList::split("\n", phpOutput);
- QStringList::Iterator it;
+ TQStringList list = TQStringList::split("\n", phpOutput);
+ TQStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
if (generalFatalError.search(*it) >= 0) {
// m_errorview->reportProblem(Error, parseError.cap(5), parseError.cap(8).toInt(), parseError.cap(3));
@@ -546,9 +546,9 @@ void PHPFile::ParseStdout(QString phpOutput) {
}
/*
-ClassDom PHPFile::classByName(QString filename, QString classname) {
- QValueList<ClassDom> CList;
- QString abso = URLUtil::canonicalPath(filename);
+ClassDom PHPFile::classByName(TQString filename, TQString classname) {
+ TQValueList<ClassDom> CList;
+ TQString abso = URLUtil::canonicalPath(filename);
ClassList classList = m_model->globalNamespace()->classList();
ClassList::Iterator classIt;
@@ -560,8 +560,8 @@ ClassDom PHPFile::classByName(QString filename, QString classname) {
return NULL;
}
-QValueList<ClassDom> PHPFile::classByName(QString classname) {
- QValueList<ClassDom> CList;
+TQValueList<ClassDom> PHPFile::classByName(TQString classname) {
+ TQValueList<ClassDom> CList;
ClassList classList = m_model->globalNamespace()->classList();
@@ -580,13 +580,13 @@ void PHPFile::postEvent(FileParseEvent *event) {
usleep(100);
}
-bool PHPFile::AddClass(QString name, QString extends, int start) {
+bool PHPFile::AddClass(TQString name, TQString extends, int start) {
postEvent( new FileParseEvent( Event_AddClass, this->fileName(), name, extends, start ) );
inClass = TRUE;
return TRUE;
}
-bool PHPFile::SetClass(QString arguments) {
+bool PHPFile::SetClass(TQString arguments) {
postEvent( new FileParseEvent( Event_SetClass, this->fileName(), "", arguments ) );
return TRUE;
}
@@ -597,13 +597,13 @@ bool PHPFile::CloseClass(int end) {
return TRUE;
}
-bool PHPFile::AddFunction(QString name, QString arguments, int start) {
+bool PHPFile::AddFunction(TQString name, TQString arguments, int start) {
postEvent( new FileParseEvent( Event_AddFunction, this->fileName(), name, arguments, start ) );
inMethod = TRUE;
return TRUE;
}
-bool PHPFile::SetFunction(QString name, QString arguments) {
+bool PHPFile::SetFunction(TQString name, TQString arguments) {
postEvent( new FileParseEvent( Event_SetFunction, this->fileName(), name, arguments ) );
return TRUE;
}
@@ -614,23 +614,23 @@ bool PHPFile::CloseFunction(int end) {
return TRUE;
}
-bool PHPFile::AddVariable(QString name, QString type, int position, bool classvar) {
+bool PHPFile::AddVariable(TQString name, TQString type, int position, bool classvar) {
postEvent( new FileParseEvent( Event_AddVariable, this->fileName(), name, type, position, classvar ) );
return TRUE;
}
-bool PHPFile::SetVariable(QString arguments) {
+bool PHPFile::SetVariable(TQString arguments) {
postEvent( new FileParseEvent( Event_SetVariable, this->fileName(), "", arguments ) );
return TRUE;
}
-bool PHPFile::AddTodo(QString arguments, int position) {
+bool PHPFile::AddTodo(TQString arguments, int position) {
postEvent( new FileParseEvent( Event_AddTodo, this->fileName(), "", arguments, position ) );
inClass = TRUE;
return TRUE;
}
-bool PHPFile::AddFixme(QString arguments, int position) {
+bool PHPFile::AddFixme(TQString arguments, int position) {
postEvent( new FileParseEvent( Event_AddFixme, this->fileName(), "", arguments, position ) );
inClass = TRUE;
return TRUE;
diff --git a/languages/php/phpfile.h b/languages/php/phpfile.h
index cb1573f3..b8aad71b 100644
--- a/languages/php/phpfile.h
+++ b/languages/php/phpfile.h
@@ -20,11 +20,11 @@
#define PHPFILE_H
#include <kapplication.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qthread.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqthread.h>
#include <urlutil.h>
#include <kprocess.h>
@@ -45,23 +45,23 @@
/**
@author Escuder Nicolas
*/
-class PHPFile : public QObject {
+class PHPFile : public TQObject {
Q_OBJECT
public:
- PHPFile(PHPSupportPart *phpSupport, const QString& fileName);
+ PHPFile(PHPSupportPart *phpSupport, const TQString& fileName);
~PHPFile();
- QStringList getContents();
+ TQStringList getContents();
bool isModified();
void setModified(bool value);
- QString fileName();
+ TQString fileName();
void Analyse();
- void ParseStdout(QString phpOutput);
+ void ParseStdout(TQString phpOutput);
/*
- ClassDom classByName(QString filename, QString classname);
- QValueList<ClassDom> classByName(QString classname);
+ ClassDom classByName(TQString filename, TQString classname);
+ TQValueList<ClassDom> classByName(TQString classname);
*/
/*
@@ -71,37 +71,37 @@ private slots:
void slotPHPCheckExited (KProcess* proc);
*/
private:
- QStringList readFromEditor();
- QStringList readFromDisk();
+ TQStringList readFromEditor();
+ TQStringList readFromDisk();
- bool ParseClass(QString line, int lineNo);
- bool ParseFunction(QString line, int lineNo);
- bool ParseVariable(QString line, int lineNo);
+ bool ParseClass(TQString line, int lineNo);
+ bool ParseFunction(TQString line, int lineNo);
+ bool ParseVariable(TQString line, int lineNo);
- bool ParseThisMember(QString line, int lineNo);
- bool ParseMember(QString line, int lineNo);
- bool ParseReturn(QString line, int lineNo);
- bool ParseTodo(QString line, int lineNo);
- bool ParseFixme(QString line, int lineNo);
+ bool ParseThisMember(TQString line, int lineNo);
+ bool ParseMember(TQString line, int lineNo);
+ bool ParseReturn(TQString line, int lineNo);
+ bool ParseTodo(TQString line, int lineNo);
+ bool ParseFixme(TQString line, int lineNo);
void ParseSource();
void PHPCheck();
void postEvent(FileParseEvent *event);
- bool AddClass(QString name, QString extends, int start);
- bool SetClass(QString arguments);
+ bool AddClass(TQString name, TQString extends, int start);
+ bool SetClass(TQString arguments);
bool CloseClass(int end);
- bool AddFunction(QString name, QString arguments, int start);
- bool SetFunction(QString name, QString arguments = "");
+ bool AddFunction(TQString name, TQString arguments, int start);
+ bool SetFunction(TQString name, TQString arguments = "");
bool CloseFunction(int end);
- bool AddVariable(QString name, QString type, int position, bool classvar = FALSE);
- bool SetVariable(QString arguments);
+ bool AddVariable(TQString name, TQString type, int position, bool classvar = FALSE);
+ bool SetVariable(TQString arguments);
- bool AddTodo(QString arguments, int position);
- bool AddFixme(QString arguments, int position);
+ bool AddTodo(TQString arguments, int position);
+ bool AddFixme(TQString arguments, int position);
PHPSupportPart *m_part;
@@ -110,9 +110,9 @@ private:
bool inClass;
bool inMethod;
- QFileInfo* m_fileinfo;
- QStringList m_contents;
- QString m_phpCheckOutput;
+ TQFileInfo* m_fileinfo;
+ TQStringList m_contents;
+ TQString m_phpCheckOutput;
// KShellProcess* phpCheckProc;
};
diff --git a/languages/php/phpnewclassdlg.cpp b/languages/php/phpnewclassdlg.cpp
index f17034db..282e6c01 100644
--- a/languages/php/phpnewclassdlg.cpp
+++ b/languages/php/phpnewclassdlg.cpp
@@ -19,10 +19,10 @@
#include <klineedit.h>
#include <kcompletion.h>
#include <kfiledialog.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <iostream>
-#include <qregexp.h>
-#include <qtextedit.h>
+#include <tqregexp.h>
+#include <tqtextedit.h>
#include <kglobal.h>
#include <kstandarddirs.h>
#include <kinstance.h>
@@ -30,17 +30,17 @@
using namespace std;
-PHPNewClassDlg::PHPNewClassDlg(const QStringList& baseClassNames,const QString& directory,QWidget *parent, const char *name) : PHPNewClassDlgBase(parent,name,true) {
+PHPNewClassDlg::PHPNewClassDlg(const TQStringList& baseClassNames,const TQString& directory,TQWidget *parent, const char *name) : PHPNewClassDlgBase(parent,name,true) {
m_filenameModified = false;
KCompletion *comp = new KCompletion();
comp->setItems(baseClassNames);
m_dirEdit->setText(directory);
// load the class template if available
- QString templateFile = KGlobal::instance()->dirs()->findResource("data","kdevphpsupport/newclasstemplate.txt");
+ TQString templateFile = KGlobal::instance()->dirs()->findResource("data","kdevphpsupport/newclasstemplate.txt");
if(!templateFile.isNull()){
- QFile file(templateFile);
- QTextStream stream(&file);
+ TQFile file(templateFile);
+ TQTextStream stream(&file);
if(file.open(IO_ReadOnly)){
m_classTemplate->setText(stream.read());
file.close();
@@ -49,30 +49,30 @@ PHPNewClassDlg::PHPNewClassDlg(const QStringList& baseClassNames,const QString&
m_baseClassEdit->setCompletionObject( comp ); /// @todo change it to KLineEdit
- connect(m_baseClassEdit,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&)));
- connect(m_classNameEdit,SIGNAL(textChanged(const QString&)),
- this,SLOT(classNameTextChanged(const QString&)));
- connect(m_fileNameEdit,SIGNAL(textChanged(const QString&)),
- this,SLOT(fileNameTextChanged(const QString&)));
- connect(m_dirButton,SIGNAL(clicked()),
- this,SLOT(slotDirButtonClicked()));
+ connect(m_baseClassEdit,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&)));
+ connect(m_classNameEdit,TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(classNameTextChanged(const TQString&)));
+ connect(m_fileNameEdit,TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(fileNameTextChanged(const TQString&)));
+ connect(m_dirButton,TQT_SIGNAL(clicked()),
+ this,TQT_SLOT(slotDirButtonClicked()));
}
PHPNewClassDlg::~PHPNewClassDlg(){
}
void PHPNewClassDlg::slotDirButtonClicked(){
- QString dir = KFileDialog::getExistingDirectory(m_dirEdit->text(),this);
+ TQString dir = KFileDialog::getExistingDirectory(m_dirEdit->text(),this);
if(!dir.isEmpty()){
m_dirEdit->setText(dir);
}
}
-void PHPNewClassDlg::classNameTextChanged(const QString& str){
+void PHPNewClassDlg::classNameTextChanged(const TQString& str){
if(!m_filenameModified){
m_fileNameEdit->setText(str.lower() + ".inc");
}
}
-void PHPNewClassDlg::fileNameTextChanged(const QString&){
+void PHPNewClassDlg::fileNameTextChanged(const TQString&){
if(m_fileNameEdit->hasFocus()){
m_filenameModified = true;
}
@@ -80,22 +80,22 @@ void PHPNewClassDlg::fileNameTextChanged(const QString&){
void PHPNewClassDlg::accept(){
PHPNewClassDlgBase::accept(); // hide the dialog
- QString text = m_classTemplate->text();
- QString classDir = m_dirEdit->text();
+ TQString text = m_classTemplate->text();
+ TQString classDir = m_dirEdit->text();
if(!classDir.endsWith("/")) classDir += "/"; // append /
- QString absFileName = classDir + m_fileNameEdit->text();
+ TQString absFileName = classDir + m_fileNameEdit->text();
// save the template for the next time
- QString templateDir = KGlobal::instance()->dirs()->saveLocation("data") + "/kdevphpsupport/";
- QString templateFile = templateDir + "newclasstemplate.txt";
- QDir dir(templateDir);
+ TQString templateDir = KGlobal::instance()->dirs()->saveLocation("data") + "/kdevphpsupport/";
+ TQString templateFile = templateDir + "newclasstemplate.txt";
+ TQDir dir(templateDir);
if(!dir.exists()){
if(!dir.mkdir(templateDir)){
kdWarning() << "Error on creating directory for the classtemplate" << templateDir << endl;
}
}
- QFile file(templateFile);
- QTextStream stream(&file);
+ TQFile file(templateFile);
+ TQTextStream stream(&file);
if(file.open(IO_WriteOnly)){
stream << text; // write
@@ -104,14 +104,14 @@ void PHPNewClassDlg::accept(){
// generate the sourcecode for the class
if(m_baseClassEdit->text().isEmpty()){
- text = text.replace(QRegExp("extends BASECLASS"),"");
- text = text.replace(QRegExp("BASECLASS\\:\\:BASECLASS\\(\\);"),"");
+ text = text.replace(TQRegExp("extends BASECLASS"),"");
+ text = text.replace(TQRegExp("BASECLASS\\:\\:BASECLASS\\(\\);"),"");
}else{
- text = text.replace(QRegExp("BASECLASS"),m_baseClassEdit->text());
+ text = text.replace(TQRegExp("BASECLASS"),m_baseClassEdit->text());
}
- text = text.replace(QRegExp("CLASSNAME"),m_classNameEdit->text());
- text = text.replace(QRegExp("FILENAME"),m_fileNameEdit->text().upper());
- text = text.replace(QRegExp("AUTHOR"),"not implemented");
+ text = text.replace(TQRegExp("CLASSNAME"),m_classNameEdit->text());
+ text = text.replace(TQRegExp("FILENAME"),m_fileNameEdit->text().upper());
+ text = text.replace(TQRegExp("AUTHOR"),"not implemented");
file.setName(absFileName);
if(file.open(IO_WriteOnly)){
diff --git a/languages/php/phpnewclassdlg.h b/languages/php/phpnewclassdlg.h
index d94bfffb..14db74b2 100644
--- a/languages/php/phpnewclassdlg.h
+++ b/languages/php/phpnewclassdlg.h
@@ -18,7 +18,7 @@
#ifndef PHPNEWCLASSDLG_H
#define PHPNEWCLASSDLG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "phpnewclassdlgbase.h"
/**
@@ -28,11 +28,11 @@
class PHPNewClassDlg : public PHPNewClassDlgBase {
Q_OBJECT
public:
- PHPNewClassDlg(const QStringList& baseClassNames,const QString& directory,QWidget *parent=0, const char *name=0);
+ PHPNewClassDlg(const TQStringList& baseClassNames,const TQString& directory,TQWidget *parent=0, const char *name=0);
~PHPNewClassDlg();
protected slots:
- void classNameTextChanged(const QString&);
- void fileNameTextChanged(const QString&);
+ void classNameTextChanged(const TQString&);
+ void fileNameTextChanged(const TQString&);
void accept();
void slotDirButtonClicked();
protected:
diff --git a/languages/php/phpparser.cpp b/languages/php/phpparser.cpp
index b13c5479..a0f1179e 100644
--- a/languages/php/phpparser.cpp
+++ b/languages/php/phpparser.cpp
@@ -25,11 +25,11 @@
#include <kdevproject.h>
#include <codemodel.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
#include <iostream>
@@ -46,37 +46,37 @@ PHPParser::~PHPParser(){
removeAllFiles();
}
-bool PHPParser::hasFile( const QString& fileName )
+bool PHPParser::hasFile( const TQString& fileName )
{
// kdDebug(9018) << "hasFile " << fileName.latin1() << endl;
- QString abso = URLUtil::canonicalPath(fileName);
- QMap<QString, PHPFile *>::Iterator it = m_files.find(abso);
+ TQString abso = URLUtil::canonicalPath(fileName);
+ TQMap<TQString, PHPFile *>::Iterator it = m_files.find(abso);
if ( it == m_files.end() )
return false;
return true;
}
-void PHPParser::addFile( const QString& fileName )
+void PHPParser::addFile( const TQString& fileName )
{
- QString abso = URLUtil::canonicalPath(fileName);
+ TQString abso = URLUtil::canonicalPath(fileName);
if ( hasFile(abso) )
return;
kdDebug(9018) << "addFile " << fileName.latin1() << endl;
- QFileInfo fi( abso );
+ TQFileInfo fi( abso );
if ((fi.extension().contains("inc") || fi.extension().contains("php") || fi.extension().contains("html") || fi.extension().contains("php3") || !fi.extension()) && !fi.extension().contains("~")) {
m_files.insert(abso, new PHPFile(m_part, abso));
}
}
-void PHPParser::removeFile( const QString& fileName )
+void PHPParser::removeFile( const TQString& fileName )
{
// kdDebug(9018) << "removeFile " << fileName.latin1() << endl;
- QString abso = URLUtil::canonicalPath(fileName);
- QMap<QString, PHPFile *>::Iterator it = m_files.find(abso);
+ TQString abso = URLUtil::canonicalPath(fileName);
+ TQMap<TQString, PHPFile *>::Iterator it = m_files.find(abso);
if ( it != m_files.end()) {
PHPFile *file = it.data();
@@ -89,7 +89,7 @@ void PHPParser::removeFile( const QString& fileName )
void PHPParser::removeAllFiles()
{
kdDebug(9018) << "removeAllFiles" << endl;
- QMap<QString, PHPFile *>::Iterator it = m_files.begin();
+ TQMap<TQString, PHPFile *>::Iterator it = m_files.begin();
while( it != m_files.end() ){
PHPFile * file = it.data();
@@ -100,11 +100,11 @@ void PHPParser::removeAllFiles()
m_files.clear();
}
-void PHPParser::reparseFile( const QString& fileName )
+void PHPParser::reparseFile( const TQString& fileName )
{
kdDebug(9018) << "reparseFile" << endl;
- QString abso = URLUtil::canonicalPath(fileName);
- QMap<QString, PHPFile *>::Iterator it = m_files.find(abso);
+ TQString abso = URLUtil::canonicalPath(fileName);
+ TQMap<TQString, PHPFile *>::Iterator it = m_files.find(abso);
if ( it != m_files.end()) {
PHPFile *file = it.data();
@@ -115,8 +115,8 @@ void PHPParser::reparseFile( const QString& fileName )
}
void PHPParser::run() {
- kdDebug(9018) << "run thread " << QThread::currentThread() << endl;
- QMap<QString, PHPFile *>::Iterator it;
+ kdDebug(9018) << "run thread " << TQThread::currentThread() << endl;
+ TQMap<TQString, PHPFile *>::Iterator it;
while ( !m_close ) {
m_canParse.wait();
diff --git a/languages/php/phpparser.h b/languages/php/phpparser.h
index c5d7e378..24687ea3 100644
--- a/languages/php/phpparser.h
+++ b/languages/php/phpparser.h
@@ -19,19 +19,19 @@
#ifndef PHPPARSER_H
#define PHPPARSER_H
-#include <qthread.h>
+#include <tqthread.h>
#if QT_VERSION < 0x030100
#include <kdevmutex.h>
#else
-#include <qmutex.h>
+#include <tqmutex.h>
#endif
#include <codemodel.h>
-#include <qwaitcondition.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqwaitcondition.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "phpfile.h"
@@ -42,16 +42,16 @@ class PHPSupportPart;
*@author Sandy Meier
*/
-class PHPParser: public QThread {
+class PHPParser: public TQThread {
public:
PHPParser(PHPSupportPart *part);
~PHPParser();
- void addFile( const QString& fileName );
- bool hasFile( const QString& fileName );
- void reparseFile( const QString& fileName );
- void removeFile( const QString& fileName );
+ void addFile( const TQString& fileName );
+ bool hasFile( const TQString& fileName );
+ void reparseFile( const TQString& fileName );
+ void removeFile( const TQString& fileName );
void removeAllFiles();
void run();
@@ -63,10 +63,10 @@ private:
KDevCore* m_core;
PHPSupportPart* m_part;
- QMutex m_mutex;
- QWaitCondition m_canParse;
+ TQMutex m_mutex;
+ TQWaitCondition m_canParse;
bool m_close;
- QMap<QString, PHPFile*> m_files;
+ TQMap<TQString, PHPFile*> m_files;
};
diff --git a/languages/php/phpsupport_event.h b/languages/php/phpsupport_event.h
index 4a1a175b..09c5f49e 100644
--- a/languages/php/phpsupport_event.h
+++ b/languages/php/phpsupport_event.h
@@ -20,18 +20,18 @@
#ifndef __phpsupport_events_h
#define __phpsupport_events_h
-#include <qevent.h>
-#include <qvaluelist.h>
+#include <tqevent.h>
+#include <tqvaluelist.h>
#if QT_VERSION < 0x030100
#include <kdevmutex.h>
#else
-#include <qmutex.h>
+#include <tqmutex.h>
#endif
enum
{
- Event_AddFile = QEvent::User + 1000,
+ Event_AddFile = TQEvent::User + 1000,
Event_StartParse,
Event_EndParse,
Event_AddClass,
@@ -49,8 +49,8 @@ enum
class FileParseEvent: public QCustomEvent
{
public:
- FileParseEvent(long event, const QString& fileName )
- : QCustomEvent(event), m_fileName( fileName )
+ FileParseEvent(long event, const TQString& fileName )
+ : TQCustomEvent(event), m_fileName( fileName )
{
m_name = "";
m_arguments = "";
@@ -58,29 +58,29 @@ public:
m_global = FALSE;
}
- FileParseEvent(long event, const QString& fileName, int position )
- : QCustomEvent(event), m_fileName( fileName ), m_position( position )
+ FileParseEvent(long event, const TQString& fileName, int position )
+ : TQCustomEvent(event), m_fileName( fileName ), m_position( position )
{
m_name = "";
m_arguments = "";
m_global = FALSE;
}
- FileParseEvent(long event, const QString& fileName, const QString& name, const QString& arguments )
- : QCustomEvent(event), m_fileName( fileName ), m_name( name ), m_arguments( arguments )
+ 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;
}
- FileParseEvent(long event, const QString& fileName, const QString& name, const QString& arguments, int position )
- : QCustomEvent(event), m_fileName( fileName ), m_name( name ), m_arguments( arguments ), m_position( position )
+ 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;
}
- FileParseEvent(long event, const QString& fileName, const QString& name, const QString& arguments, int position, bool global )
- : QCustomEvent(event), m_fileName( fileName ), m_name( name ), m_arguments( arguments ), m_position( position ), m_global( global )
+ FileParseEvent(long event, const TQString& fileName, const TQString& name, const TQString& arguments, int position, bool global )
+ : TQCustomEvent(event), m_fileName( fileName ), m_name( name ), m_arguments( arguments ), m_position( position ), m_global( global )
{
}
@@ -88,17 +88,17 @@ public:
{
}
- QString fileName() const { return m_fileName; }
- QString name() const { return m_name; }
- QString arguments() const { return m_arguments; }
+ TQString fileName() const { return m_fileName; }
+ TQString name() const { return m_name; }
+ TQString arguments() const { return m_arguments; }
int posititon() const { return m_position; }
bool global() const { return m_global; }
private:
- QString m_fileName;
- QString m_name;
- QString m_arguments;
- QString m_accesstype;
+ TQString m_fileName;
+ TQString m_name;
+ TQString m_arguments;
+ TQString m_accesstype;
int m_position;
bool m_global;
diff --git a/languages/php/phpsupportpart.cpp b/languages/php/phpsupportpart.cpp
index 4c4de794..d31bc933 100644
--- a/languages/php/phpsupportpart.cpp
+++ b/languages/php/phpsupportpart.cpp
@@ -21,16 +21,16 @@
#include <iostream>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qpopupmenu.h>
-#include <qprogressbar.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
-#include <qthread.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqpopupmenu.h>
+#include <tqprogressbar.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
+#include <tqthread.h>
#include <kaction.h>
#include <kapplication.h>
@@ -69,7 +69,7 @@ using namespace std;
static const KDevPluginInfo data("kdevphpsupport");
K_EXPORT_COMPONENT_FACTORY( libkdevphpsupport, PHPSupportFactory( data ) )
-PHPSupportPart::PHPSupportPart(QObject *parent, const char *name, const QStringList &)
+PHPSupportPart::PHPSupportPart(TQObject *parent, const char *name, const TQStringList &)
: KDevLanguageSupport(&data, parent, name ? name : "PHPSupportPart")
{
m_htmlView = 0;
@@ -79,23 +79,23 @@ PHPSupportPart::PHPSupportPart(QObject *parent, const char *name, const QStringL
setXMLFile("kdevphpsupport.rc");
- connect( core(), SIGNAL(projectOpened()), this, SLOT(projectOpened()) );
- connect( core(), SIGNAL(projectClosed()), this, SLOT(projectClosed()) );
- connect( partController(), SIGNAL(savedFile(const KURL&)),
- this, SLOT(savedFile(const KURL&)) );
- connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)),
- this, SLOT(projectConfigWidget(KDialogBase*)) );
+ connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) );
+ connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) );
+ connect( partController(), TQT_SIGNAL(savedFile(const KURL&)),
+ this, TQT_SLOT(savedFile(const KURL&)) );
+ connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)),
+ this, TQT_SLOT(projectConfigWidget(KDialogBase*)) );
KAction *action;
action = new KAction( i18n("&Run"), "exec",Key_F9,
- this, SLOT(slotRun()),
+ this, TQT_SLOT(slotRun()),
actionCollection(), "build_execute" );
action->setToolTip(i18n("Run"));
action->setWhatsThis(i18n("<b>Run</b><p>Executes script on a terminal or a webserver."));
action = new KAction( i18n("&New Class..."),0,
- this, SLOT(slotNewClass()),
+ this, TQT_SLOT(slotNewClass()),
actionCollection(), "project_new_class" );
action->setToolTip(i18n("New class"));
action->setWhatsThis(i18n("<b>New class</b><p>Runs New Class wizard."));
@@ -103,33 +103,33 @@ PHPSupportPart::PHPSupportPart(QObject *parent, const char *name, const QStringL
m_phpErrorView = new PHPErrorView(this, 0, "phpErrorWidget");
m_phpErrorView->setIcon( SmallIcon("info") );
- QWhatsThis::add(m_phpErrorView, i18n("<b>PHP problems</b><p>This view shows PHP parser warnings, errors, and fatal errors."));
+ TQWhatsThis::add(m_phpErrorView, i18n("<b>PHP problems</b><p>This view shows PHP parser warnings, errors, and fatal errors."));
mainWindow()->embedOutputView(m_phpErrorView, i18n("Problems"), i18n("Problems"));
phpExeProc = new KShellProcess("/bin/sh");
- connect( phpExeProc, SIGNAL(receivedStdout (KProcess*, char*, int)),
- this, SLOT(slotReceivedPHPExeStdout (KProcess*, char*, int)));
- connect( phpExeProc, SIGNAL(receivedStderr (KProcess*, char*, int)),
- this, SLOT(slotReceivedPHPExeStderr (KProcess*, char*, int)));
- connect( phpExeProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotPHPExeExited(KProcess*)));
+ connect( phpExeProc, TQT_SIGNAL(receivedStdout (KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedPHPExeStdout (KProcess*, char*, int)));
+ connect( phpExeProc, TQT_SIGNAL(receivedStderr (KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedPHPExeStderr (KProcess*, char*, int)));
+ connect( phpExeProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotPHPExeExited(KProcess*)));
m_htmlView = new PHPHTMLView(this);
mainWindow()->embedOutputView(m_htmlView->view(), i18n("PHP"), i18n("PHP"));
- connect( m_htmlView, SIGNAL(started(KIO::Job*)),
- this, SLOT(slotWebJobStarted(KIO::Job*)));
+ connect( m_htmlView, TQT_SIGNAL(started(KIO::Job*)),
+ this, TQT_SLOT(slotWebJobStarted(KIO::Job*)));
configData = new PHPConfigData(projectDom());
- connect( configData, SIGNAL(configStored()),
- this, SLOT(slotConfigStored()));
+ connect( configData, TQT_SIGNAL(configStored()),
+ this, TQT_SLOT(slotConfigStored()));
m_codeCompletion = new PHPCodeCompletion(this, configData);
- new KAction(i18n("Complete Text"), CTRL+Key_Space, m_codeCompletion, SLOT(cursorPositionChanged()), actionCollection(), "edit_complete_text");
+ new KAction(i18n("Complete Text"), CTRL+Key_Space, m_codeCompletion, TQT_SLOT(cursorPositionChanged()), actionCollection(), "edit_complete_text");
- connect( partController(), SIGNAL(activePartChanged(KParts::Part*)),
- this, SLOT(slotActivePartChanged(KParts::Part *)));
- connect( this, SIGNAL(fileParsed( PHPFile* )), this, SLOT(slotfileParsed( PHPFile* )));
+ connect( partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)),
+ this, TQT_SLOT(slotActivePartChanged(KParts::Part *)));
+ connect( this, TQT_SIGNAL(fileParsed( PHPFile* )), this, TQT_SLOT(slotfileParsed( PHPFile* )));
}
PHPSupportPart::~PHPSupportPart()
@@ -180,7 +180,7 @@ void PHPSupportPart::slotActivePartChanged(KParts::Part *part) {
if (m_editInterface) { // connect to the editor
disconnect(part, 0, this, 0 ); // to make sure that it is't connected twice
if (configData->getRealtimeParsing()) {
- connect(part,SIGNAL(textChanged()),this,SLOT(slotTextChanged()));
+ connect(part,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged()));
}
m_codeCompletion->setActiveEditorPart(part);
}
@@ -194,7 +194,7 @@ void PHPSupportPart::slotTextChanged() {
if (!ro_part)
return;
- QString fileName = ro_part->url().directory() + "/" + ro_part->url().fileName();
+ TQString fileName = ro_part->url().directory() + "/" + ro_part->url().fileName();
if (m_parser) {
if (m_parser->hasFile( fileName ))
@@ -208,13 +208,13 @@ void PHPSupportPart::slotConfigStored() {
}
void PHPSupportPart::projectConfigWidget(KDialogBase *dlg) {
- QVBox *vbox = dlg->addVBoxPage(i18n( "PHP Specific" ), i18n("PHP Settings"), BarIcon( "source", KIcon::SizeMedium ));
+ TQVBox *vbox = dlg->addVBoxPage(i18n( "PHP Specific" ), i18n("PHP Settings"), BarIcon( "source", KIcon::SizeMedium ));
PHPConfigWidget* w = new PHPConfigWidget(configData,vbox, "php config widget");
- connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) );
+ connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) );
}
void PHPSupportPart::slotNewClass() {
- QStringList classNames = sortedNameList( codeModel()->globalNamespace()->classList() );
+ TQStringList classNames = sortedNameList( codeModel()->globalNamespace()->classList() );
PHPNewClassDlg dlg(classNames,project()->projectDirectory());
dlg.exec();
}
@@ -240,9 +240,9 @@ bool PHPSupportPart::validateConfig() {
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, 0,
"php config dialog");
- QVBox *vbox = dlg.addVBoxPage(i18n("PHP Settings"));
+ TQVBox *vbox = dlg.addVBoxPage(i18n("PHP Settings"));
PHPConfigWidget* w = new PHPConfigWidget(configData,vbox, "php config widget");
- connect( &dlg, SIGNAL(okClicked()), w, SLOT(accept()) );
+ connect( &dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) );
dlg.exec();
}
if (configData->validateConfig()) {
@@ -257,8 +257,8 @@ void PHPSupportPart::executeOnWebserver() {
return; //user cancelled
// Figure out the name of the remote file
- QString weburl = configData->getWebURL();
- QString file = getExecuteFile();
+ TQString weburl = configData->getWebURL();
+ TQString file = getExecuteFile();
// Force KHTMLPart to reload the page
KParts::BrowserExtension* be = m_htmlView->browserExtension();
@@ -274,11 +274,11 @@ void PHPSupportPart::executeOnWebserver() {
m_htmlView->show();
}
-QString PHPSupportPart::getExecuteFile() {
- QString file;
+TQString PHPSupportPart::getExecuteFile() {
+ TQString file;
PHPConfigData::StartupFileMode mode = configData->getStartupFileMode();
- QString weburl = configData->getWebURL();
+ TQString weburl = configData->getWebURL();
if (mode == PHPConfigData::Current) {
KParts::ReadOnlyPart *ro_part = dynamic_cast<KParts::ReadOnlyPart*>(partController()->activePart());
if (ro_part) {
@@ -295,25 +295,25 @@ QString PHPSupportPart::getExecuteFile() {
}
void PHPSupportPart::slotWebJobStarted(KIO::Job* job) {
- if (job && job->className() == QString("KIO::TransferJob")) {
+ if (job && job->className() == TQString("KIO::TransferJob")) {
kdDebug(9018) << endl << "job started" << job->progressId();
KIO::TransferJob *tjob = static_cast<KIO::TransferJob*>(job);
- connect( tjob, SIGNAL(data(KIO::Job*, const QByteArray&)),
- this, SLOT(slotWebData(KIO::Job*, const QByteArray&)));
- connect( tjob, SIGNAL(result(KIO::Job*)),
- this, SLOT(slotWebResult(KIO::Job*)));
+ connect( tjob, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)),
+ this, TQT_SLOT(slotWebData(KIO::Job*, const TQByteArray&)));
+ connect( tjob, TQT_SIGNAL(result(KIO::Job*)),
+ this, TQT_SLOT(slotWebResult(KIO::Job*)));
}
}
-void PHPSupportPart::slotWebData(KIO::Job* /*job*/,const QByteArray& data) {
+void PHPSupportPart::slotWebData(KIO::Job* /*job*/,const TQByteArray& data) {
kdDebug(9018) << "slotWebData()" << endl;
- QString strData(data);
+ TQString strData(data);
m_phpExeOutput += strData;
}
void PHPSupportPart::slotWebResult(KIO::Job* /*job*/) {
kdDebug(9018) << "slotWebResult()" << endl;
- QString file = getExecuteFile();
+ TQString file = getExecuteFile();
PHPFile *pfile = new PHPFile(this, file);
pfile->ParseStdout(m_phpExeOutput);
delete pfile;
@@ -326,7 +326,7 @@ void PHPSupportPart::executeInTerminal() {
if (partController()->saveAllFiles()==false)
return; //user cancelled
- QString file = getExecuteFile();
+ TQString file = getExecuteFile();
if (m_htmlView == 0) {
m_htmlView = new PHPHTMLView(this);
@@ -350,9 +350,9 @@ void PHPSupportPart::executeInTerminal() {
void PHPSupportPart::slotReceivedPHPExeStdout (KProcess* /*proc*/, char* buffer, int buflen) {
kdDebug(9018) << "slotPHPExeStdout()" << endl;
- m_phpExeOutput += QString::fromLocal8Bit(buffer,buflen+1);
+ m_phpExeOutput += TQString::fromLocal8Bit(buffer,buflen+1);
- QString buf = buffer;
+ TQString buf = buffer;
if (configData->getInvocationMode() == PHPConfigData::Shell)
buf.replace("\n", "<br>");
m_htmlView->write(buf);
@@ -360,9 +360,9 @@ void PHPSupportPart::slotReceivedPHPExeStdout (KProcess* /*proc*/, char* buffer,
void PHPSupportPart::slotReceivedPHPExeStderr (KProcess* /*proc*/, char* buffer, int buflen) {
kdDebug(9018) << "slotPHPExeStderr()" << endl;
- m_phpExeOutput += QString::fromLocal8Bit(buffer,buflen+1);
+ m_phpExeOutput += TQString::fromLocal8Bit(buffer,buflen+1);
- QString buf = buffer;
+ TQString buf = buffer;
if (configData->getInvocationMode() == PHPConfigData::Shell)
buf.replace("\n", "<br>");
m_htmlView->write(buf);
@@ -371,7 +371,7 @@ void PHPSupportPart::slotReceivedPHPExeStderr (KProcess* /*proc*/, char* buffer,
void PHPSupportPart::slotPHPExeExited (KProcess* /*proc*/) {
kdDebug(9018) << "slotPHPExeExited()" << endl;
m_htmlView->end();
- QString file = getExecuteFile();
+ TQString file = getExecuteFile();
PHPFile *pfile = new PHPFile(this, file);
pfile->ParseStdout(m_phpExeOutput);
delete pfile;
@@ -381,10 +381,10 @@ void PHPSupportPart::projectOpened()
{
kdDebug(9018) << "projectOpened()" << endl;
- connect( project(), SIGNAL(addedFilesToProject(const QStringList &)),
- this, SLOT(addedFilesToProject(const QStringList &)) );
- connect( project(), SIGNAL(removedFilesFromProject(const QStringList &)),
- this, SLOT(removedFilesFromProject(const QStringList &)) );
+ connect( project(), TQT_SIGNAL(addedFilesToProject(const TQStringList &)),
+ this, TQT_SLOT(addedFilesToProject(const TQStringList &)) );
+ connect( project(), TQT_SIGNAL(removedFilesFromProject(const TQStringList &)),
+ this, TQT_SLOT(removedFilesFromProject(const TQStringList &)) );
if (!m_parser) {
m_parser = new PHPParser( this );
@@ -393,7 +393,7 @@ void PHPSupportPart::projectOpened()
// We want to parse only after all components have been
// properly initialized
- QTimer::singleShot(500, this, SLOT( initialParse() ) );
+ TQTimer::singleShot(500, this, TQT_SLOT( initialParse() ) );
}
void PHPSupportPart::initialParse( )
@@ -432,7 +432,7 @@ bool PHPSupportPart::parseProject()
_jd->files = project()->allFiles();
- QProgressBar* bar = new QProgressBar( _jd->files.count( ), mainWindow( ) ->statusBar( ) );
+ TQProgressBar* bar = new TQProgressBar( _jd->files.count( ), mainWindow( ) ->statusBar( ) );
bar->setMinimumWidth( 120 );
bar->setCenterIndicator( true );
mainWindow()->statusBar()->addWidget( bar );
@@ -442,7 +442,7 @@ bool PHPSupportPart::parseProject()
_jd->it = _jd->files.begin();
_jd->dir.setPath( project()->projectDirectory() );
- QTimer::singleShot( 0, this, SLOT( slotParseFiles() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotParseFiles() ) );
return TRUE;
}
@@ -456,11 +456,11 @@ void PHPSupportPart::slotParseFiles()
{
_jd->progressBar->setProgress( _jd->progressBar->progress() + 1 );
- QFileInfo fileInfo( _jd->dir, *( _jd->it ) );
+ TQFileInfo fileInfo( _jd->dir, *( _jd->it ) );
if ( fileInfo.exists() && fileInfo.isFile() && fileInfo.isReadable() )
{
- QString absFilePath = URLUtil::canonicalPath( fileInfo.absFilePath() );
+ TQString absFilePath = URLUtil::canonicalPath( fileInfo.absFilePath() );
// if ( isValidSource( absFilePath ) )
{
@@ -470,7 +470,7 @@ void PHPSupportPart::slotParseFiles()
++( _jd->it );
}
- QTimer::singleShot( 0, this, SLOT( slotParseFiles() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( slotParseFiles() ) );
}
else // finished or interrupted
{
@@ -489,15 +489,15 @@ void PHPSupportPart::slotParseFiles()
kapp->unlock();
}
-void PHPSupportPart::addedFilesToProject(const QStringList &fileList)
+void PHPSupportPart::addedFilesToProject(const TQStringList &fileList)
{
kdDebug(9018) << "addedFilesToProject()" << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = fileList.begin(); it != fileList.end(); ++it )
{
- QFileInfo fileInfo( project()->projectDirectory(), *it );
+ TQFileInfo fileInfo( project()->projectDirectory(), *it );
if (m_parser) {
m_parser->addFile( fileInfo.absFilePath() );
emit addedSourceInfo( fileInfo.absFilePath() );
@@ -505,16 +505,16 @@ void PHPSupportPart::addedFilesToProject(const QStringList &fileList)
}
}
-void PHPSupportPart::removedFilesFromProject(const QStringList &fileList)
+void PHPSupportPart::removedFilesFromProject(const TQStringList &fileList)
{
kdDebug(9018) << "removedFilesFromProject()" << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = fileList.begin(); it != fileList.end(); ++it )
{
- QFileInfo fileInfo( project()->projectDirectory(), *it );
- QString path = fileInfo.absFilePath();
+ TQFileInfo fileInfo( project()->projectDirectory(), *it );
+ TQString path = fileInfo.absFilePath();
if ( codeModel()->hasFile(path) ) {
emit aboutToRemoveSourceInfo( path );
codeModel()->removeFile( codeModel()->fileByName(path) );
@@ -535,12 +535,12 @@ void PHPSupportPart::savedFile(const KURL &fileName)
*/
}
-QString PHPSupportPart::getIncludePath()
+TQString PHPSupportPart::getIncludePath()
{
return configData->getPHPIncludePath();
}
-QString PHPSupportPart::getExePath()
+TQString PHPSupportPart::getExePath()
{
return configData->getPHPExecPath();
}
@@ -563,9 +563,9 @@ KMimeType::List PHPSupportPart::mimeTypes( )
return list;
}
-void PHPSupportPart::customEvent( QCustomEvent* ev )
+void PHPSupportPart::customEvent( TQCustomEvent* ev )
{
-// kdDebug(9018) << "phpSupportPart::customEvent(" << ev->type() << ") " << QThread::currentThread() << endl;
+// kdDebug(9018) << "phpSupportPart::customEvent(" << ev->type() << ") " << TQThread::currentThread() << endl;
if ( ev->type() < Event_AddFile || ev->type() > Event_AddFixme )
return;
@@ -663,7 +663,7 @@ void PHPSupportPart::customEvent( QCustomEvent* ev )
else if ( event->name() == "protected" )
LastMethod->setAccess(FunctionModel::Protected);
else if ( event->name() == "result" ) {
- QString ret = "";
+ TQString ret = "";
if (event->arguments().lower() == "$this" && LastClass ) {
ret = LastClass->name();
}
diff --git a/languages/php/phpsupportpart.h b/languages/php/phpsupportpart.h
index 83478283..5f7ba13b 100644
--- a/languages/php/phpsupportpart.h
+++ b/languages/php/phpsupportpart.h
@@ -20,9 +20,9 @@
#ifndef _PHPSUPPORTPART_H_
#define _PHPSUPPORTPART_H_
-#include <qdir.h>
-#include <qfile.h>
-#include <qprogressbar.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqprogressbar.h>
#include <kdialogbase.h>
#include "kdevlanguagesupport.h"
@@ -46,17 +46,17 @@ class PHPSupportPart : public KDevLanguageSupport
Q_OBJECT
public:
- PHPSupportPart( QObject *parent, const char *name, const QStringList & );
+ PHPSupportPart( TQObject *parent, const char *name, const TQStringList & );
~PHPSupportPart();
PHPErrorView *ErrorView();
PHPParser *Parser( ) ;
- QString getIncludePath();
- QString getExePath();
+ TQString getIncludePath();
+ TQString getExePath();
void emitFileParsed( PHPFile *file );
- virtual void customEvent( QCustomEvent* ev );
+ virtual void customEvent( TQCustomEvent* ev );
protected:
virtual Features features();
@@ -66,15 +66,15 @@ private slots:
void projectOpened();
void projectClosed();
void savedFile(const KURL &fileName);
- void addedFilesToProject(const QStringList &fileList);
- void removedFilesFromProject(const QStringList &fileList);
+ void addedFilesToProject(const TQStringList &fileList);
+ void removedFilesFromProject(const TQStringList &fileList);
void slotRun();
void slotNewClass();
void projectConfigWidget(KDialogBase *dlg);
void slotReceivedPHPExeStderr (KProcess* proc, char* buffer, int buflen);
void slotReceivedPHPExeStdout (KProcess* proc, char* buffer, int buflen);
void slotPHPExeExited (KProcess* proc);
- void slotWebData(KIO::Job* job,const QByteArray& data);
+ void slotWebData(KIO::Job* job,const TQByteArray& data);
void slotWebResult(KIO::Job* job);
void slotWebJobStarted(KIO::Job* job);
@@ -91,7 +91,7 @@ private slots:
void slotConfigStored();
private:
- QString getExecuteFile();
+ TQString getExecuteFile();
void executeOnWebserver();
void executeInTerminal();
bool validateConfig();
@@ -99,7 +99,7 @@ private:
PHPHTMLView* m_htmlView;
PHPErrorView* m_phpErrorView;
KShellProcess* phpExeProc;
- QString m_phpExeOutput;
+ TQString m_phpExeOutput;
PHPConfigData* configData;
PHPCodeCompletion* m_codeCompletion;
PHPParser* m_parser;
@@ -107,13 +107,13 @@ private:
struct JobData
{
- QDir dir;
- QGuardedPtr<QProgressBar> progressBar;
- QStringList::Iterator it;
- QStringList files;
- QMap< QString, QPair<uint, uint> > pcs;
- QDataStream stream;
- QFile file;
+ TQDir dir;
+ TQGuardedPtr<TQProgressBar> progressBar;
+ TQStringList::Iterator it;
+ TQStringList files;
+ TQMap< TQString, QPair<uint, uint> > pcs;
+ TQDataStream stream;
+ TQFile file;
~JobData()
{