summaryrefslogtreecommitdiffstats
path: root/languages/perl
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /languages/perl
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/perl')
-rw-r--r--languages/perl/perlconfigwidget.cpp8
-rw-r--r--languages/perl/perlconfigwidget.h6
-rw-r--r--languages/perl/perldoc.cpp22
-rw-r--r--languages/perl/perldoc.h8
-rw-r--r--languages/perl/perlparser.cpp122
-rw-r--r--languages/perl/perlparser.h50
-rw-r--r--languages/perl/perlsupportpart.cpp98
-rw-r--r--languages/perl/perlsupportpart.h18
8 files changed, 166 insertions, 166 deletions
diff --git a/languages/perl/perlconfigwidget.cpp b/languages/perl/perlconfigwidget.cpp
index 475ed8af..e41def0c 100644
--- a/languages/perl/perlconfigwidget.cpp
+++ b/languages/perl/perlconfigwidget.cpp
@@ -11,13 +11,13 @@
#include "perlconfigwidget.h"
-#include <qcheckbox.h>
-#include <qlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
#include "domutil.h"
-PerlConfigWidget::PerlConfigWidget(QDomDocument &projectDom,
- QWidget *parent, const char *name)
+PerlConfigWidget::PerlConfigWidget(TQDomDocument &projectDom,
+ TQWidget *parent, const char *name)
: PerlConfigWidgetBase(parent, name), dom(projectDom)
{
interpreter_edit->setText(DomUtil::readEntry(dom, "/kdevperlsupport/run/interpreter"));
diff --git a/languages/perl/perlconfigwidget.h b/languages/perl/perlconfigwidget.h
index 07364a40..9fbcc804 100644
--- a/languages/perl/perlconfigwidget.h
+++ b/languages/perl/perlconfigwidget.h
@@ -13,7 +13,7 @@
#define _PERLCONFIGWIDGET_H_
#include "perlconfigwidgetbase.h"
-#include <qdom.h>
+#include <tqdom.h>
class PerlConfigWidget : public PerlConfigWidgetBase
@@ -21,14 +21,14 @@ class PerlConfigWidget : public PerlConfigWidgetBase
Q_OBJECT
public:
- PerlConfigWidget( QDomDocument &projectDom, QWidget *parent=0, const char *name=0 );
+ PerlConfigWidget( TQDomDocument &projectDom, TQWidget *parent=0, const char *name=0 );
~PerlConfigWidget();
public slots:
void accept();
private:
- QDomDocument &dom;
+ TQDomDocument &dom;
};
#endif
diff --git a/languages/perl/perldoc.cpp b/languages/perl/perldoc.cpp
index cbb4d18f..cc0a03f9 100644
--- a/languages/perl/perldoc.cpp
+++ b/languages/perl/perldoc.cpp
@@ -5,7 +5,7 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -17,7 +17,7 @@
using namespace KIO;
-PerldocProtocol::PerldocProtocol(const QCString &pool, const QCString &app)
+PerldocProtocol::PerldocProtocol(const TQCString &pool, const TQCString &app)
: SlaveBase("perldoc", pool, app)
{}
@@ -28,12 +28,12 @@ PerldocProtocol::~PerldocProtocol()
void PerldocProtocol::get(const KURL& url)
{
- QStringList l = QStringList::split('/', url.path());
+ TQStringList l = TQStringList::split('/', url.path());
mimeType("text/html");
bool plain = false;
- QString cmd = "perldoc ";
+ TQString cmd = "perldoc ";
if (l[0] == "functions") {
plain = true;
cmd += "-t -f ";
@@ -43,7 +43,7 @@ void PerldocProtocol::get(const KURL& url)
cmd += KProcess::quote(l[1]);
cmd += " | pod2html";
} else {
- QCString errstr(i18n("The only existing directories are functions and faq.").local8Bit());
+ TQCString errstr(i18n("The only existing directories are functions and faq.").local8Bit());
data(errstr);
finished();
return;
@@ -52,11 +52,11 @@ void PerldocProtocol::get(const KURL& url)
kdDebug() << "Command: " << cmd << endl;
if (plain)
- data(QCString("<blockquote>"));
+ data(TQCString("<blockquote>"));
FILE *fd = popen(cmd.local8Bit().data(), "r");
char buffer[4090];
- QByteArray array;
+ TQByteArray array;
while (!feof(fd)) {
int n = fread(buffer, 1, 2048, fd);
@@ -72,7 +72,7 @@ void PerldocProtocol::get(const KURL& url)
pclose(fd);
if (plain)
- data(QCString("</blockquote>"));
+ data(TQCString("</blockquote>"));
finished();
}
@@ -80,15 +80,15 @@ void PerldocProtocol::get(const KURL& url)
void PerldocProtocol::mimetype(const KURL &url)
{
- QStringList l = QStringList::split('/', url.path());
+ TQStringList l = TQStringList::split('/', url.path());
mimeType((l[0] == "faq")? "text/html" : "text/plain");
finished();
}
-QCString PerldocProtocol::errorMessage()
+TQCString PerldocProtocol::errorMessage()
{
- return QCString( "<html><body bgcolor=\"#FFFFFF\">" + i18n("Error in perldoc").local8Bit() + "</body></html>" );
+ return TQCString( "<html><body bgcolor=\"#FFFFFF\">" + i18n("Error in perldoc").local8Bit() + "</body></html>" );
}
diff --git a/languages/perl/perldoc.h b/languages/perl/perldoc.h
index 00cced89..4540c045 100644
--- a/languages/perl/perldoc.h
+++ b/languages/perl/perldoc.h
@@ -1,14 +1,14 @@
#ifndef _PERLDOC_H_
#define _PERLDOC_H_
-#include <qobject.h>
+#include <tqobject.h>
#include <kio/slavebase.h>
class PerldocProtocol : public KIO::SlaveBase
{
public:
- PerldocProtocol(const QCString &pool, const QCString &app);
+ PerldocProtocol(const TQCString &pool, const TQCString &app);
virtual ~PerldocProtocol();
virtual void get(const KURL& url);
@@ -18,8 +18,8 @@ public:
protected:
void decodeURL(const KURL &url);
- void decodePath(QString path);
- QCString errorMessage();
+ void decodePath(TQString path);
+ TQCString errorMessage();
};
#endif
diff --git a/languages/perl/perlparser.cpp b/languages/perl/perlparser.cpp
index a6a5a834..ad0b5de2 100644
--- a/languages/perl/perlparser.cpp
+++ b/languages/perl/perlparser.cpp
@@ -18,11 +18,11 @@
#include "perlparser.h"
#include <kdebug.h>
-#include <qfile.h>
-#include <qregexp.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqfileinfo.h>
-perlparser::perlparser(KDevCore* core,CodeModel* model, QString interpreter) {
+perlparser::perlparser(KDevCore* core,CodeModel* model, TQString interpreter) {
m_core = core;
m_model = model;
m_interpreter=interpreter;
@@ -34,7 +34,7 @@ perlparser::perlparser(KDevCore* core,CodeModel* model, QString interpreter) {
perlparser::~perlparser(){
}
-const QStringList perlparser::UseFiles()
+const TQStringList perlparser::UseFiles()
{
return m_usefiles;
}
@@ -43,13 +43,13 @@ void perlparser::initialParse() {
m_usefiles.clear();
}
-void perlparser::parse(const QString &fileName){
- QFile f(fileName);
+void perlparser::parse(const TQString &fileName){
+ TQFile f(fileName);
if (!f.open(IO_ReadOnly))
return;
- QTextStream stream(&f);
- QStringList list;
- QString rawline;
+ TQTextStream stream(&f);
+ TQStringList list;
+ TQString rawline;
while (!stream.eof()) {
rawline = stream.readLine();
list.append(rawline.stripWhiteSpace().local8Bit());
@@ -63,23 +63,23 @@ void perlparser::parse(const QString &fileName){
m_model->addFile( m_file );
}
-void perlparser::parseLines(QStringList* lines,const QString &fileName)
+void perlparser::parseLines(TQStringList* lines,const TQString &fileName)
{
- QRegExp packagere("^[ \t]*package[ \t]+([+A-Za-z0-9_:]*).*\\;");
- QRegExp basere("^[ \t]*use[ \t]+base[ \t]*\\(\'*\"*([A-Za-z0-9_:]*)");
- QRegExp libre("^[ \t]*use[ \t]+lib[ \t]*\\(\'*\"*([A-Za-z0-9_:]*)");
- QRegExp usere("^[ \t]*use[ \t]+([+A-Za-z0-9_:]*).*\\;");
- QRegExp isare("^[ \t]*@ISA[ \t=qw\\(\'\"]*([A-Za-z0-9_: ]*)");
- QRegExp globalre("^[ \t]*our[ \t]+\\(*([ \t,$%@*+A-Za-z0-9_]*)\\)*.*");
- QRegExp myre("^[ \t]*my[ \t]+\\(*([ \t,$%@*+A-Za-z0-9_]*)\\)*.*");
- QRegExp subre("^[ \t]*sub[ \t]+([A-Za-z0-9_]+)([A-Za-z0-9_]|([ \t]*[{])?)$");
- QRegExp blessre("bless[ \t]*[\\( ]*([,$%@*+A-Za-z0-9_]*).*;");
- QRegExp namere("^[ \t]*([$%@*])([A-Za-z0-9_]*).*$");
- QRegExp privatere("^_([A-Za-z0-9_]*)");
- QRegExp startpod("^=[a-z0-9]+ [a-z0-9]*");
- QRegExp cutpod("^=cut");
-
- QString line;
+ TQRegExp packagere("^[ \t]*package[ \t]+([+A-Za-z0-9_:]*).*\\;");
+ TQRegExp basere("^[ \t]*use[ \t]+base[ \t]*\\(\'*\"*([A-Za-z0-9_:]*)");
+ TQRegExp libre("^[ \t]*use[ \t]+lib[ \t]*\\(\'*\"*([A-Za-z0-9_:]*)");
+ TQRegExp usere("^[ \t]*use[ \t]+([+A-Za-z0-9_:]*).*\\;");
+ TQRegExp isare("^[ \t]*@ISA[ \t=qw\\(\'\"]*([A-Za-z0-9_: ]*)");
+ TQRegExp globalre("^[ \t]*our[ \t]+\\(*([ \t,$%@*+A-Za-z0-9_]*)\\)*.*");
+ TQRegExp myre("^[ \t]*my[ \t]+\\(*([ \t,$%@*+A-Za-z0-9_]*)\\)*.*");
+ TQRegExp subre("^[ \t]*sub[ \t]+([A-Za-z0-9_]+)([A-Za-z0-9_]|([ \t]*[{])?)$");
+ TQRegExp blessre("bless[ \t]*[\\( ]*([,$%@*+A-Za-z0-9_]*).*;");
+ TQRegExp namere("^[ \t]*([$%@*])([A-Za-z0-9_]*).*$");
+ TQRegExp privatere("^_([A-Za-z0-9_]*)");
+ TQRegExp startpod("^=[a-z0-9]+ [a-z0-9]*");
+ TQRegExp cutpod("^=cut");
+
+ TQString line;
//clear all "last" know things
m_lastsub="";
@@ -98,7 +98,7 @@ void perlparser::parseLines(QStringList* lines,const QString &fileName)
bool endpod = false;
//check if we are parsing a script or module
- QFileInfo fi(fileName);
+ TQFileInfo fi(fileName);
bool inscript =(fi.extension() == "pl");
kdDebug(9016) << "inscript : " << inscript << "," << fi.extension() << endl;
@@ -106,7 +106,7 @@ void perlparser::parseLines(QStringList* lines,const QString &fileName)
addScript(fileName,lineNo,fi.fileName());
}
- for ( QStringList::Iterator it = lines->begin(); it != lines->end(); ++it ) {
+ for ( TQStringList::Iterator it = lines->begin(); it != lines->end(); ++it ) {
++lineNo;
line = (*it).local8Bit();
//empty line ?
@@ -121,7 +121,7 @@ void perlparser::parseLines(QStringList* lines,const QString &fileName)
//sub matching
if (subre.search(line)>=0){
- QString subname=subre.cap(1);
+ TQString subname=subre.cap(1);
kdDebug(9016) << "subre match [" << subname << "]" << endl;
bool prive = privatere.search(subname) >= 0;
kdDebug(9016) << "prive match [" << prive << "]" << endl;
@@ -136,12 +136,12 @@ void perlparser::parseLines(QStringList* lines,const QString &fileName)
//our matching
if (globalre.search(line)>=0) {
//splitup multible ours
- QString varlist=globalre.cap(1);
+ TQString varlist=globalre.cap(1);
kdDebug(9016) << "globalre match [" << varlist <<"]" << endl;
- QStringList vars=QStringList::split(",",varlist);
- for ( QStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) {
+ TQStringList vars=TQStringList::split(",",varlist);
+ for ( TQStringList::Iterator it = vars.begin(); it != vars.end(); ++it ) {
if (namere.search(*it)>=0) {
- QString var = namere.cap(2);
+ TQString var = namere.cap(2);
kdDebug(9016) << "namere match [" << var << "]" << endl;
if (m_lastpackage) { addAttributetoPackage(fileName,lineNo,var); }
else { addAttributetoScript(fileName,lineNo,var); }
@@ -161,7 +161,7 @@ void perlparser::parseLines(QStringList* lines,const QString &fileName)
//base matching
if ((basere.search(line)>=0) && (!m_inscript)) {
- QString parent = basere.cap(1);
+ TQString parent = basere.cap(1);
//create child & parent classes
kdDebug(9016) << "basere match [" << parent << "]" << endl;
addClass(fileName,lineNo);
@@ -169,7 +169,7 @@ void perlparser::parseLines(QStringList* lines,const QString &fileName)
continue;
} else {
if (libre.search(line)>=0) {
- QString path = libre.cap(1);
+ TQString path = libre.cap(1);
//add lib to INC path list
kdDebug(9016) << "libre match [" << path << "]" << endl;
m_INClist.append(path);
@@ -177,7 +177,7 @@ void perlparser::parseLines(QStringList* lines,const QString &fileName)
} else {
if (usere.search(line)>=0) {
//add lib to use list for later parsing
- QString lib = usere.cap(1);
+ TQString lib = usere.cap(1);
kdDebug(9016) << "usere match [" << lib << "]" << endl;
addUseLib(lib);
continue;
@@ -186,7 +186,7 @@ void perlparser::parseLines(QStringList* lines,const QString &fileName)
} //base
if ((isare.search(line)>=0) && (!m_inscript)) {
- QString parent = isare.cap(1);
+ TQString parent = isare.cap(1);
//create child & parent classes
kdDebug(9016) << "isare match [" << parent << "]" << endl;
addClass(fileName,lineNo);
@@ -195,7 +195,7 @@ void perlparser::parseLines(QStringList* lines,const QString &fileName)
} //isa
if ((packagere.search(line)>=0) && (!m_inscript)) {
- QString package=packagere.cap(1);
+ TQString package=packagere.cap(1);
kdDebug(9016) << "packagere match [" << package << "]" << endl;
addPackage(fileName,lineNo,package);
continue;
@@ -204,7 +204,7 @@ void perlparser::parseLines(QStringList* lines,const QString &fileName)
} // for lines loop
}
-void perlparser::addPackage(const QString& fileName ,int lineNr , const QString& name)
+void perlparser::addPackage(const TQString& fileName ,int lineNr , const TQString& name)
{
kdDebug(9016) << "AddPackage [" << name << "]" << endl;
NamespaceDom package = m_model->create<NamespaceModel>();
@@ -234,7 +234,7 @@ void perlparser::addPackage(const QString& fileName ,int lineNr , const QString&
}
-void perlparser::addScript(const QString& fileName ,int lineNr ,const QString& name)
+void perlparser::addScript(const TQString& fileName ,int lineNr ,const TQString& name)
{
kdDebug(9016) << "addScript [" << name << "]" << endl;
@@ -269,7 +269,7 @@ void perlparser::addScript(const QString& fileName ,int lineNr ,const QString& n
}
-void perlparser::addAttributetoPackage(const QString& fileName ,int lineNr ,const QString& name)
+void perlparser::addAttributetoPackage(const TQString& fileName ,int lineNr ,const TQString& name)
{
kdDebug(9016) << "addAttributetoPackage [" << name << "]" << endl;
VariableDom var = m_model->create<VariableModel>();
@@ -286,7 +286,7 @@ void perlparser::addAttributetoPackage(const QString& fileName ,int lineNr ,cons
m_lastattr=name;
}
-void perlparser::addAttributetoScript(const QString& fileName ,int lineNr ,const QString& name)
+void perlparser::addAttributetoScript(const TQString& fileName ,int lineNr ,const TQString& name)
{
kdDebug(9016) << "addAttributetoScript [" << name << "]" << endl;
VariableDom var = m_model->create<VariableModel>();
@@ -301,7 +301,7 @@ void perlparser::addAttributetoScript(const QString& fileName ,int lineNr ,const
}
}
-void perlparser::addClass(const QString& fileName ,int lineNr)
+void perlparser::addClass(const TQString& fileName ,int lineNr)
{
kdDebug(9016) << "addClass [ " << m_lastpackagename << " ]" << endl;
if (m_lastpackage->hasClass(m_lastpackagename)) {
@@ -318,7 +318,7 @@ void perlparser::addClass(const QString& fileName ,int lineNr)
}
}
-void perlparser::addConstructor(const QString& fileName ,int lineNr ,const QString& name)
+void perlparser::addConstructor(const TQString& fileName ,int lineNr ,const TQString& name)
{
kdDebug(9016) << "set Constructor["<< name << "]" << endl;
@@ -344,7 +344,7 @@ void perlparser::addConstructor(const QString& fileName ,int lineNr ,const QStri
m_lastclass->setStartPosition(lineNr,0);
}
-void perlparser::addGlobalSub(const QString& fileName ,int lineNr ,const QString& name ,bool privatesub)
+void perlparser::addGlobalSub(const TQString& fileName ,int lineNr ,const TQString& name ,bool privatesub)
{
kdDebug(9016) << "addGlobalSub[ " << name << "]" << endl;
@@ -367,7 +367,7 @@ void perlparser::addGlobalSub(const QString& fileName ,int lineNr ,const QString
m_lastsub=name;
}
-void perlparser::addScriptSub(const QString& fileName ,int lineNr ,const QString& name ,bool privatesub)
+void perlparser::addScriptSub(const TQString& fileName ,int lineNr ,const TQString& name ,bool privatesub)
{
kdDebug(9016) << "addScriptSub[ " << name << "]" << endl;
@@ -385,7 +385,7 @@ void perlparser::addScriptSub(const QString& fileName ,int lineNr ,const QString
m_lastsub=name;
}
-void perlparser::addClassMethod(const QString& fileName ,int lineNr ,const QString& name ,bool privatesub)
+void perlparser::addClassMethod(const TQString& fileName ,int lineNr ,const TQString& name ,bool privatesub)
{
kdDebug(9016) << "addClassMethod[ " << name << "]" << endl;
FunctionDom method = m_model->create<FunctionModel>();
@@ -406,7 +406,7 @@ void perlparser::addClassMethod(const QString& fileName ,int lineNr ,const QStri
m_lastsub=name;
}
-void perlparser::addPackageSub(const QString& fileName ,int lineNr ,const QString& name ,bool privatesub)
+void perlparser::addPackageSub(const TQString& fileName ,int lineNr ,const TQString& name ,bool privatesub)
{
kdDebug(9016) << "addPackageSub[ " << name << "]" << endl;
FunctionDom method = m_model->create<FunctionModel>();
@@ -424,7 +424,7 @@ void perlparser::addPackageSub(const QString& fileName ,int lineNr ,const QStrin
m_lastsub=name;
}
-void perlparser::addParentClass(const QString& parent)
+void perlparser::addParentClass(const TQString& parent)
{
kdDebug(9016) << "addParentClass[ " << parent << "]" << endl;
if (m_lastclass) {
@@ -434,7 +434,7 @@ void perlparser::addParentClass(const QString& parent)
}
}
-void perlparser::addUseLib(const QString& lib)
+void perlparser::addUseLib(const TQString& lib)
{
if (!m_model->hasFile(lib)) {
if (m_usefiles.findIndex(lib) == -1) {
@@ -450,12 +450,12 @@ void perlparser::getPerlINC() {
m_INClist.clear();
- QString cmd = "/usr/bin/perl -e\" print join('|',@INC);\"";
- QString result;
+ TQString cmd = "/usr/bin/perl -e\" print join('|',@INC);\"";
+ TQString result;
FILE *fd = popen(cmd.local8Bit().data(), "r");
char buffer[4090];
- QByteArray array;
+ TQByteArray array;
while (!feof(fd)) {
int n = fread(buffer, 1, 2048, fd);
@@ -464,26 +464,26 @@ void perlparser::getPerlINC() {
return;
}
array.setRawData(buffer, n);
- result=QString::QString(array);
+ result=TQString::TQString(array);
array.resetRawData(buffer, n);
}
pclose(fd);
//get INC list so we can use it to parse "use" modules
- m_INClist = QStringList::split(QString("|"),result);
+ m_INClist = TQStringList::split(TQString("|"),result);
kdDebug(9016) << "INC " << m_INClist.size() << " "<< result << endl;
}
-QString perlparser::findLib( const QString& lib)
+TQString perlparser::findLib( const TQString& lib)
{
- QString result;
+ TQString result;
- QString file=lib;
- file.replace( QRegExp("::"), QString("/"));
+ TQString file=lib;
+ file.replace( TQRegExp("::"), TQString("/"));
//find the correct path by using the INC list
- QStringList::Iterator inc = m_INClist.begin();
+ TQStringList::Iterator inc = m_INClist.begin();
while((inc != m_INClist.end()) && (result.isEmpty()) ) {
- QFileInfo fi((*inc) + "/" + file + ".pm");
+ TQFileInfo fi((*inc) + "/" + file + ".pm");
if ( fi.exists() ) {
result = (*inc) + "/" + file + ".pm";
}
diff --git a/languages/perl/perlparser.h b/languages/perl/perlparser.h
index 01ded7d8..b536596b 100644
--- a/languages/perl/perlparser.h
+++ b/languages/perl/perlparser.h
@@ -28,41 +28,41 @@
class perlparser {
public:
- perlparser(KDevCore* core,CodeModel* model, QString interpreter);
+ perlparser(KDevCore* core,CodeModel* model, TQString interpreter);
perlparser();
~perlparser();
void initialParse();
- void parse(const QString &fileName);
- void parseLines(QStringList* lines,const QString& fileName);
- const QStringList UseFiles();
- QString findLib( const QString& lib);
+ void parse(const TQString &fileName);
+ void parseLines(TQStringList* lines,const TQString& fileName);
+ const TQStringList UseFiles();
+ TQString findLib( const TQString& lib);
private:
//global functions to add to ClassStore
- void addPackage(const QString& fileName ,int lineNr , const QString& name);
- void addAttributetoScript(const QString& fileName ,int lineNr ,const QString& name);
- void addAttributetoPackage(const QString& fileName ,int lineNr ,const QString& name);
- void addClass(const QString& fileName ,int lineNr );
- void addConstructor(const QString& fileName ,int lineNr ,const QString& methodname);
- void addGlobalSub(const QString& fileName ,int lineNr , const QString& name, bool privatesub);
- void addScriptSub(const QString& fileName ,int lineNr , const QString& name, bool privatesub);
- void addClassMethod(const QString& fileName ,int lineNr , const QString& name , bool privatesub);
- void addPackageSub(const QString& fileName ,int lineNr , const QString& name, bool privatesub);
- void addParentClass(const QString& parent);
- void addScript(const QString& fileName ,int lineNr , const QString& name);
- void addUseLib(const QString& lib);
+ void addPackage(const TQString& fileName ,int lineNr , const TQString& name);
+ void addAttributetoScript(const TQString& fileName ,int lineNr ,const TQString& name);
+ void addAttributetoPackage(const TQString& fileName ,int lineNr ,const TQString& name);
+ void addClass(const TQString& fileName ,int lineNr );
+ void addConstructor(const TQString& fileName ,int lineNr ,const TQString& methodname);
+ void addGlobalSub(const TQString& fileName ,int lineNr , const TQString& name, bool privatesub);
+ void addScriptSub(const TQString& fileName ,int lineNr , const TQString& name, bool privatesub);
+ void addClassMethod(const TQString& fileName ,int lineNr , const TQString& name , bool privatesub);
+ void addPackageSub(const TQString& fileName ,int lineNr , const TQString& name, bool privatesub);
+ void addParentClass(const TQString& parent);
+ void addScript(const TQString& fileName ,int lineNr , const TQString& name);
+ void addUseLib(const TQString& lib);
void getPerlINC();
bool m_inpackage;
bool m_inscript;
bool m_inclass;
- QString m_lastsub;
- QString m_lastparentclass;
- QString m_lastattr;
- QString m_lastpackagename;
- QString m_lastscriptname;
+ TQString m_lastsub;
+ TQString m_lastparentclass;
+ TQString m_lastattr;
+ TQString m_lastpackagename;
+ TQString m_lastscriptname;
NamespaceDom m_lastscript;
NamespaceDom m_lastpackage;
@@ -74,12 +74,12 @@ class perlparser {
FileDom m_file;
//this willhav a list of INC paths
- QStringList m_INClist;
+ TQStringList m_INClist;
//this will get a list off all files "use" in the perl files
//and need additional parsing to include the classes in the classview
- QStringList m_usefiles;
+ TQStringList m_usefiles;
- QString m_interpreter;
+ TQString m_interpreter;
};
diff --git a/languages/perl/perlsupportpart.cpp b/languages/perl/perlsupportpart.cpp
index 4305644e..bb9b51c3 100644
--- a/languages/perl/perlsupportpart.cpp
+++ b/languages/perl/perlsupportpart.cpp
@@ -11,20 +11,20 @@
#include "perlsupportpart.h"
-#include <qfileinfo.h>
-#include <qpopupmenu.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqfileinfo.h>
+#include <tqpopupmenu.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include <kaction.h>
#include <kapplication.h>
#include <kdebug.h>
#include <kdevgenericfactory.h>
#include <kinputdialog.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <codemodel.h>
-#include <qprogressbar.h>
+#include <tqprogressbar.h>
#include <kstatusbar.h>
#include "kdevmainwindow.h"
@@ -48,42 +48,42 @@ typedef KDevGenericFactory<PerlSupportPart> PerlSupportFactory;
static const KDevPluginInfo data("kdevperlsupport");
K_EXPORT_COMPONENT_FACTORY( libkdevperlsupport, PerlSupportFactory( data ) )
-PerlSupportPart::PerlSupportPart(QObject *parent, const char *name, const QStringList &)
+PerlSupportPart::PerlSupportPart(TQObject *parent, const char *name, const TQStringList &)
: KDevLanguageSupport(&data, parent, name ? name : "PerlSupportPart")
{
setInstance(PerlSupportFactory::instance());
setXMLFile("kdevperlsupport.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(), 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&)) );
KAction *action;
action = new KAction( i18n("Execute Main Program"), "exec", 0,
- this, SLOT(slotExecute()),
+ this, TQT_SLOT(slotExecute()),
actionCollection(), "build_exec" );
action->setToolTip( i18n("Runs the Perl program") );
action = new KAction( i18n("Execute String..."), "exec", 0,
- this, SLOT(slotExecuteString()),
+ this, TQT_SLOT(slotExecuteString()),
actionCollection(), "build_execstring" );
action->setToolTip( i18n("Executes a string as Perl code") );
action = new KAction( i18n("Start Perl Interpreter"), "exec", 0,
- this, SLOT(slotStartInterpreter()),
+ this, TQT_SLOT(slotStartInterpreter()),
actionCollection(), "build_runinterpreter" );
action->setToolTip( i18n("Starts the Perl interpreter without a program") );
action = new KAction( i18n("Find Perl Function Documentation..."), 0,
- this, SLOT(slotPerldocFunction()),
+ this, TQT_SLOT(slotPerldocFunction()),
actionCollection(), "help_perldocfunction" );
action->setToolTip( i18n("Show the documentation page of a Perl function") );
action = new KAction( i18n("Find Perl FAQ Entry..."), 0,
- this, SLOT(slotPerldocFAQ()),
+ this, TQT_SLOT(slotPerldocFAQ()),
actionCollection(), "help_perldocfaq" );
action->setToolTip( i18n("Show the FAQ entry for a keyword") );
@@ -106,14 +106,14 @@ void PerlSupportPart::projectOpened()
{
kdDebug(9007) << "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 &)) );
// We want to parse only after all components have been
// properly initialized
- QTimer::singleShot(0, this, SLOT(initialParse()));
+ TQTimer::singleShot(0, this, TQT_SLOT(initialParse()));
}
@@ -121,11 +121,11 @@ void PerlSupportPart::projectClosed()
{
}
-void PerlSupportPart::maybeParse(const QString fileName)
+void PerlSupportPart::maybeParse(const TQString fileName)
{
- QFileInfo fi(fileName);
- QString path = fi.filePath();
- QString extension = fi.extension();
+ TQFileInfo fi(fileName);
+ TQString path = fi.filePath();
+ TQString extension = fi.extension();
if (extension == "pl" || extension == "pm") {
kdDebug(9016) << "maybe " << fileName << endl;
removeWithReference(fileName);
@@ -134,11 +134,11 @@ void PerlSupportPart::maybeParse(const QString fileName)
}
}
-void PerlSupportPart::addedFilesToProject(const QStringList &fileList)
+void PerlSupportPart::addedFilesToProject(const TQStringList &fileList)
{
kdDebug(9016) << "addedFilesToProject()" << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = fileList.begin(); it != fileList.end(); ++it )
{
@@ -147,13 +147,13 @@ void PerlSupportPart::addedFilesToProject(const QStringList &fileList)
}
-void PerlSupportPart::removedFilesFromProject(const QStringList &fileList)
+void PerlSupportPart::removedFilesFromProject(const TQStringList &fileList)
{
kdDebug(9016) << "removedFilesFromProject()" << endl;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for ( it = fileList.begin(); it != fileList.end(); ++it )
{
- QString fileName = project()->projectDirectory() + "/" + ( *it );
+ TQString fileName = project()->projectDirectory() + "/" + ( *it );
removeWithReference(fileName);
}
emit updatedSourceInfo();
@@ -180,9 +180,9 @@ KDevLanguageSupport::Features PerlSupportPart::features()
// return Functions;
}
-QString PerlSupportPart::interpreter()
+TQString PerlSupportPart::interpreter()
{
- QString prog = DomUtil::readEntry(*projectDom(), "/kdevperlsupport/run/interpreter");
+ TQString prog = DomUtil::readEntry(*projectDom(), "/kdevperlsupport/run/interpreter");
if (prog.isEmpty())
prog = "perl";
@@ -190,18 +190,18 @@ QString PerlSupportPart::interpreter()
}
-void PerlSupportPart::startApplication(const QString &program)
+void PerlSupportPart::startApplication(const TQString &program)
{
bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevperlsupport/run/terminal");
if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("KDevelop/AppFrontend"))
- appFrontend->startAppCommand(QString::QString(), program, inTerminal);
+ appFrontend->startAppCommand(TQString::TQString(), program, inTerminal);
}
void PerlSupportPart::slotExecute()
{
- QString program = project()->mainProgram();
- QString cmd = interpreter() + " " + program;
+ TQString program = project()->mainProgram();
+ TQString cmd = interpreter() + " " + program;
startApplication(cmd);
}
@@ -215,7 +215,7 @@ void PerlSupportPart::slotStartInterpreter()
void PerlSupportPart::slotExecuteString()
{
bool ok;
- QString cmd = KInputDialog::getText(i18n("String to Execute"), i18n("String to execute:"), QString::null, &ok, 0);
+ TQString cmd = KInputDialog::getText(i18n("String to Execute"), i18n("String to execute:"), TQString::null, &ok, 0);
if (ok) {
cmd.prepend("'");
cmd.append("'");
@@ -227,9 +227,9 @@ void PerlSupportPart::slotExecuteString()
void PerlSupportPart::slotPerldocFunction()
{
bool ok;
- QString key = KInputDialog::getText(i18n("Show Perl Documentation"), i18n("Show Perl documentation for function:"), "", &ok, 0);
+ TQString key = KInputDialog::getText(i18n("Show Perl Documentation"), i18n("Show Perl documentation for function:"), "", &ok, 0);
if (ok && !key.isEmpty()) {
- QString url = "perldoc:functions/";
+ TQString url = "perldoc:functions/";
url += key;
partController()->showDocument(KURL(url));
}
@@ -239,9 +239,9 @@ void PerlSupportPart::slotPerldocFunction()
void PerlSupportPart::slotPerldocFAQ()
{
bool ok;
- QString key = KInputDialog::getText(i18n("Show FAQ Entry"), i18n("Show FAQ entry for keyword:"), "", &ok, 0);
+ TQString key = KInputDialog::getText(i18n("Show FAQ Entry"), i18n("Show FAQ entry for keyword:"), "", &ok, 0);
if (ok && !key.isEmpty()) {
- QString url = "perldoc:faq/";
+ TQString url = "perldoc:faq/";
url += key;
partController()->showDocument(KURL(url));
}
@@ -265,17 +265,17 @@ void PerlSupportPart::initialParse()
kapp->processEvents( );
kapp->setOverrideCursor(waitCursor);
- QStringList files = project()->allFiles();
+ TQStringList files = project()->allFiles();
m_parser->initialParse();
//progress bar
- QProgressBar* bar = new QProgressBar( files.count( ), mainWindow( )->statusBar( ) );
+ TQProgressBar* bar = new TQProgressBar( files.count( ), mainWindow( )->statusBar( ) );
bar->setMinimumWidth( 120 );
bar->setCenterIndicator( true );
mainWindow( )->statusBar( )->addWidget( bar );
bar->show( );
int n = 0;
- for (QStringList::Iterator it = files.begin(); it != files.end() ;++it) {
+ for (TQStringList::Iterator it = files.begin(); it != files.end() ;++it) {
// kdDebug(9016) << "maybe parse " << project()->projectDirectory() + "/" + (*it) << endl;
maybeParse(project()->projectDirectory() + "/" + *it);
//update progress bar
@@ -297,7 +297,7 @@ void PerlSupportPart::initialParse()
}
}
-void PerlSupportPart::removeWithReference( const QString & fileName )
+void PerlSupportPart::removeWithReference( const TQString & fileName )
{
kdDebug(9016) << "remove with references: " << fileName << endl;
//m_timestamp.remove( fileName );
@@ -312,11 +312,11 @@ void PerlSupportPart::parseUseFiles()
{
kdDebug(9016) << "parse addional libs" << endl;
return;
- QString filename;
- QStringList m_usefiles = m_parser->UseFiles();
+ TQString filename;
+ TQStringList m_usefiles = m_parser->UseFiles();
//parse addional use files
- for (QStringList::Iterator it = m_usefiles.begin(); it != m_usefiles.end() ;++it)
+ for (TQStringList::Iterator it = m_usefiles.begin(); it != m_usefiles.end() ;++it)
{
filename = m_parser->findLib(*it);
//if something found , parse it
diff --git a/languages/perl/perlsupportpart.h b/languages/perl/perlsupportpart.h
index 91765a47..11a5f417 100644
--- a/languages/perl/perlsupportpart.h
+++ b/languages/perl/perlsupportpart.h
@@ -21,7 +21,7 @@ class PerlSupportPart : public KDevLanguageSupport
Q_OBJECT
public:
- PerlSupportPart( QObject *parent, const char *name, const QStringList & );
+ PerlSupportPart( TQObject *parent, const char *name, const TQStringList & );
~PerlSupportPart();
protected:
@@ -32,8 +32,8 @@ 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 slotExecute();
void slotExecuteString();
void slotStartInterpreter();
@@ -44,12 +44,12 @@ private slots:
void slotPerldocFAQ();
private:
- QString interpreter();
- void startApplication(const QString &program);
- void maybeParse(const QString fileName);
- void parse(const QString &fileName);
- void parseLines(QStringList* lines,const QString& fileName);
- void removeWithReference( const QString & fileName );
+ TQString interpreter();
+ void startApplication(const TQString &program);
+ void maybeParse(const TQString fileName);
+ void parse(const TQString &fileName);
+ void parseLines(TQStringList* lines,const TQString& fileName);
+ void removeWithReference( const TQString & fileName );
void parseUseFiles();
//Perl Parser
perlparser* m_parser;