diff options
Diffstat (limited to 'languages/ada/adasupportpart.cpp')
-rw-r--r-- | languages/ada/adasupportpart.cpp | 114 |
1 files changed, 57 insertions, 57 deletions
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 ); |