From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- languages/csharp/csharpsupportpart.cpp | 100 ++++++++++++++++----------------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'languages/csharp/csharpsupportpart.cpp') 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 -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include #include #include -#include +#include #include -#include +#include #include #include "kdevmainwindow.h" @@ -48,42 +48,42 @@ typedef KDevGenericFactory 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("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 -- cgit v1.2.1