diff options
Diffstat (limited to 'languages/ada')
-rw-r--r-- | languages/ada/AdaStoreWalker.hpp | 28 | ||||
-rw-r--r-- | languages/ada/ada_utils.cpp | 44 | ||||
-rw-r--r-- | languages/ada/ada_utils.hpp | 10 | ||||
-rw-r--r-- | languages/ada/adasupportpart.cpp | 114 | ||||
-rw-r--r-- | languages/ada/adasupportpart.h | 18 | ||||
-rw-r--r-- | languages/ada/addclass.cpp | 56 | ||||
-rw-r--r-- | languages/ada/addclass.h | 22 | ||||
-rw-r--r-- | languages/ada/backgroundparser.cpp | 10 | ||||
-rw-r--r-- | languages/ada/backgroundparser.h | 12 | ||||
-rw-r--r-- | languages/ada/problemreporter.cpp | 108 | ||||
-rw-r--r-- | languages/ada/problemreporter.h | 16 |
11 files changed, 219 insertions, 219 deletions
diff --git a/languages/ada/AdaStoreWalker.hpp b/languages/ada/AdaStoreWalker.hpp index 6f108ff6..c18f5dcd 100644 --- a/languages/ada/AdaStoreWalker.hpp +++ b/languages/ada/AdaStoreWalker.hpp @@ -3,9 +3,9 @@ #line 1 "expandedada.store.g" -#include <qstring.h> -#include <qstringlist.h> -#include <qfileinfo.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqfileinfo.h> #include <codemodel.h> #include "AdaAST.hpp" @@ -28,10 +28,10 @@ class CUSTOM_API AdaStoreWalker : public ANTLR_USE_NAMESPACE(antlr)TreeParser, p #line 25 "expandedada.store.g" private: - QString m_fileName; - QValueList<NamespaceDom> m_scopeStack; + TQString m_fileName; + TQValueList<NamespaceDom> m_scopeStack; CodeModel* m_model; - QValueList<QStringList> m_imports; + TQValueList<TQStringList> m_imports; NamespaceDom m_currentContainer; int m_currentAccess; bool m_addToStore; /* auxiliary variable: for the moment, this is `true' @@ -44,8 +44,8 @@ public: CodeModel* codeModel () { return m_model; } const CodeModel* codeModel () const { return m_model; } - QString fileName () const { return m_fileName; } - void setFileName (const QString& fileName) { m_fileName = fileName; } + TQString fileName () const { return m_fileName; } + void setFileName (const TQString& fileName) { m_fileName = fileName; } void init () { m_scopeStack.clear (); @@ -64,13 +64,13 @@ public: void wipeout () { m_model->wipeout (); } // void out () { m_store->out (); } - void removeWithReferences (const QString& fileName) { + void removeWithReferences (const TQString& fileName) { m_model->removeFile (m_model->fileByName(fileName)); } NamespaceDom insertScopeContainer - (NamespaceDom scope, const QStringList & scopes ) { - QStringList::ConstIterator it = scopes.begin(); - QString prefix( *it ); + (NamespaceDom scope, const TQStringList & scopes ) { + TQStringList::ConstIterator it = scopes.begin(); + TQString prefix( *it ); NamespaceDom ns = scope->namespaceByName( prefix ); // kdDebug() << "insertScopeContainer begin with prefix " << prefix << endl; if (!ns.data()) { @@ -87,7 +87,7 @@ public: } // kdDebug() << "insertScopeContainer: while" << endl; while ( ++it != scopes.end() ) { - QString nameSegment( *it ); + TQString nameSegment( *it ); prefix += "." + nameSegment; // kdDebug() << "insertScopeContainer: while prefix = " << prefix << endl; NamespaceDom inner = scope->namespaceByName( prefix ); @@ -104,7 +104,7 @@ public: return ns; } NamespaceDom defineScope( RefAdaAST namenode ) { - QStringList scopes( qnamelist( namenode ) ); + TQStringList scopes( qnamelist( namenode ) ); // kdDebug() << "defineScope: " << scopes.join(" ") << endl; NamespaceDom psc = insertScopeContainer( m_currentContainer, scopes ); // kdDebug() << "defineScope psc created" << endl; diff --git a/languages/ada/ada_utils.cpp b/languages/ada/ada_utils.cpp index 9630f058..6e4bea13 100644 --- a/languages/ada/ada_utils.cpp +++ b/languages/ada/ada_utils.cpp @@ -4,56 +4,56 @@ #include <unistd.h> #include <iostream> -#include <qstring.h> -#include <qstringlist.h> -#include <qfile.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqfile.h> +#include <tqregexp.h> #include <kdebug.h> #include "ada_utils.hpp" #include "adasupport.hpp" -QString qtext (const RefAdaAST& n) +TQString qtext (const RefAdaAST& n) { - return QString::fromLatin1 (text (n).c_str ()); + return TQString::fromLatin1 (text (n).c_str ()); } -QStringList qnamelist (const RefAdaAST& n) +TQStringList qnamelist (const RefAdaAST& n) { - QString txt = qtext (n); + TQString txt = qtext (n); // kdDebug() << "qnamelist: input is " << txt << endl; - return QStringList::split ('.', txt); + return TQStringList::split ('.', txt); } -QString ada_spec_filename (const QString& comp_unit_name) +TQString ada_spec_filename (const TQString& comp_unit_name) { - QString fn (comp_unit_name.lower ()); + TQString fn (comp_unit_name.lower ()); - fn.replace (QRegExp("."), "-"); + fn.replace (TQRegExp("."), "-"); fn += ".ads"; return fn; } -QString fq_specfilename (const QString& comp_unit_name) +TQString fq_specfilename (const TQString& comp_unit_name) { - QString fname = ada_spec_filename (comp_unit_name); + TQString fname = ada_spec_filename (comp_unit_name); - if (QFile::exists (fname)) + if (TQFile::exists (fname)) return fname; - QString adaincpath = getenv ("ADA_INCLUDE_PATH"); + TQString adaincpath = getenv ("ADA_INCLUDE_PATH"); if (adaincpath.isNull ()) - return QString::null; + return TQString::null; - QStringList dirs = QStringList::split (':', adaincpath); - QString fq_filename; - for (QStringList::Iterator it = dirs.begin (); it != dirs.end (); it++) { + TQStringList dirs = TQStringList::split (':', adaincpath); + TQString fq_filename; + for (TQStringList::Iterator it = dirs.begin (); it != dirs.end (); it++) { fq_filename = *it; if (! fq_filename.endsWith ("/")) fq_filename += "/"; fq_filename += fname; - if (QFile::exists (fq_filename)) + if (TQFile::exists (fq_filename)) return fq_filename; } if (fname.startsWith ("ada-") || @@ -64,6 +64,6 @@ QString fq_specfilename (const QString& comp_unit_name) } else { kdDebug () << "Cannot find file " << fname << endl; } - return QString::null; + return TQString::null; } diff --git a/languages/ada/ada_utils.hpp b/languages/ada/ada_utils.hpp index b1df43dd..25c9fabd 100644 --- a/languages/ada/ada_utils.hpp +++ b/languages/ada/ada_utils.hpp @@ -3,13 +3,13 @@ #ifndef ADA_UTILS_H #define ADA_UTILS_H -#include <qstring.h> +#include <tqstring.h> #include "AdaAST.hpp" -QString qtext (const RefAdaAST& n); -QStringList qnamelist (const RefAdaAST& n); -QString ada_spec_filename (const QString& comp_unit_name); -QString fq_specfilename (const QString& comp_unit_name); +TQString qtext (const RefAdaAST& n); +TQStringList qnamelist (const RefAdaAST& n); +TQString ada_spec_filename (const TQString& comp_unit_name); +TQString fq_specfilename (const TQString& comp_unit_name); #endif diff --git a/languages/ada/adasupportpart.cpp b/languages/ada/adasupportpart.cpp index 39ead02a..7c7f4198 100644 --- a/languages/ada/adasupportpart.cpp +++ b/languages/ada/adasupportpart.cpp @@ -1,11 +1,11 @@ -#include <qfileinfo.h> -#include <qlistview.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qvbox.h> -#include <qprogressbar.h> -#include <qwhatsthis.h> +#include <tqfileinfo.h> +#include <tqlistview.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqvbox.h> +#include <tqprogressbar.h> +#include <tqwhatsthis.h> #include <kgenericfactory.h> #include <kapplication.h> @@ -50,35 +50,35 @@ struct AdaSupportPartData { AdaSupportPartData () : problemReporter (0) {} }; -AdaSupportPart::AdaSupportPart (QObject *parent, const char *name, const QStringList &) +AdaSupportPart::AdaSupportPart (TQObject *parent, const char *name, const TQStringList &) : KDevLanguageSupport (&data, parent, name ? name : "AdaSupportPart"), d (new AdaSupportPartData()) { setInstance (AdaSupportPartFactory::instance ()); d->problemReporter = new ProblemReporter (this); -// connect (core (), SIGNAL (configWidget (KDialogBase*)), -// d->problemReporter, SLOT (configWidget (KDialogBase*))); +// connect (core (), TQT_SIGNAL (configWidget (KDialogBase*)), +// d->problemReporter, TQT_SLOT (configWidget (KDialogBase*))); d->problemReporter->setIcon( SmallIcon("info") ); mainWindow( )->embedOutputView( d->problemReporter, i18n("Problems"), i18n("Problem reporter")); - QWhatsThis::add(d->problemReporter, i18n("<b>Problem reporter</b><p>This window shows various \"problems\" in your project. " + TQWhatsThis::add(d->problemReporter, i18n("<b>Problem reporter</b><p>This window shows various \"problems\" in your project. " "It displays errors reported by a language parser.")); setXMLFile ("adasupportpart.rc"); - connect (core (), SIGNAL (projectOpened ()), this, SLOT (projectOpened ())); - connect (core (), SIGNAL (projectClosed ()), this, SLOT (projectClosed ())); + connect (core (), TQT_SIGNAL (projectOpened ()), this, TQT_SLOT (projectOpened ())); + connect (core (), TQT_SIGNAL (projectClosed ()), this, TQT_SLOT (projectClosed ())); - connect (partController (), SIGNAL (savedFile (const KURL&)), - this, SLOT (savedFile (const KURL&))); + connect (partController (), TQT_SIGNAL (savedFile (const KURL&)), + this, TQT_SLOT (savedFile (const KURL&))); -// connect (core (), SIGNAL (configWidget (KDialogBase*)), this, SLOT (configWidget (KDialogBase*))); - connect( core(), SIGNAL(configWidget(KDialogBase*)), - d->problemReporter, SLOT(configWidget(KDialogBase*)) ); +// connect (core (), TQT_SIGNAL (configWidget (KDialogBase*)), this, TQT_SLOT (configWidget (KDialogBase*))); + connect( core(), TQT_SIGNAL(configWidget(KDialogBase*)), + d->problemReporter, TQT_SLOT(configWidget(KDialogBase*)) ); // a small hack (robe) //classStore ()->globalScope ()->setName ("(default packages)"); //classStore ()->addScope (classStore ()->globalScope ()); - //classStore ()->globalScope ()->setName (QString::null); + //classStore ()->globalScope ()->setName (TQString::null); } @@ -102,14 +102,14 @@ KDevLanguageSupport::Features AdaSupportPart::features () void AdaSupportPart::projectOpened () { - connect (project (), SIGNAL (addedFilesToProject (const QStringList &)), - this, SLOT (addedFilesToProject (const QStringList &))); - connect (project (), SIGNAL (removedFilesFromProject (const QStringList &)), - this, SLOT (removedFilesFromProject (const QStringList &))); - connect( project( ), SIGNAL( changedFilesInProject( const QStringList & ) ), - this, SLOT( changedFilesInProject( const QStringList & ) ) ); - - QTimer::singleShot (0, this, SLOT (initialParse ())); + 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 &))); + connect( project( ), TQT_SIGNAL( changedFilesInProject( const TQStringList & ) ), + this, TQT_SLOT( changedFilesInProject( const TQStringList & ) ) ); + + TQTimer::singleShot (0, this, TQT_SLOT (initialParse ())); } @@ -130,18 +130,18 @@ void AdaSupportPart::initialParse () kapp->setOverrideCursor (waitCursor); int n = 0; - QStringList files = project ()->allFiles (); + TQStringList files = project ()->allFiles (); - 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( ); - for (QStringList::Iterator it = files.begin (); it != files.end (); ++it) { + for (TQStringList::Iterator it = files.begin (); it != files.end (); ++it) { bar->setProgress( n++ ); - QString fn = project ()->projectDirectory () + "/" + *it; + TQString fn = project ()->projectDirectory () + "/" + *it; maybeParse (fn); kapp->processEvents (500); } @@ -158,16 +158,16 @@ void AdaSupportPart::initialParse () } } -QStringList AdaSupportPart::fileExtensions () +TQStringList AdaSupportPart::fileExtensions () { - return QStringList () << "ads" << "adb"; + return TQStringList () << "ads" << "adb"; } -void AdaSupportPart::maybeParse (const QString &fileName) +void AdaSupportPart::maybeParse (const TQString &fileName) { kdDebug () << "AdaSupportPart::maybeParse: " << fileName << endl; - if (!fileExtensions ().contains (QFileInfo (fileName).extension ())) + if (!fileExtensions ().contains (TQFileInfo (fileName).extension ())) return; // mainWindow ()->statusBar ()->message (i18n ("Parsing file: %1").arg (fileName)); @@ -175,27 +175,27 @@ void AdaSupportPart::maybeParse (const QString &fileName) } -void AdaSupportPart::addedFilesToProject (const QStringList &fileList) +void AdaSupportPart::addedFilesToProject (const TQStringList &fileList) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = fileList.begin (); it != fileList.end (); ++it) { - QString path = project ()->projectDirectory () + "/" + (*it); + TQString path = project ()->projectDirectory () + "/" + (*it); maybeParse (path); emit addedSourceInfo( path ); } } -void AdaSupportPart::removedFilesFromProject (const QStringList &fileList) +void AdaSupportPart::removedFilesFromProject (const TQStringList &fileList) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = fileList.begin (); it != fileList.end (); ++it) { kdDebug () << "AdaSupportPart::removedFileFromProject () -- " << (*it) << endl; - QString path = project ()->projectDirectory () + "/" + (*it); + TQString path = project ()->projectDirectory () + "/" + (*it); if( codeModel()->hasFile(path) ) { @@ -208,12 +208,12 @@ void AdaSupportPart::removedFilesFromProject (const QStringList &fileList) } -void AdaSupportPart::parse (const QString &fileName) +void AdaSupportPart::parse (const TQString &fileName) { kdDebug () << "AdaSupportPart::parse () -- " << fileName << endl; - std::ifstream stream (QFile::encodeName( fileName ).data()); - QCString _fn = fileName.utf8 (); + std::ifstream stream (TQFile::encodeName( fileName ).data()); + TQCString _fn = fileName.utf8 (); std::string fn (_fn.data ()); AdaLexer lexer (stream); @@ -250,21 +250,21 @@ void AdaSupportPart::parse (const QString &fileName) } } catch (antlr::ANTLRException& ex) { kdDebug () << "*exception*: " << ex.toString ().c_str () << endl; - d->problemReporter->reportError (QString::fromLatin1( ex.getMessage ().c_str() ), + d->problemReporter->reportError (TQString::fromLatin1( ex.getMessage ().c_str() ), fileName, lexer.getLine (), lexer.getColumn ()); } } -void AdaSupportPart::parseContents (const QString& contents, const QString& fileName) +void AdaSupportPart::parseContents (const TQString& contents, const TQString& fileName) { kdDebug () << "AdaSupportPart::parseContents () -- " << fileName << endl; - QCString _fn = QFile::encodeName (fileName); + TQCString _fn = TQFile::encodeName (fileName); std::string fn (_fn.data ()); - QCString text = contents.utf8 (); + TQCString text = contents.utf8 (); std::istringstream stream ((const char *)text); AdaLexer lexer (stream); @@ -285,7 +285,7 @@ void AdaSupportPart::parseContents (const QString& contents, const QString& file } catch (antlr::ANTLRException& ex) { kdDebug () << "*exception*: " << ex.toString ().c_str () << endl; - d->problemReporter->reportError (QString::fromLatin1( ex.getMessage().c_str() ), + d->problemReporter->reportError (TQString::fromLatin1( ex.getMessage().c_str() ), fileName, lexer.getLine (), lexer.getColumn ()); @@ -323,14 +323,14 @@ void AdaSupportPart::saveProjectSourceInfo( ) if( !project() || fileList.isEmpty() ) return; - QFile f( project()->projectDirectory() + "/" + project()->projectName() + ".pcs" ); + TQFile f( project()->projectDirectory() + "/" + project()->projectName() + ".pcs" ); if( !f.open( IO_WriteOnly ) ) return; - QDataStream stream( &f ); - QMap<QString, Q_ULONG> offsets; + TQDataStream stream( &f ); + TQMap<TQString, Q_ULONG> offsets; - QString pcs( "PCS" ); + TQString pcs( "PCS" ); stream << pcs << KDEV_PCS_VERSION; stream << int( fileList.size() ); @@ -359,13 +359,13 @@ void AdaSupportPart::saveProjectSourceInfo( ) }*/ } -void AdaSupportPart::changedFilesInProject( const QStringList & fileList ) +void AdaSupportPart::changedFilesInProject( const TQStringList & fileList ) { - QStringList files = fileList; + TQStringList files = fileList; - for ( QStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) + for ( TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) { - QString path = project ()->projectDirectory () + "/" + *it ; + TQString path = project ()->projectDirectory () + "/" + *it ; maybeParse( path ); emit addedSourceInfo( path ); diff --git a/languages/ada/adasupportpart.h b/languages/ada/adasupportpart.h index d9f2c45d..968b1d34 100644 --- a/languages/ada/adasupportpart.h +++ b/languages/ada/adasupportpart.h @@ -4,7 +4,7 @@ #include "kdevlanguagesupport.h" -#include <qwaitcondition.h> +#include <tqwaitcondition.h> class AdaSupportPartData; class KDialogBase; @@ -14,30 +14,30 @@ class AdaSupportPart : public KDevLanguageSupport { Q_OBJECT public: - AdaSupportPart (QObject *parent, const char *name, const QStringList &); + AdaSupportPart (TQObject *parent, const char *name, const TQStringList &); ~AdaSupportPart (); - void parseContents (const QString& contents, const QString& fileName); + void parseContents (const TQString& contents, const TQString& fileName); protected: Features features (); KMimeType::List mimeTypes (); - QStringList fileExtensions (); + TQStringList fileExtensions (); private slots: void projectOpened (); void projectClosed (); - void addedFilesToProject (const QStringList &fileList); - void removedFilesFromProject (const QStringList &fileList); - void changedFilesInProject( const QStringList &fileList ); + void addedFilesToProject (const TQStringList &fileList); + void removedFilesFromProject (const TQStringList &fileList); + void changedFilesInProject( const TQStringList &fileList ); void initialParse (); void savedFile (const KURL&); private: - void maybeParse (const QString &fileName); - void parse (const QString &fileName); + void maybeParse (const TQString &fileName); + void parse (const TQString &fileName); void saveProjectSourceInfo( ); private: diff --git a/languages/ada/addclass.cpp b/languages/ada/addclass.cpp index 5a5ccb13..ee28ff93 100644 --- a/languages/ada/addclass.cpp +++ b/languages/ada/addclass.cpp @@ -2,13 +2,13 @@ #include <sys/types.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qtextedit.h> -#include <qtextstream.h> -#include <qregexp.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqtextedit.h> +#include <tqtextstream.h> +#include <tqregexp.h> +#include <tqfile.h> +#include <tqfileinfo.h> #include <klineedit.h> @@ -30,10 +30,10 @@ AddClassInfo::AddClassInfo() } -QString AddClassInfo::adaFileName() const +TQString AddClassInfo::adaFileName() const { - QString dest = className; - dest.replace(QRegExp("\\."), "/"); + TQString dest = className; + dest.replace(TQRegExp("\\."), "/"); return sourceDir + "/" + dest + ".ada"; } @@ -55,7 +55,7 @@ AddClassInfo &AddClass::info() } -void AddClass::setBaseClasses(const QStringList &classes) +void AddClass::setBaseClasses(const TQStringList &classes) { m_baseClasses = classes; } @@ -65,7 +65,7 @@ bool AddClass::showDialog() { AddClassDlg dlg; - QString dir = m_info.projectDir; + TQString dir = m_info.projectDir; if (m_info.sourceDir.isEmpty()) m_info.sourceDir = "src"; if (dir.isEmpty()) @@ -100,7 +100,7 @@ bool AddClass::showDialog() dlg.Documentation->setText(m_info.documentation); dlg.License->setEditText(m_info.license); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) { m_info.projectDir = ""; m_info.sourceDir = dlg.SourcePath->text(); @@ -130,17 +130,17 @@ bool AddClass::showDialog() } -static bool makeDirs(const QString &dest) +static bool makeDirs(const TQString &dest) { - QStringList dirs = QStringList::split("/", dest); + TQStringList dirs = TQStringList::split("/", dest); - QString d = ""; + TQString d = ""; - for (QStringList::Iterator it=dirs.begin(); it != dirs.end(); ++it) + for (TQStringList::Iterator it=dirs.begin(); it != dirs.end(); ++it) { d = d + "/" + *it; - QFileInfo fi(d); + TQFileInfo fi(d); if (fi.exists() && !fi.isDir()) { @@ -149,7 +149,7 @@ static bool makeDirs(const QString &dest) } if (!fi.exists()) - if (::mkdir(QFile::encodeName(d), 0755) != 0) + if (::mkdir(TQFile::encodeName(d), 0755) != 0) return false; } @@ -159,7 +159,7 @@ static bool makeDirs(const QString &dest) bool AddClass::generate() { - QString code; + TQString code; // license @@ -204,7 +204,7 @@ bool AddClass::generate() } // find class and package name - QString className, packageName; + TQString className, packageName; int i = m_info.className.findRev('.'); if (i == -1) @@ -228,7 +228,7 @@ bool AddClass::generate() { code += "/**\n"; - QTextStream ts(&m_info.documentation, IO_ReadOnly); + TQTextStream ts(&m_info.documentation, IO_ReadOnly); while (!ts.eof()) code += " * " + ts.readLine() + "\n"; @@ -283,7 +283,7 @@ bool AddClass::generate() { code += " implements "; unsigned int c=0; - for (QStringList::Iterator it = m_info.implements.begin(); it != m_info.implements.end(); ++it, c++) + for (TQStringList::Iterator it = m_info.implements.begin(); it != m_info.implements.end(); ++it, c++) { code += *it; if (c+1 < m_info.implements.count()) @@ -321,8 +321,8 @@ bool AddClass::generate() // create directories - QString dest = packageName; - dest.replace(QRegExp("\\."), "/"); + TQString dest = packageName; + dest.replace(TQRegExp("\\."), "/"); dest = m_info.sourceDir + "/" + dest; if (!makeDirs(dest)) @@ -330,19 +330,19 @@ bool AddClass::generate() // write out the file - if (QFile::exists(m_info.adaFileName())) + if (TQFile::exists(m_info.adaFileName())) { /// @todo ask before overwriting! } - QFile of(m_info.adaFileName()); + TQFile of(m_info.adaFileName()); if (!of.open(IO_WriteOnly)) { /// @todo message to user return false; } - QTextStream os(&of); + TQTextStream os(&of); os << code; of.close(); diff --git a/languages/ada/addclass.h b/languages/ada/addclass.h index 7bcfd370..e3ce8858 100644 --- a/languages/ada/addclass.h +++ b/languages/ada/addclass.h @@ -2,8 +2,8 @@ #define __ADDCLASS_H__ -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> class AddClassInfo @@ -14,17 +14,17 @@ public: enum Visibility { PublicClass, ProtectedClass, PrivateClass}; - QString className; - QString extends; + TQString className; + TQString extends; bool interfaceOpt, abstractOpt, finalOpt; - QString projectDir, sourceDir; + TQString projectDir, sourceDir; Visibility visibility; - QStringList implements; + TQStringList implements; bool createConstructor, createMain; - QString documentation; - QString license; + TQString documentation; + TQString license; - QString adaFileName() const; + TQString adaFileName() const; }; @@ -38,7 +38,7 @@ public: void setInfo(const AddClassInfo &info); AddClassInfo &info(); - void setBaseClasses(const QStringList &classes); + void setBaseClasses(const TQStringList &classes); bool showDialog(); bool generate(); @@ -47,7 +47,7 @@ public: private: AddClassInfo m_info; - QStringList m_baseClasses; + TQStringList m_baseClasses; }; diff --git a/languages/ada/backgroundparser.cpp b/languages/ada/backgroundparser.cpp index f94f3216..68607851 100644 --- a/languages/ada/backgroundparser.cpp +++ b/languages/ada/backgroundparser.cpp @@ -15,15 +15,15 @@ #include "AdaParser.hpp" #include "AdaAST.hpp" #include <kdebug.h> -#include <qfile.h> +#include <tqfile.h> #include <config.h> #include <sstream> BackgroundParser::BackgroundParser( ProblemReporter* reporter, - const QString& source, - const QString& filename ) + const TQString& source, + const TQString& filename ) : m_reporter( reporter ), m_source( source.unicode(), source.length() ), m_fileName( filename ) @@ -36,7 +36,7 @@ BackgroundParser::~BackgroundParser() void BackgroundParser::run() { - QCString _fn = QFile::encodeName(m_fileName); + TQCString _fn = TQFile::encodeName(m_fileName); std::string fn( _fn.data() ); std::istringstream stream( m_source.utf8().data() ); @@ -64,7 +64,7 @@ void BackgroundParser::run() } catch( antlr::ANTLRException& ex ){ kdDebug() << "*exception*: " << ex.toString().c_str() << endl; - m_reporter->reportError( QString::fromLatin1( ex.getMessage().c_str() ), + m_reporter->reportError( TQString::fromLatin1( ex.getMessage().c_str() ), m_fileName, lexer.getLine(), lexer.getColumn() ); diff --git a/languages/ada/backgroundparser.h b/languages/ada/backgroundparser.h index 0b4eef16..3c41d450 100644 --- a/languages/ada/backgroundparser.h +++ b/languages/ada/backgroundparser.h @@ -13,8 +13,8 @@ #ifndef BACKGROUNDPARSER_H #define BACKGROUNDPARSER_H -#include <qthread.h> -#include <qstring.h> +#include <tqthread.h> +#include <tqstring.h> #include <kdebug.h> class ProblemReporter; @@ -22,16 +22,16 @@ class ProblemReporter; class BackgroundParser: public QThread{ public: BackgroundParser( ProblemReporter* reporter, - const QString& source, - const QString& filename ); + const TQString& source, + const TQString& filename ); virtual ~BackgroundParser(); virtual void run(); private: ProblemReporter* m_reporter; - QString m_source; - QString m_fileName; + TQString m_source; + TQString m_fileName; }; #endif diff --git a/languages/ada/problemreporter.cpp b/languages/ada/problemreporter.cpp index 61109775..652d5a6b 100644 --- a/languages/ada/problemreporter.cpp +++ b/languages/ada/problemreporter.cpp @@ -24,7 +24,7 @@ #include "configproblemreporter.h" #include "backgroundparser.h" -#include <qfileinfo.h> +#include <tqfileinfo.h> #include <kdeversion.h> #include <kparts/part.h> @@ -43,24 +43,24 @@ #include <kconfig.h> -#include <qtimer.h> -#include <qregexp.h> -#include <qvbox.h> -#include <qwhatsthis.h> +#include <tqtimer.h> +#include <tqregexp.h> +#include <tqvbox.h> +#include <tqwhatsthis.h> #include <kdialogbase.h> class ProblemItem: public QListViewItem{ public: - ProblemItem( QListView* parent, const QString& level, const QString& problem, - const QString& file, const QString& line, const QString& column ) - : QListViewItem( parent, level, problem, file, line, column ) {} + ProblemItem( TQListView* parent, const TQString& level, const TQString& problem, + const TQString& file, const TQString& line, const TQString& column ) + : TQListViewItem( parent, level, problem, file, line, column ) {} - ProblemItem( QListViewItem* parent, const QString& level, const QString& problem, - const QString& file, const QString& line, const QString& column ) - : QListViewItem( parent, level, problem, file, line, column ) {} + ProblemItem( TQListViewItem* parent, const TQString& level, const TQString& problem, + const TQString& file, const TQString& line, const TQString& column ) + : TQListViewItem( parent, level, problem, file, line, column ) {} - int compare( QListViewItem* item, int column, bool ascending ) const { + int compare( TQListViewItem* item, int column, bool ascending ) const { if( column == 3 || column == 4 ){ int a = text( column ).toInt(); int b = item->text( column ).toInt(); @@ -68,20 +68,20 @@ public: return 0; return( a > b ? -1 : 1 ); } - return QListViewItem::compare( item, column, ascending ); + return TQListViewItem::compare( item, column, ascending ); } }; -ProblemReporter::ProblemReporter( AdaSupportPart* part, QWidget* parent, const char* name ) - : QListView( parent, name ), +ProblemReporter::ProblemReporter( AdaSupportPart* part, TQWidget* parent, const char* name ) + : TQListView( parent, name ), m_adaSupport( part ), m_editor( 0 ), m_document( 0 ), m_markIface( 0 ), m_bgParser( 0 ) { - QWhatsThis::add(this, i18n("<b>Problem reporter</b><p>This window shows errors reported by a language parser.")); + TQWhatsThis::add(this, i18n("<b>Problem reporter</b><p>This window shows errors reported by a language parser.")); addColumn( i18n("Level") ); addColumn( i18n("Problem") ); @@ -90,21 +90,21 @@ ProblemReporter::ProblemReporter( AdaSupportPart* part, QWidget* parent, const c //addColumn( i18n("Column") ); setAllColumnsShowFocus( TRUE ); - m_timer = new QTimer( this ); + m_timer = new TQTimer( this ); - connect( part->partController(), SIGNAL(activePartChanged(KParts::Part*)), - this, SLOT(slotActivePartChanged(KParts::Part*)) ); - connect( part->partController(), SIGNAL(partAdded(KParts::Part*)), - this, SLOT(slotPartAdded(KParts::Part*)) ); - connect( part->partController(), SIGNAL(partRemoved(KParts::Part*)), - this, SLOT(slotPartRemoved(KParts::Part*)) ); + connect( part->partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), + this, TQT_SLOT(slotActivePartChanged(KParts::Part*)) ); + connect( part->partController(), TQT_SIGNAL(partAdded(KParts::Part*)), + this, TQT_SLOT(slotPartAdded(KParts::Part*)) ); + connect( part->partController(), TQT_SIGNAL(partRemoved(KParts::Part*)), + this, TQT_SLOT(slotPartRemoved(KParts::Part*)) ); - connect( m_timer, SIGNAL(timeout()), this, SLOT(reparse()) ); + connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(reparse()) ); - connect( this, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotSelected(QListViewItem*)) ); - connect( this, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotSelected(QListViewItem*)) ); + connect( this, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotSelected(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotSelected(TQListViewItem*)) ); configure(); } @@ -134,7 +134,7 @@ void ProblemReporter::slotActivePartChanged( KParts::Part* part ) m_editor = dynamic_cast<KTextEditor::EditInterface*>( part ); if( m_editor ) - connect( m_document, SIGNAL(textChanged()), this, SLOT(slotTextChanged()) ); + connect( m_document, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()) ); m_markIface = dynamic_cast<KTextEditor::MarkInterface*>( part ); @@ -166,9 +166,9 @@ void ProblemReporter::reparse() m_bgParser = 0; } - QListViewItem* current = firstChild(); + TQListViewItem* current = firstChild(); while( current ){ - QListViewItem* i = current; + TQListViewItem* i = current; current = current->nextSibling(); if( i->text(2) == m_filename ) @@ -176,8 +176,8 @@ void ProblemReporter::reparse() } if( m_markIface ){ - QPtrList<KTextEditor::Mark> marks = m_markIface->marks(); - QPtrListIterator<KTextEditor::Mark> it( marks ); + TQPtrList<KTextEditor::Mark> marks = m_markIface->marks(); + TQPtrListIterator<KTextEditor::Mark> it( marks ); while( it.current() ){ m_markIface->removeMark( it.current()->line, KTextEditor::MarkInterface::markType07 ); ++it; @@ -185,7 +185,7 @@ void ProblemReporter::reparse() } /* Temporarily deactivated (crashes)*/ - if (!m_adaSupport->fileExtensions ().contains (QFileInfo (m_filename).extension ())) + if (!m_adaSupport->fileExtensions ().contains (TQFileInfo (m_filename).extension ())) { m_bgParser = new BackgroundParser( this, m_editor->text(), m_filename ); m_bgParser->start(); @@ -193,7 +193,7 @@ void ProblemReporter::reparse() /**/ } -void ProblemReporter::slotSelected( QListViewItem* item ) +void ProblemReporter::slotSelected( TQListViewItem* item ) { KURL url( item->text(2) ); int line = item->text( 3 ).toInt(); @@ -201,8 +201,8 @@ void ProblemReporter::slotSelected( QListViewItem* item ) m_adaSupport->partController()->editDocument( url, line-1 ); } -void ProblemReporter::reportError( QString message, - QString filename, +void ProblemReporter::reportError( TQString message, + TQString filename, int line, int column ) { if( m_markIface ){ @@ -211,34 +211,34 @@ void ProblemReporter::reportError( QString message, new ProblemItem( this, "error", - message.replace( QRegExp("\n"), "" ), + message.replace( TQRegExp("\n"), "" ), filename, - QString::number( line ), - QString::number( column ) ); + TQString::number( line ), + TQString::number( column ) ); } -void ProblemReporter::reportWarning( QString message, - QString filename, +void ProblemReporter::reportWarning( TQString message, + TQString filename, int line, int column ) { new ProblemItem( this, "warning", - message.replace( QRegExp("\n"), "" ), + message.replace( TQRegExp("\n"), "" ), filename, - QString::number( line ), - QString::number( column ) ); + TQString::number( line ), + TQString::number( column ) ); } -void ProblemReporter::reportMessage( QString message, - QString filename, +void ProblemReporter::reportMessage( TQString message, + TQString filename, int line, int column ) { - new QListViewItem( this, + new TQListViewItem( this, "message", - message.replace( QRegExp("\n"), "" ), + message.replace( TQRegExp("\n"), "" ), filename, - QString::number( line ), - QString::number( column ) ); + TQString::number( line ), + TQString::number( column ) ); } void ProblemReporter::configure() @@ -253,10 +253,10 @@ void ProblemReporter::configure() void ProblemReporter::configWidget( KDialogBase* dlg ) { kdDebug() << "ProblemReporter::configWidget()" << endl; - QVBox *vbox = dlg->addVBoxPage(i18n("Ada Parsing"), i18n("Ada Parsing"), BarIcon( "source", KIcon::SizeMedium )); + TQVBox *vbox = dlg->addVBoxPage(i18n("Ada Parsing"), i18n("Ada Parsing"), BarIcon( "source", KIcon::SizeMedium )); ConfigureProblemReporter* w = new ConfigureProblemReporter( vbox ); - connect(dlg, SIGNAL(okClicked()), w, SLOT(accept())); - connect(dlg, SIGNAL(okClicked()), this, SLOT(configure())); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); + connect(dlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(configure())); } void ProblemReporter::slotPartAdded( KParts::Part* part ) diff --git a/languages/ada/problemreporter.h b/languages/ada/problemreporter.h index a3d70135..c2a112aa 100644 --- a/languages/ada/problemreporter.h +++ b/languages/ada/problemreporter.h @@ -20,7 +20,7 @@ #ifndef PROBLEMSREPORTER_H #define PROBLEMSREPORTER_H -#include <qlistview.h> +#include <tqlistview.h> class AdaSupportPart; class QTimer; @@ -40,16 +40,16 @@ namespace KTextEditor{ class ProblemReporter: public QListView{ Q_OBJECT public: - ProblemReporter( AdaSupportPart* part, QWidget* parent=0, const char* name=0 ); + ProblemReporter( AdaSupportPart* part, TQWidget* parent=0, const char* name=0 ); virtual ~ProblemReporter(); - virtual void reportError( QString message, QString filename, + virtual void reportError( TQString message, TQString filename, int line, int column ); - virtual void reportWarning( QString message, QString filename, + virtual void reportWarning( TQString message, TQString filename, int line, int column ); - virtual void reportMessage( QString message, QString filename, + virtual void reportMessage( TQString message, TQString filename, int line, int column ); public slots: @@ -62,15 +62,15 @@ private slots: void slotPartRemoved( KParts::Part* ); void slotActivePartChanged( KParts::Part* ); void slotTextChanged(); - void slotSelected( QListViewItem* ); + void slotSelected( TQListViewItem* ); private: AdaSupportPart* m_adaSupport; KTextEditor::EditInterface* m_editor; KTextEditor::Document* m_document; KTextEditor::MarkInterface* m_markIface; - QTimer* m_timer; - QString m_filename; + TQTimer* m_timer; + TQString m_filename; int m_active; int m_delay; BackgroundParser* m_bgParser; |