summaryrefslogtreecommitdiffstats
path: root/languages/csharp/csharpsupportpart.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/csharp/csharpsupportpart.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/csharp/csharpsupportpart.cpp')
-rw-r--r--languages/csharp/csharpsupportpart.cpp100
1 files changed, 50 insertions, 50 deletions
diff --git a/languages/csharp/csharpsupportpart.cpp b/languages/csharp/csharpsupportpart.cpp
index 01a21ffb..292a63f3 100644
--- a/languages/csharp/csharpsupportpart.cpp
+++ b/languages/csharp/csharpsupportpart.cpp
@@ -11,20 +11,20 @@
#include "csharpsupportpart.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<CSharpSupportPart> CSharpSupportFactory;
static const KDevPluginInfo data("kdevcsharpsupport");
K_EXPORT_COMPONENT_FACTORY( libkdevcsharpsupport, CSharpSupportFactory( data ) )
-CSharpSupportPart::CSharpSupportPart(QObject *parent, const char *name, const QStringList &)
+CSharpSupportPart::CSharpSupportPart(TQObject *parent, const char *name, const TQStringList &)
: KDevLanguageSupport(&data, parent, name ? name : "CSharpSupportPart")
{
setInstance(CSharpSupportFactory::instance());
setXMLFile("kdevcsharpsupport.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 CSharp 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 CSharp code") );
action = new KAction( i18n("Start CSharp Interpreter"), "exec", 0,
- this, SLOT(slotStartInterpreter()),
+ this, TQT_SLOT(slotStartInterpreter()),
actionCollection(), "build_runinterpreter" );
action->setToolTip( i18n("Starts the CSharp interpreter without a program") );
action = new KAction( i18n("Find CSharp Function Documentation..."), 0,
- this, SLOT(slotCSharpdocFunction()),
+ this, TQT_SLOT(slotCSharpdocFunction()),
actionCollection(), "help_csharpdocfunction" );
action->setToolTip( i18n("Show the documentation page of a CSharp function") );
action = new KAction( i18n("Find CSharp FAQ Entry..."), 0,
- this, SLOT(slotCSharpdocFAQ()),
+ this, TQT_SLOT(slotCSharpdocFAQ()),
actionCollection(), "help_csharpdocfaq" );
action->setToolTip( i18n("Show the FAQ entry for a keyword") );
@@ -106,14 +106,14 @@ void CSharpSupportPart::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
// procsharpy initialized
- QTimer::singleShot(0, this, SLOT(initialParse()));
+ TQTimer::singleShot(0, this, TQT_SLOT(initialParse()));
}
@@ -121,11 +121,11 @@ void CSharpSupportPart::projectClosed()
{
}
-void CSharpSupportPart::maybeParse(const QString fileName)
+void CSharpSupportPart::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 == "cs") {
kdDebug(9016) << "maybe " << fileName << endl;
removeWithReference(fileName);
@@ -134,11 +134,11 @@ void CSharpSupportPart::maybeParse(const QString fileName)
}
}
-void CSharpSupportPart::addedFilesToProject(const QStringList &fileList)
+void CSharpSupportPart::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 CSharpSupportPart::addedFilesToProject(const QStringList &fileList)
}
-void CSharpSupportPart::removedFilesFromProject(const QStringList &fileList)
+void CSharpSupportPart::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 CSharpSupportPart::features()
// return Functions;
}
-QString CSharpSupportPart::interpreter()
+TQString CSharpSupportPart::interpreter()
{
- QString prog = DomUtil::readEntry(*projectDom(), "/kdevcsharpsupport/run/interpreter");
+ TQString prog = DomUtil::readEntry(*projectDom(), "/kdevcsharpsupport/run/interpreter");
if (prog.isEmpty())
prog = "csharp";
@@ -190,18 +190,18 @@ QString CSharpSupportPart::interpreter()
}
-void CSharpSupportPart::startApplication(const QString &program)
+void CSharpSupportPart::startApplication(const TQString &program)
{
bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevcsharpsupport/run/terminal");
if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("KDevelop/AppFrontend"))
- appFrontend->startAppCommand(QString::QString(), program, inTerminal);
+ appFrontend->startAppCommand(TQString::TQString(), program, inTerminal);
}
void CSharpSupportPart::slotExecute()
{
- QString program = project()->mainProgram();
- QString cmd = interpreter() + " " + program;
+ TQString program = project()->mainProgram();
+ TQString cmd = interpreter() + " " + program;
startApplication(cmd);
}
@@ -215,7 +215,7 @@ void CSharpSupportPart::slotStartInterpreter()
void CSharpSupportPart::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 CSharpSupportPart::slotExecuteString()
void CSharpSupportPart::slotCSharpdocFunction()
{
bool ok;
- QString key = KInputDialog::getText(i18n("Show CSharp Documentation"), i18n("Show CSharp documentation for function:"), "", &ok, 0);
+ TQString key = KInputDialog::getText(i18n("Show CSharp Documentation"), i18n("Show CSharp documentation for function:"), "", &ok, 0);
if (ok && !key.isEmpty()) {
- QString url = "csharpdoc:functions/";
+ TQString url = "csharpdoc:functions/";
url += key;
partController()->showDocument(KURL(url));
}
@@ -239,9 +239,9 @@ void CSharpSupportPart::slotCSharpdocFunction()
void CSharpSupportPart::slotCSharpdocFAQ()
{
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 = "csharpdoc:faq/";
+ TQString url = "csharpdoc:faq/";
url += key;
partController()->showDocument(KURL(url));
}
@@ -265,17 +265,17 @@ void CSharpSupportPart::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 CSharpSupportPart::initialParse()
}
}
-void CSharpSupportPart::removeWithReference( const QString & fileName )
+void CSharpSupportPart::removeWithReference( const TQString & fileName )
{
kdDebug(9016) << "remove with references: " << fileName << endl;
//m_timestamp.remove( fileName );
@@ -312,12 +312,12 @@ void CSharpSupportPart::parseUseFiles()
{
kdDebug(9016) << "parse addional libs" << endl;
return;
- QString filename;
- QStringList m_usefiles;
- // QStringList m_usefiles = m_parser->UseFiles();
+ TQString filename;
+ TQStringList m_usefiles;
+ // 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