summaryrefslogtreecommitdiffstats
path: root/languages/perl/perlsupportpart.cpp
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/perlsupportpart.cpp
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/perlsupportpart.cpp')
-rw-r--r--languages/perl/perlsupportpart.cpp98
1 files changed, 49 insertions, 49 deletions
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