diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /languages/csharp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-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')
-rw-r--r-- | languages/csharp/csharpconfigwidget.cpp | 6 | ||||
-rw-r--r-- | languages/csharp/csharpconfigwidget.h | 6 | ||||
-rw-r--r-- | languages/csharp/csharpdoc.cpp | 22 | ||||
-rw-r--r-- | languages/csharp/csharpdoc.h | 8 | ||||
-rw-r--r-- | languages/csharp/csharpsupportpart.cpp | 100 | ||||
-rw-r--r-- | languages/csharp/csharpsupportpart.h | 18 |
6 files changed, 80 insertions, 80 deletions
diff --git a/languages/csharp/csharpconfigwidget.cpp b/languages/csharp/csharpconfigwidget.cpp index b18d3e69..620f7881 100644 --- a/languages/csharp/csharpconfigwidget.cpp +++ b/languages/csharp/csharpconfigwidget.cpp @@ -11,13 +11,13 @@ #include "csharpconfigwidget.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <klineedit.h> #include "domutil.h" -CSharpConfigWidget::CSharpConfigWidget(QDomDocument &projectDom, - QWidget *parent, const char *name) +CSharpConfigWidget::CSharpConfigWidget(TQDomDocument &projectDom, + TQWidget *parent, const char *name) : CSharpConfigWidgetBase(parent, name), dom(projectDom) { interpreter_edit->setText(DomUtil::readEntry(dom, "/kdevcsharpsupport/run/interpreter")); diff --git a/languages/csharp/csharpconfigwidget.h b/languages/csharp/csharpconfigwidget.h index bf1b063e..a44570cd 100644 --- a/languages/csharp/csharpconfigwidget.h +++ b/languages/csharp/csharpconfigwidget.h @@ -13,7 +13,7 @@ #define _CSHARPCONFIGWIDGET_H_ #include "csharpconfigwidgetbase.h" -#include <qdom.h> +#include <tqdom.h> class CSharpConfigWidget : public CSharpConfigWidgetBase @@ -21,14 +21,14 @@ class CSharpConfigWidget : public CSharpConfigWidgetBase Q_OBJECT public: - CSharpConfigWidget( QDomDocument &projectDom, QWidget *parent=0, const char *name=0 ); + CSharpConfigWidget( TQDomDocument &projectDom, TQWidget *parent=0, const char *name=0 ); ~CSharpConfigWidget(); public slots: void accept(); private: - QDomDocument &dom; + TQDomDocument &dom; }; #endif diff --git a/languages/csharp/csharpdoc.cpp b/languages/csharp/csharpdoc.cpp index 8755be2b..f70df162 100644 --- a/languages/csharp/csharpdoc.cpp +++ b/languages/csharp/csharpdoc.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; -CSharpdocProtocol::CSharpdocProtocol(const QCString &pool, const QCString &app) +CSharpdocProtocol::CSharpdocProtocol(const TQCString &pool, const TQCString &app) : SlaveBase("csharpdoc", pool, app) {} @@ -28,12 +28,12 @@ CSharpdocProtocol::~CSharpdocProtocol() void CSharpdocProtocol::get(const KURL& url) { - QStringList l = QStringList::split('/', url.path()); + TQStringList l = TQStringList::split('/', url.path()); mimeType("text/html"); bool plain = false; - QString cmd = "csharpdoc "; + TQString cmd = "csharpdoc "; if (l[0] == "functions") { plain = true; cmd += "-t -f "; @@ -43,7 +43,7 @@ void CSharpdocProtocol::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 CSharpdocProtocol::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 CSharpdocProtocol::get(const KURL& url) pclose(fd); if (plain) - data(QCString("</blockquote>")); + data(TQCString("</blockquote>")); finished(); } @@ -80,15 +80,15 @@ void CSharpdocProtocol::get(const KURL& url) void CSharpdocProtocol::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 CSharpdocProtocol::errorMessage() +TQCString CSharpdocProtocol::errorMessage() { - return QCString( "<html><body bgcolor=\"#FFFFFF\">" + i18n("Error in csharpdoc").local8Bit() + "</body></html>" ); + return TQCString( "<html><body bgcolor=\"#FFFFFF\">" + i18n("Error in csharpdoc").local8Bit() + "</body></html>" ); } diff --git a/languages/csharp/csharpdoc.h b/languages/csharp/csharpdoc.h index 85fa8cf5..caf8392d 100644 --- a/languages/csharp/csharpdoc.h +++ b/languages/csharp/csharpdoc.h @@ -1,14 +1,14 @@ #ifndef _CSHARPDOC_H_ #define _CSHARPDOC_H_ -#include <qobject.h> +#include <tqobject.h> #include <kio/slavebase.h> class CSharpdocProtocol : public KIO::SlaveBase { public: - CSharpdocProtocol(const QCString &pool, const QCString &app); + CSharpdocProtocol(const TQCString &pool, const TQCString &app); virtual ~CSharpdocProtocol(); 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/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 diff --git a/languages/csharp/csharpsupportpart.h b/languages/csharp/csharpsupportpart.h index 166285a6..35d2b7ba 100644 --- a/languages/csharp/csharpsupportpart.h +++ b/languages/csharp/csharpsupportpart.h @@ -21,7 +21,7 @@ class CSharpSupportPart : public KDevLanguageSupport Q_OBJECT public: - CSharpSupportPart( QObject *parent, const char *name, const QStringList & ); + CSharpSupportPart( TQObject *parent, const char *name, const TQStringList & ); ~CSharpSupportPart(); 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 slotCSharpdocFAQ(); 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(); //CSharp Parser // csharpparser* m_parser; |