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/cpp/cppsupportpart.cpp | |
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/cpp/cppsupportpart.cpp')
-rw-r--r-- | languages/cpp/cppsupportpart.cpp | 812 |
1 files changed, 406 insertions, 406 deletions
diff --git a/languages/cpp/cppsupportpart.cpp b/languages/cpp/cppsupportpart.cpp index f72b168c..334c7d6c 100644 --- a/languages/cpp/cppsupportpart.cpp +++ b/languages/cpp/cppsupportpart.cpp @@ -55,21 +55,21 @@ #include "configproblemreporter.h" #include "codeinformationrepository.h" -#include <qeventloop.h> -#include <qheader.h> -#include <qdir.h> -#include <qdom.h> -#include <qfileinfo.h> -#include <qguardedptr.h> -#include <qpopupmenu.h> -#include <qprogressdialog.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qstatusbar.h> -#include <qprogressbar.h> -#include <qregexp.h> -#include <qlabel.h> -#include <qvbox.h> +#include <tqeventloop.h> +#include <tqheader.h> +#include <tqdir.h> +#include <tqdom.h> +#include <tqfileinfo.h> +#include <tqguardedptr.h> +#include <tqpopupmenu.h> +#include <tqprogressdialog.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqstatusbar.h> +#include <tqprogressbar.h> +#include <tqregexp.h> +#include <tqlabel.h> +#include <tqvbox.h> #include <kmessagebox.h> #include <kaction.h> #include <kapplication.h> @@ -110,11 +110,11 @@ const bool alwaysParseInBackground = true; enum { KDEV_DB_VERSION = 21 }; enum { KDEV_PCS_VERSION = 18 }; -QStringList CppSupportPart::m_sourceMimeTypes = QStringList() << "text/x-csrc" << "text/x-c++src"; -QStringList CppSupportPart::m_headerMimeTypes = QStringList() << "text/x-chdr" << "text/x-c++hdr"; +TQStringList CppSupportPart::m_sourceMimeTypes = TQStringList() << "text/x-csrc" << "text/x-c++src"; +TQStringList CppSupportPart::m_headerMimeTypes = TQStringList() << "text/x-chdr" << "text/x-c++hdr"; -QStringList CppSupportPart::m_sourceExtensions = QStringList::split( ",", "c,C,cc,cpp,c++,cxx,m,mm,M" ); -QStringList CppSupportPart::m_headerExtensions = QStringList::split( ",", "h,H,hh,h++,hxx,hpp,inl,tlh,diff,ui.h" ); +TQStringList CppSupportPart::m_sourceExtensions = TQStringList::split( ",", "c,C,cc,cpp,c++,cxx,m,mm,M" ); +TQStringList CppSupportPart::m_headerExtensions = TQStringList::split( ",", "h,H,hh,h++,hxx,hpp,inl,tlh,diff,ui.h" ); class CppDriver: public KDevDriver { @@ -132,8 +132,8 @@ public: { cppSupport() ->problemReporter() ->removeAllProblems( fileName.fileName() ); - QValueList<Problem> pl = problems( fileName.fileName() ); - QValueList<Problem>::ConstIterator it = pl.begin(); + TQValueList<Problem> pl = problems( fileName.fileName() ); + TQValueList<Problem>::ConstIterator it = pl.begin(); while ( it != pl.end() ) { const Problem & p = *it++; @@ -156,11 +156,11 @@ public: if( cppSupport()->_jd ) { cppSupport()->_jd->backgroundState ++; - cppSupport()->_jd->lastParse = QTime::currentTime(); + cppSupport()->_jd->lastParse = TQTime::currentTime(); } - QFileInfo fileInfo( fileName.fileName() ); - QString path = URLUtil::canonicalPath( fileName.fileName() ); + TQFileInfo fileInfo( fileName.fileName() ); + TQString path = URLUtil::canonicalPath( fileName.fileName() ); cppSupport()->m_timestamp[ path ] = fileInfo.lastModified(); @@ -191,7 +191,7 @@ public: }; -CppSupportPart::CppSupportPart( QObject *parent, const char *name, const QStringList &args ) +CppSupportPart::CppSupportPart( TQObject *parent, const char *name, const TQStringList &args ) : KDevLanguageSupport( CppSupportFactory::info(), parent, name ? name : "KDevCppSupport" ), m_backgroundParser(0), m_activeDocument( 0 ), m_activeView( 0 ), m_activeSelection( 0 ), m_activeEditor( 0 ), m_activeViewCursor( 0 ), m_projectClosed( true ), m_projectClosing( false ), m_valid( false ), m_isTyping( false ), m_hadErrors( false ), @@ -201,10 +201,10 @@ CppSupportPart::CppSupportPart( QObject *parent, const char *name, const QString m_pCompletionConfig = new CppCodeCompletionConfig( this, projectDom() ); m_pSplitHeaderSourceConfig = new CppSplitHeaderSourceConfig( this, projectDom() ); - m_pCreateGetterSetterConfiguration = new CreateGetterSetterConfiguration( this ); connect( m_pSplitHeaderSourceConfig, SIGNAL( stored() ), - this, SLOT( splitHeaderSourceConfigStored() ) ); - connect( m_pCompletionConfig, SIGNAL( stored() ), - this, SLOT( codeCompletionConfigStored() ) ); + m_pCreateGetterSetterConfiguration = new CreateGetterSetterConfiguration( this ); connect( m_pSplitHeaderSourceConfig, TQT_SIGNAL( stored() ), + this, TQT_SLOT( splitHeaderSourceConfigStored() ) ); + connect( m_pCompletionConfig, TQT_SIGNAL( stored() ), + this, TQT_SLOT( codeCompletionConfigStored() ) ); m_qtBuildConfig = new QtBuildConfig( this, projectDom() ); m_qtBuildConfig->store(); @@ -214,45 +214,45 @@ CppSupportPart::CppSupportPart( QObject *parent, const char *name, const QString m_driver = new CppDriver( this ); m_problemReporter = 0; - m_textChangedTimer = new QTimer( this ); - connect( m_textChangedTimer, SIGNAL(timeout()), this, SLOT(slotParseCurrentFile()) ); + m_textChangedTimer = new TQTimer( this ); + connect( m_textChangedTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotParseCurrentFile()) ); - m_cursorMovedTimer = new QTimer( this ); - connect( m_cursorMovedTimer, SIGNAL(timeout()), this, SLOT(slotCursorPositionChanged()) ); + m_cursorMovedTimer = new TQTimer( this ); + connect( m_cursorMovedTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCursorPositionChanged()) ); -// m_deleteParserStoreTimer = new QTimer( this ); - m_saveMemoryTimer = new QTimer( this ); - m_buildSafeFileSetTimer = new QTimer( this ); -// m_functionHintTimer = new QTimer( this ); - connect( m_buildSafeFileSetTimer, SIGNAL(timeout()), this, SLOT(buildSafeFileSet()) ); - connect( m_saveMemoryTimer, SIGNAL(timeout()), this, SLOT(slotSaveMemory()) ); -// connect( m_deleteParserStoreTimer, SIGNAL(timeout()), this, SLOT(slotDeleteParserStore()) ); +// m_deleteParserStoreTimer = new TQTimer( this ); + m_saveMemoryTimer = new TQTimer( this ); + m_buildSafeFileSetTimer = new TQTimer( this ); +// m_functionHintTimer = new TQTimer( this ); + connect( m_buildSafeFileSetTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(buildSafeFileSet()) ); + connect( m_saveMemoryTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotSaveMemory()) ); +// connect( m_deleteParserStoreTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDeleteParserStore()) ); resetParserStoreTimer(); m_saveMemoryTimer->start( 240000, false ); //Free some memory every 4 minutes - // connect( m_functionHintTimer, SIGNAL(timeout()), this, SLOT(slotFunctionHint()) ); + // connect( m_functionHintTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotFunctionHint()) ); setXMLFile( "kdevcppsupport.rc" ); m_catalogList.setAutoDelete( true ); - connect( core(), SIGNAL( projectOpened() ), this, SLOT( projectOpened() ) ); - connect( core(), SIGNAL( projectClosed() ), this, SLOT( projectClosed() ) ); - connect( core(), SIGNAL( languageChanged() ), this, SLOT( projectOpened() ) ); - connect( partController(), SIGNAL( savedFile( const KURL& ) ), - this, SLOT( savedFile( const KURL& ) ) ); - connect( core(), SIGNAL( contextMenu( QPopupMenu *, const Context * ) ), - this, SLOT( contextMenu( QPopupMenu *, const Context * ) ) ); - connect( partController(), SIGNAL( activePartChanged( KParts::Part* ) ), - this, SLOT( activePartChanged( KParts::Part* ) ) ); - connect( partController(), SIGNAL( partRemoved( KParts::Part* ) ), - this, SLOT( partRemoved( KParts::Part* ) ) ); - - connect( core(), SIGNAL( configWidget( KDialogBase* ) ), - this, SLOT( configWidget( KDialogBase* ) ) ); + connect( core(), TQT_SIGNAL( projectOpened() ), this, TQT_SLOT( projectOpened() ) ); + connect( core(), TQT_SIGNAL( projectClosed() ), this, TQT_SLOT( projectClosed() ) ); + connect( core(), TQT_SIGNAL( languageChanged() ), this, TQT_SLOT( projectOpened() ) ); + connect( partController(), TQT_SIGNAL( savedFile( const KURL& ) ), + this, TQT_SLOT( savedFile( const KURL& ) ) ); + connect( core(), TQT_SIGNAL( contextMenu( TQPopupMenu *, const Context * ) ), + this, TQT_SLOT( contextMenu( TQPopupMenu *, const Context * ) ) ); + connect( partController(), TQT_SIGNAL( activePartChanged( KParts::Part* ) ), + this, TQT_SLOT( activePartChanged( KParts::Part* ) ) ); + connect( partController(), TQT_SIGNAL( partRemoved( KParts::Part* ) ), + this, TQT_SLOT( partRemoved( KParts::Part* ) ) ); + + connect( core(), TQT_SIGNAL( configWidget( KDialogBase* ) ), + this, TQT_SLOT( configWidget( KDialogBase* ) ) ); m_switchHeaderSourceAction = new KAction( i18n( "Switch Header/Implementation" ), SHIFT + Key_F12, - this, SLOT( slotSwitchHeader() ), + this, TQT_SLOT( slotSwitchHeader() ), actionCollection(), "edit_switchheader" ); m_switchHeaderSourceAction->setToolTip( i18n( "Switch between header and implementation files" ) ); m_switchHeaderSourceAction->setWhatsThis( i18n( "<b>Switch Header/Implementation</b><p>" @@ -265,7 +265,7 @@ CppSupportPart::CppSupportPart( QObject *parent, const char *name, const QString KAction *action; action = new KAction( i18n( "Complete Text" ), CTRL + Key_Space, - this, SLOT( slotCompleteText() ), + this, TQT_SLOT( slotCompleteText() ), actionCollection(), "edit_complete_text" ); action->setToolTip( i18n( "Complete current expression" ) ); action->setWhatsThis( i18n( "<b>Complete Text</p><p>Completes current expression using " @@ -274,11 +274,11 @@ CppSupportPart::CppSupportPart( QObject *parent, const char *name, const QString action->setEnabled( false ); m_createGetterSetterAction = new KAction( i18n( "Create Accessor Methods" ), 0, - this, SLOT( slotCreateAccessMethods() ), actionCollection(), + this, TQT_SLOT( slotCreateAccessMethods() ), actionCollection(), "edit_create_getter_setter" ); action = new KAction( i18n( "Make Member" ), 0, Key_F2, - this, SLOT( slotMakeMember() ), + this, TQT_SLOT( slotMakeMember() ), actionCollection(), "edit_make_member" ); action->setToolTip( i18n( "Make member" ) ); action->setWhatsThis( i18n( "<b>Make member</b><p>Creates a class member function in implementation file " @@ -286,7 +286,7 @@ CppSupportPart::CppSupportPart( QObject *parent, const char *name, const QString action->plug( &m_DummyActionWidget ); action = new KAction( i18n( "Navigation Menu" ), 0, CTRL + ALT + Key_Space, - this, SLOT( slotNavigate() ), + this, TQT_SLOT( slotNavigate() ), actionCollection(), "edit_navigate" ); action->setToolTip( i18n( "Show the navigation-menu" ) ); action->setWhatsThis( i18n( "<b>Navigate</b><p>Shows a navigation-menu based on the type-evaluation of the item under the cursor." ) ); @@ -294,7 +294,7 @@ CppSupportPart::CppSupportPart( QObject *parent, const char *name, const QString action = new KAction( i18n( "New Class..." ), "classnew", 0, - this, SLOT( slotNewClass() ), + this, TQT_SLOT( slotNewClass() ), actionCollection(), "project_newclass" ); action->setToolTip( i18n( "Generate a new class" ) ); action->setWhatsThis( i18n( "<b>New Class</b><p>Calls the <b>New Class</b> wizard." ) ); @@ -306,8 +306,8 @@ CppSupportPart::CppSupportPart( QObject *parent, const char *name, const QString withcpp = true; // daniel - connect( core( ), SIGNAL( projectConfigWidget( KDialogBase* ) ), this, - SLOT( projectConfigWidget( KDialogBase* ) ) ); + connect( core( ), TQT_SIGNAL( projectConfigWidget( KDialogBase* ) ), this, + TQT_SLOT( projectConfigWidget( KDialogBase* ) ) ); new KDevCppSupportIface( this ); //(void) dcopClient(); @@ -336,7 +336,7 @@ CppSupportPart::~CppSupportPart() codeRepository() ->setMainCatalog( 0 ); - QPtrListIterator<Catalog> it( m_catalogList ); + TQPtrListIterator<Catalog> it( m_catalogList ); while ( Catalog * catalog = it.current() ) { ++it; @@ -361,11 +361,11 @@ CppSupportPart::~CppSupportPart() } -void CppSupportPart::customEvent( QCustomEvent* ev ) +void CppSupportPart::customEvent( TQCustomEvent* ev ) { kdDebug( 9007 ) << "CppSupportPart::customEvent(" << ev->type() << ")" << endl; - QTime t; + TQTime t; t.start(); bool fromDisk = false; @@ -375,14 +375,14 @@ void CppSupportPart::customEvent( QCustomEvent* ev ) FileParsedEvent * event = ( FileParsedEvent* ) ev; fromDisk = event->fromDisk(); - QString fileName = event->fileName(); + TQString fileName = event->fileName(); bool hasErrors = false; if ( m_problemReporter ) { m_problemReporter->removeAllProblems( fileName ); - QValueList<Problem> problems = event->problems(); - QValueList<Problem>::ConstIterator it = problems.begin(); + TQValueList<Problem> problems = event->problems(); + TQValueList<Problem>::ConstIterator it = problems.begin(); while ( it != problems.end() ) { const Problem & p = *it++; @@ -413,7 +413,7 @@ void CppSupportPart::customEvent( QCustomEvent* ev ) //Increase status-bar if( p.hasFlag( ParseEmitWaiting::Silent ) && _jd ) { _jd->backgroundState ++; - _jd->lastParse = QTime::currentTime(); + _jd->lastParse = TQTime::currentTime(); } } else { @@ -424,7 +424,7 @@ void CppSupportPart::customEvent( QCustomEvent* ev ) //Increase status-bar if( p.hasFlag( ParseEmitWaiting::Silent ) && _jd ) { _jd->backgroundState ++; - _jd->lastParse = QTime::currentTime(); + _jd->lastParse = TQTime::currentTime(); } } } @@ -433,26 +433,26 @@ void CppSupportPart::customEvent( QCustomEvent* ev ) void CppSupportPart::projectConfigWidget( KDialogBase* dlg ) { - QVBox * vbox = 0; + TQVBox * vbox = 0; vbox = dlg->addVBoxPage( i18n( "C++ Support" ), i18n( "C++ Support" ), BarIcon( info() ->icon(), KIcon::SizeMedium ) ); CCConfigWidget* w = new CCConfigWidget( this, vbox ); - connect( dlg, SIGNAL( okClicked( ) ), w, SLOT( accept( ) ) ); + connect( dlg, TQT_SIGNAL( okClicked( ) ), w, TQT_SLOT( accept( ) ) ); } void CppSupportPart::configWidget( KDialogBase *dlg ) { - QVBox * vbox = dlg->addVBoxPage( i18n( "C++ Class Generator" ), i18n( "C++ Class Generator" ), + TQVBox * vbox = dlg->addVBoxPage( i18n( "C++ Class Generator" ), i18n( "C++ Class Generator" ), BarIcon( info() ->icon(), KIcon::SizeMedium ) ); ClassGeneratorConfig *w = new ClassGeneratorConfig( vbox, "classgenerator config widget" ); - connect( dlg, SIGNAL( okClicked() ), w, SLOT( storeConfig() ) ); + connect( dlg, TQT_SIGNAL( okClicked() ), w, TQT_SLOT( storeConfig() ) ); vbox = dlg->addVBoxPage(i18n("C++ Parsing"), i18n("C++ Parsing"), BarIcon( "source_cpp", KIcon::SizeMedium) ); ConfigureProblemReporter* ww = new ConfigureProblemReporter( vbox ); ww->setPart( this ); - connect(dlg, SIGNAL(okClicked()), ww, SLOT(accept())); + connect(dlg, TQT_SIGNAL(okClicked()), ww, TQT_SLOT(accept())); } void CppSupportPart::activePartChanged( KParts::Part *part ) @@ -465,11 +465,11 @@ void CppSupportPart::activePartChanged( KParts::Part *part ) if ( m_activeView ) { - disconnect( m_activeView, SIGNAL( cursorPositionChanged() ), this, 0 ); + disconnect( m_activeView, TQT_SIGNAL( cursorPositionChanged() ), this, 0 ); } if ( m_activeDocument ) { - disconnect( m_activeDocument, SIGNAL(textChanged()), this, 0 ); + disconnect( m_activeDocument, TQT_SIGNAL(textChanged()), this, 0 ); } m_isTyping = false; @@ -480,13 +480,13 @@ void CppSupportPart::activePartChanged( KParts::Part *part ) m_activeSelection = dynamic_cast<KTextEditor::SelectionInterface*>( part ); m_activeViewCursor = dynamic_cast<KTextEditor::ViewCursorInterface*>( m_activeView ); - m_activeFileName = QString::null; + m_activeFileName = TQString::null; if ( m_activeDocument ) { m_activeFileName = URLUtil::canonicalPath( m_activeDocument->url().path() ); - QFileInfo fi( m_activeFileName ); - QString ext = fi.extension(); + TQFileInfo fi( m_activeFileName ); + TQString ext = fi.extension(); if ( isSource( m_activeFileName ) || isHeader( m_activeFileName ) ) enabled = true; } @@ -500,14 +500,14 @@ void CppSupportPart::activePartChanged( KParts::Part *part ) if ( m_activeDocument ) { - connect( m_activeDocument, SIGNAL(textChanged()), this, SLOT(slotTextChanged()) ); + connect( m_activeDocument, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()) ); m_textChangedTimer->start( 250, true ); // kick the parse timer, we might want to parse the current file } if ( m_activeViewCursor ) { - connect( m_activeView, SIGNAL( cursorPositionChanged() ), this, SLOT(slotCursorMoved()) ); -// this, SLOT( slotCursorPositionChanged() ) ); + connect( m_activeView, TQT_SIGNAL( cursorPositionChanged() ), this, TQT_SLOT(slotCursorMoved()) ); +// this, TQT_SLOT( slotCursorPositionChanged() ) ); } @@ -516,8 +516,8 @@ void CppSupportPart::activePartChanged( KParts::Part *part ) if ( !textHintIface ) return ; - connect( view, SIGNAL( needTextHint( int, int, QString& ) ), - this, SLOT( slotNeedTextHint( int, int, QString& ) ) ); + connect( view, TQT_SIGNAL( needTextHint( int, int, TQString& ) ), + this, TQT_SLOT( slotNeedTextHint( int, int, TQString& ) ) ); textHintIface->enableTextHints( 1000 ); #endif @@ -537,11 +537,11 @@ void CppSupportPart::projectOpened( ) kdDebug( 9007 ) << "projectOpened( )" << endl; m_backgroundParser = new BackgroundParser( this, &m_eventConsumed ); - m_backgroundParser->start( QThread::IdlePriority ); + m_backgroundParser->start( TQThread::IdlePriority ); // setup the driver - QString conf_file_name = specialHeaderName(); - if ( QFile::exists( conf_file_name ) ) + TQString conf_file_name = specialHeaderName(); + if ( TQFile::exists( conf_file_name ) ) m_driver->parseFile( conf_file_name, true, true, true ); m_projectDirectory = URLUtil::canonicalPath( project() ->projectDirectory() ); @@ -551,17 +551,17 @@ void CppSupportPart::projectOpened( ) embedProblemReporter(); - connect( core(), SIGNAL( configWidget( KDialogBase* ) ), - m_problemReporter, SLOT( configWidget( KDialogBase* ) ) ); + connect( core(), TQT_SIGNAL( configWidget( KDialogBase* ) ), + m_problemReporter, TQT_SLOT( configWidget( KDialogBase* ) ) ); - 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 & ) ) ); - connect( project(), SIGNAL( projectCompiled() ), - this, SLOT( slotProjectCompiled() ) ); + 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 & ) ) ); + connect( project(), TQT_SIGNAL( projectCompiled() ), + this, TQT_SLOT( slotProjectCompiled() ) ); m_timestamp.clear(); m_parseEmitWaiting.clear(); @@ -573,7 +573,7 @@ void CppSupportPart::projectOpened( ) m_buildSafeFileSetTimer->start( 500, true ); updateParserConfiguration(); //Necessary to respect custom include-paths and such - QTimer::singleShot( 500, this, SLOT( initialParse( ) ) ); + TQTimer::singleShot( 500, this, TQT_SLOT( initialParse( ) ) ); } void CppSupportPart::embedProblemReporter( bool force ) @@ -601,17 +601,17 @@ void CppSupportPart::projectClosed( ) m_projectClosing = true; - QStringList enabledPCSs; - QValueList<Catalog*> catalogs = codeRepository() ->registeredCatalogs(); - for ( QValueList<Catalog*>::Iterator it = catalogs.begin(); it != catalogs.end(); ++it ) + TQStringList enabledPCSs; + TQValueList<Catalog*> catalogs = codeRepository() ->registeredCatalogs(); + for ( TQValueList<Catalog*>::Iterator it = catalogs.begin(); it != catalogs.end(); ++it ) { Catalog* c = *it; if ( c->enabled() ) - enabledPCSs.push_back( QFileInfo( c->dbName() ).baseName(true) ); + enabledPCSs.push_back( TQFileInfo( c->dbName() ).baseName(true) ); } DomUtil::writeListEntry( *project() ->projectDom(), "kdevcppsupport/references", "pcs", enabledPCSs ); - for ( QMap<KInterfaceDesigner::DesignerType, KDevDesignerIntegration*>::const_iterator it = m_designers.begin(); + for ( TQMap<KInterfaceDesigner::DesignerType, KDevDesignerIntegration*>::const_iterator it = m_designers.begin(); it != m_designers.end(); ++it ) { kdDebug( 9007 ) << "calling save settings fro designer integration" << endl; @@ -656,7 +656,7 @@ void CppSupportPart::slotNavigate() { } -void CppSupportPart::contextMenu( QPopupMenu *popup, const Context *context ) +void CppSupportPart::contextMenu( TQPopupMenu *popup, const Context *context ) { m_activeClass = 0; m_activeFunction = 0; @@ -682,12 +682,12 @@ void CppSupportPart::contextMenu( QPopupMenu *popup, const Context *context ) } } - QString text; + TQString text; int atline, atcol; MakeMemberHelper( text, atline, atcol ); if ( !text.isEmpty() ) { - id = popup->insertItem( i18n( "Make Member" ), this, SLOT( slotMakeMember() ) ); + id = popup->insertItem( i18n( "Make Member" ), this, TQT_SLOT( slotMakeMember() ) ); popup->setWhatsThis( id, i18n( "<b>Make member</b><p>Creates a class member function in implementation file " "based on the member declaration at the current line." ) ); } @@ -721,7 +721,7 @@ void CppSupportPart::contextMenu( QPopupMenu *popup, const Context *context ) if ( showContextMenuExplosion ) { //kdDebug( 9007 ) << "CppSupportPart::contextMenu 1" << endl; - QString candidate; + TQString candidate; if ( isSource( m_activeFileName ) ) candidate = sourceOrHeaderCandidate(); else @@ -735,7 +735,7 @@ void CppSupportPart::contextMenu( QPopupMenu *popup, const Context *context ) if ( !candidate.isEmpty() && codeModel() ->hasFile( candidate ) ) { - QPopupMenu * m2 = new QPopupMenu( popup ); + TQPopupMenu * m2 = new TQPopupMenu( popup ); id = popup->insertItem( i18n( "Go to Declaration" ), m2 ); popup->setWhatsThis( id, i18n( "<b>Go to declaration</b><p>Provides a menu to select available function declarations " "in the current file and in the corresponding header (if the current file is an implementation) or source (if the current file is a header) file." ) ); @@ -746,15 +746,15 @@ void CppSupportPart::contextMenu( QPopupMenu *popup, const Context *context ) FunctionList functionList2 = CodeModelUtils::allFunctions( file2 ); for ( FunctionList::ConstIterator it = functionList2.begin(); it != functionList2.end(); ++it ) { - QString text = ( *it ) ->scope().join( "::" ); + TQString text = ( *it ) ->scope().join( "::" ); //kdDebug( 9007 ) << "CppSupportPart::contextMenu 3 text: " << text << endl; if ( !text.isEmpty() ) { text += "::"; } text += formatModelItem( *it, true ); - text = text.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&&" ) ); - int id = m2->insertItem( text, this, SLOT( gotoDeclarationLine( int ) ) ); + text = text.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&&" ) ); + int id = m2->insertItem( text, this, TQT_SLOT( gotoDeclarationLine( int ) ) ); int line, column; ( *it ) ->getStartPosition( &line, &column ); m2->setItemParameter( id, line ); @@ -767,7 +767,7 @@ void CppSupportPart::contextMenu( QPopupMenu *popup, const Context *context ) //kdDebug( 9007 ) << "CppSupportPart::contextMenu 4" << endl; } - QString candidate1; + TQString candidate1; if ( isHeader( m_activeFileName ) ) { candidate1 = sourceOrHeaderCandidate(); @@ -779,7 +779,7 @@ void CppSupportPart::contextMenu( QPopupMenu *popup, const Context *context ) //kdDebug( 9007 ) << "CppSupportPart::go to definition in " << candidate1 << endl; if ( codeModel() ->hasFile( candidate1 ) ) { - QPopupMenu * m = new QPopupMenu( popup ); + TQPopupMenu * m = new TQPopupMenu( popup ); id = popup->insertItem( i18n( "Go to Definition" ), m ); popup->setWhatsThis( id, i18n( "<b>Go to definition</b><p>Provides a menu to select available function definitions " "in the current file and in the corresponding header (if the current file is an implementation) or source (if the current file is a header) file." ) ); @@ -788,14 +788,14 @@ void CppSupportPart::contextMenu( QPopupMenu *popup, const Context *context ) const FunctionDefinitionList functionDefinitionList = CodeModelUtils::allFunctionDefinitionsDetailed( file ).functionList; for ( FunctionDefinitionList::ConstIterator it = functionDefinitionList.begin(); it != functionDefinitionList.end(); ++it ) { - QString text = ( *it ) ->scope().join( "::" ); + TQString text = ( *it ) ->scope().join( "::" ); if ( !text.isEmpty() ) { text += "::"; } text += formatModelItem( *it, true ); - text = text.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&&" ) ); - int id = m->insertItem( text, this, SLOT( gotoLine( int ) ) ); + text = text.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&&" ) ); + int id = m->insertItem( text, this, TQT_SLOT( gotoLine( int ) ) ); int line, column; ( *it ) ->getStartPosition( &line, &column ); m->setItemParameter( id, line ); @@ -810,7 +810,7 @@ void CppSupportPart::contextMenu( QPopupMenu *popup, const Context *context ) } const EditorContext *econtext = static_cast<const EditorContext*>( context ); - QString str = econtext->currentLine(); + TQString str = econtext->currentLine(); if ( str.isEmpty() ) return ; } @@ -821,7 +821,7 @@ void CppSupportPart::contextMenu( QPopupMenu *popup, const Context *context ) if ( mcontext->item() ->isClass() ) { m_activeClass = ( ClassModel* ) mcontext->item(); - int id = popup->insertItem( i18n( "Extract Interface..." ), this, SLOT( slotExtractInterface() ) ); + int id = popup->insertItem( i18n( "Extract Interface..." ), this, TQT_SLOT( slotExtractInterface() ) ); popup->setWhatsThis( id, i18n( "<b>Extract interface</b><p>Extracts interface from the selected class and creates a new class with this interface. " "No implementation code is extracted and no implementation code is created." ) ); } @@ -839,17 +839,17 @@ void CppSupportPart::contextMenu( QPopupMenu *popup, const Context *context ) if ( url.fileName().endsWith( ".ui" ) ) { m_contextFileName = url.path(); - int id = popup->insertItem( i18n( "Create or Select Implementation..." ), this, SLOT( slotCreateSubclass() ) ); + int id = popup->insertItem( i18n( "Create or Select Implementation..." ), this, TQT_SLOT( slotCreateSubclass() ) ); popup->setWhatsThis( id, i18n( "<b>Create or select implementation</b><p>Creates or selects a subclass of selected form for use with integrated KDevDesigner." ) ); } } } -QStringList makeListUnique( const QStringList& rhs ) { - QMap<QString, bool> map; - QStringList ret; - for( QStringList::const_iterator it = rhs.begin(); it != rhs.end(); ++it ) { +TQStringList makeListUnique( const TQStringList& rhs ) { + TQMap<TQString, bool> map; + TQStringList ret; + for( TQStringList::const_iterator it = rhs.begin(); it != rhs.end(); ++it ) { if( map.find( *it ) == map.end() ) { ret << *it; map.insert( *it, true ); @@ -859,18 +859,18 @@ QStringList makeListUnique( const QStringList& rhs ) { } // Makes sure that header files come first -QStringList CppSupportPart::reorder( const QStringList &list ) +TQStringList CppSupportPart::reorder( const TQStringList &list ) { - QStringList headers, others; + TQStringList headers, others; - QStringList headerExtensions = QStringList::split( ",", "h,H,hh,hxx,hpp,tlh" ); + TQStringList headerExtensions = TQStringList::split( ",", "h,H,hh,hxx,hpp,tlh" ); - QString projectPath = project()->projectDirectory(); + TQString projectPath = project()->projectDirectory(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) { - QString filePath = *it; + TQString filePath = *it; // brilliant stuff.. this method is apparently called both with // relative and absolute paths.. if ( !filePath.startsWith("/") ) @@ -878,7 +878,7 @@ QStringList CppSupportPart::reorder( const QStringList &list ) filePath = projectPath + "/" + filePath; } if( !isValidSource( filePath ) ) continue; - if ( headerExtensions.contains( QFileInfo( filePath ).extension() ) ) + if ( headerExtensions.contains( TQFileInfo( filePath ).extension() ) ) headers << ( filePath ); else others << ( filePath ); @@ -887,14 +887,14 @@ QStringList CppSupportPart::reorder( const QStringList &list ) return makeListUnique( headers + others ); } -void CppSupportPart::addedFilesToProject( const QStringList &fileList ) +void CppSupportPart::addedFilesToProject( const TQStringList &fileList ) { m_projectFileList = project() ->allFiles(); - QStringList files = reorder( fileList ); + TQStringList files = reorder( fileList ); - for ( QStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) + for ( TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) { - QString path = *it; + TQString path = *it; if (!path.startsWith("/")) path = URLUtil::canonicalPath( m_projectDirectory + "/" + ( *it ) ); @@ -904,12 +904,12 @@ void CppSupportPart::addedFilesToProject( const QStringList &fileList ) m_buildSafeFileSetTimer->start( 500, true ); } -void CppSupportPart::removedFilesFromProject( const QStringList &fileList ) +void CppSupportPart::removedFilesFromProject( const TQStringList &fileList ) { m_projectFileList = project() ->allFiles(); - for ( QStringList::ConstIterator it = fileList.begin(); it != fileList.end(); ++it ) + for ( TQStringList::ConstIterator it = fileList.begin(); it != fileList.end(); ++it ) { - QString path = URLUtil::canonicalPath( m_projectDirectory + "/" + *it ); + TQString path = URLUtil::canonicalPath( m_projectDirectory + "/" + *it ); kdDebug( 9007 ) << "=====================> remove file: " << path << endl; removeWithReferences( path ); @@ -918,13 +918,13 @@ void CppSupportPart::removedFilesFromProject( const QStringList &fileList ) m_buildSafeFileSetTimer->start( 500, true ); } -void CppSupportPart::changedFilesInProject( const QStringList & fileList ) +void CppSupportPart::changedFilesInProject( const TQStringList & fileList ) { - QStringList files = reorder( fileList ); + TQStringList files = reorder( fileList ); - for ( QStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) + for ( TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) { - QString path = URLUtil::canonicalPath( m_projectDirectory + "/" + *it ); + TQString path = URLUtil::canonicalPath( m_projectDirectory + "/" + *it ); maybeParse( path ); //emit addedSourceInfo( path ); @@ -953,16 +953,16 @@ void CppSupportPart::savedFile( const KURL &file ) #endif } -QString CppSupportPart::findSourceFile() +TQString CppSupportPart::findSourceFile() { // get the path of the currently active document - QFileInfo fi( m_activeFileName ); - QString path = fi.filePath(); - QString ext = fi.extension(); + TQFileInfo fi( m_activeFileName ); + TQString path = fi.filePath(); + TQString ext = fi.extension(); // extract the base path (full path without '.' and extension) - QString base = path.left( path.length() - ext.length() - 1 ); - QStringList candidates; - if ( QStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).contains( ext ) ) + TQString base = path.left( path.length() - ext.length() - 1 ); + TQStringList candidates; + if ( TQStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).contains( ext ) ) { candidates << ( base + ".c" ); candidates << ( base + ".cc" ); @@ -977,11 +977,11 @@ QString CppSupportPart::findSourceFile() candidates << ( base + "_impl.h" ); } - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = candidates.begin(); it != candidates.end(); ++it ) { kdDebug( 9007 ) << "Trying " << ( *it ) << endl; - if ( QFileInfo( *it ).exists() ) + if ( TQFileInfo( *it ).exists() ) { return * it; } @@ -989,15 +989,15 @@ QString CppSupportPart::findSourceFile() return m_activeFileName; } -QString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) +TQString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) { - QString urlPath; + TQString urlPath; if ( url.isEmpty() ) { KTextEditor::Document * doc = dynamic_cast<KTextEditor::Document*>( partController() ->activePart() ); if ( !doc ) - return QString::null; + return TQString::null; urlPath = doc->url().path(); } else @@ -1005,34 +1005,34 @@ QString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) urlPath = url.path(); } // get the path of the currently active document - QFileInfo fi( urlPath ); - QString path = fi.filePath(); + TQFileInfo fi( urlPath ); + TQString path = fi.filePath(); // extract the exension - QString ext = fi.extension(); + TQString ext = fi.extension(); if ( ext.isEmpty() ) - return QString::null; + return TQString::null; // extract the base path (full path without '.' and extension) - QString base = path.left( path.length() - ext.length() - 1 ); + TQString base = path.left( path.length() - ext.length() - 1 ); //kdDebug( 9007 ) << "base: " << base << ", ext: " << ext << endl; // just the filename without the extension - QString fileNameWoExt = fi.fileName(); + TQString fileNameWoExt = fi.fileName(); if ( !ext.isEmpty() ) fileNameWoExt.replace( "." + ext, "" ); - QString possibleExts; + TQString possibleExts; // depending on the current extension assemble a list of // candidate files to look for - QStringList candidates; + TQStringList candidates; // special case for template classes created by the new class dialog if ( path.endsWith( "_impl.h" ) ) { - QString headerpath = path; + TQString headerpath = path; headerpath.replace( "_impl.h", ".h" ); candidates << headerpath; fileNameWoExt.replace( "_impl", "" ); possibleExts = "h"; } // if file is a header file search for implementation file - else if ( QStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).contains( ext ) ) + else if ( TQStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).contains( ext ) ) { candidates << ( base + ".c" ); candidates << ( base + ".cc" ); @@ -1048,7 +1048,7 @@ QString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) possibleExts = "c,cc,cpp,c++,cxx,C,m,mm,M,inl,_impl.h"; } // if file is an implementation file, search for header file - else if ( QStringList::split( ',', "c,cc,cpp,c++,cxx,C,m,mm,M,inl" ).contains( ext ) ) + else if ( TQStringList::split( ',', "c,cc,cpp,c++,cxx,C,m,mm,M,inl" ).contains( ext ) ) { candidates << ( base + ".h" ); candidates << ( base + ".H" ); @@ -1059,12 +1059,12 @@ QString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) possibleExts = "h,H,hh,hxx,hpp,tlh"; } // search for files from the assembled candidate lists, return the first - // candidate file that actually exists or QString::null if nothing is found. - QStringList::ConstIterator it; + // candidate file that actually exists or TQString::null if nothing is found. + TQStringList::ConstIterator it; for ( it = candidates.begin(); it != candidates.end(); ++it ) { //kdDebug( 9007 ) << "Trying " << ( *it ) << endl; - if ( QFileInfo( *it ).exists() ) + if ( TQFileInfo( *it ).exists() ) { kdDebug( 9007 ) << "using: " << *it << endl; return * it; @@ -1072,10 +1072,10 @@ QString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) } //kdDebug( 9007 ) << "Now searching in project files." << endl; // Our last resort: search the project file list for matching files - QStringList::iterator fileIt; - QFileInfo candidateFileWoExt; - QString candidateFileWoExtString; - QStringList possibleExtsList = QStringList::split( ',', possibleExts ); + TQStringList::iterator fileIt; + TQFileInfo candidateFileWoExt; + TQString candidateFileWoExtString; + TQStringList possibleExtsList = TQStringList::split( ',', possibleExts ); for ( fileIt = m_projectFileList.begin(); fileIt != m_projectFileList.end(); ++fileIt ) { candidateFileWoExt.setFile(*fileIt); @@ -1087,13 +1087,13 @@ QString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) if ( possibleExtsList.contains( candidateFileWoExt.extension() ) || candidateFileWoExt.extension().isEmpty() ) { //kdDebug( 9007 ) << "checking if " << *fileIt << " exists" << endl; - if ( QFileInfo( *fileIt ).exists() ) + if ( TQFileInfo( *fileIt ).exists() ) kdDebug( 9007 ) << "using: " << *fileIt << endl; return *fileIt; } } } - return QString::null; + return TQString::null; } void CppSupportPart::slotSaveMemory() { @@ -1137,7 +1137,7 @@ void CppSupportPart::slotSwitchHeader( bool scrollOnly ) partController() ->splitCurrentDocument( url ); } -bool CppSupportPart::switchHeaderImpl( const QString& file, int line, int col, bool scrollOnly ) +bool CppSupportPart::switchHeaderImpl( const TQString& file, int line, int col, bool scrollOnly ) { bool handled = false; @@ -1181,10 +1181,10 @@ FunctionDom CppSupportPart::findFunction( const FunctionDom& def ) } FunctionDom CppSupportPart::findFunctionInNamespace( const NamespaceDom& ns, const FunctionDom& def, const std::set<NamespaceImportModel>& nsImports, - const QString& candidateFile, int scopeIndex, FunctionDom& bestMatch ) + const TQString& candidateFile, int scopeIndex, FunctionDom& bestMatch ) { FunctionDom d; - QStringList scope = def->scope(); + TQStringList scope = def->scope(); if ( !(scopeIndex >= (signed) scope.size()) ) { NamespaceDom ns_next = ns->namespaceByName( scope[ scopeIndex ] ); if ( ns_next ) { @@ -1231,10 +1231,10 @@ FunctionDom CppSupportPart::findFunctionInNamespace( const NamespaceDom& ns, con } FunctionDom CppSupportPart::findFunctionInClass( const ClassDom& cs, const FunctionDom& def, const std::set<NamespaceImportModel>& nsImports, - const QString& candidateFile, int scopeIndex, FunctionDom& bestMatch ) + const TQString& candidateFile, int scopeIndex, FunctionDom& bestMatch ) { FunctionDom d; - QStringList scope = def->scope(); + TQStringList scope = def->scope(); if ( !(scopeIndex >= (signed) scope.size()) ) { ClassList classList = cs->classByName( scope[ scopeIndex ] ); for ( ClassList::ConstIterator it_cs = classList.begin(); it_cs != classList.end(); ) { @@ -1270,7 +1270,7 @@ FunctionDom CppSupportPart::findFunctionDefinition( const FunctionDom& decl ) // Since the definition can be the child of any namespace in its scope depending on syntax, we have to check every one. FunctionDom def, bestMatch; NamespaceDom ns = codeModel()->globalNamespace(); - QString candidateFile = sourceOrHeaderCandidate( decl->fileName() ); + TQString candidateFile = sourceOrHeaderCandidate( decl->fileName() ); FunctionDefinitionList functionList = ns->functionDefinitionByName( decl->name() ); for ( FunctionDefinitionList::ConstIterator it_def = functionList.begin(); it_def != functionList.end() && !def; ++it_def ) { if ( CodeModelUtils::compareDeclarationToDefinition( decl, *it_def, ns->namespaceImports() ) ) { @@ -1288,8 +1288,8 @@ FunctionDom CppSupportPart::findFunctionDefinition( const FunctionDom& decl ) } } } - QStringList scope = decl->scope(); - for ( QStringList::ConstIterator it_scope = scope.begin(); it_scope != scope.end() && !def; ++it_scope ) { + TQStringList scope = decl->scope(); + for ( TQStringList::ConstIterator it_scope = scope.begin(); it_scope != scope.end() && !def; ++it_scope ) { NamespaceDom ns_next = ns->namespaceByName( *it_scope ); if ( ns_next ) { ns = ns_next; @@ -1351,15 +1351,15 @@ KDevLanguageSupport::Features CppSupportPart::features() return Features ( Structs | Functions | Variables | Declarations ); } -QString CppSupportPart::formatClassName( const QString &name ) +TQString CppSupportPart::formatClassName( const TQString &name ) { - QString n = name; + TQString n = name; return n.replace( ".", "::" ); } -QString CppSupportPart::unformatClassName( const QString &name ) +TQString CppSupportPart::unformatClassName( const TQString &name ) { - QString n = name; + TQString n = name; return n.replace( "::", "." ); } @@ -1372,7 +1372,7 @@ bool CppSupportPart::shouldSplitDocument(const KURL &url) KURL::List::ConstIterator it = list.begin(); while ( it != list.end() ) { - QString candidate = sourceOrHeaderCandidate( ( *it ) ); + TQString candidate = sourceOrHeaderCandidate( ( *it ) ); if ( candidate.isEmpty() ) { ++it; @@ -1395,7 +1395,7 @@ bool CppSupportPart::shouldSplitDocument(const KURL &url) Qt::Orientation CppSupportPart::splitOrientation() const { - QString o = splitHeaderSourceConfig()->orientation(); + TQString o = splitHeaderSourceConfig()->orientation(); if ( o == "Vertical" ) return Qt::Vertical; else @@ -1467,29 +1467,29 @@ bool CppSupportPart::parseProject( bool force ) kapp->setOverrideCursor( waitCursor ); _jd = new JobData; - if( QFileInfo( project() ->projectDirectory() + "/" + project()->projectName().lower() + if( TQFileInfo( project() ->projectDirectory() + "/" + project()->projectName().lower() + ".kdevelop.pcs" ).exists()) { - QDir d( project() ->projectDirectory()); + TQDir d( project() ->projectDirectory()); d.rename(project() ->projectName().lower() + ".kdevelop.pcs", project() ->projectName() +".kdevelop.pcs"); } _jd->file.setName( project() ->projectDirectory() + "/" + project()->projectName() + ".kdevelop.pcs" ); - QString skip_file_name = project() ->projectDirectory() + "/" + + TQString skip_file_name = project() ->projectDirectory() + "/" + project() ->projectName() + ".kdevelop.ignore_pcs"; - QString skip_lower_file_name = project() ->projectDirectory() + "/" + + TQString skip_lower_file_name = project() ->projectDirectory() + "/" + project() ->projectName().lower() + ".kdevelop.ignore_pcs"; - if ( !force && !QFile::exists( skip_file_name ) && - !QFile::exists( skip_lower_file_name ) && _jd->file.open( IO_ReadOnly ) ) + if ( !force && !TQFile::exists( skip_file_name ) && + !TQFile::exists( skip_lower_file_name ) && _jd->file.open( IO_ReadOnly ) ) { _jd->stream.setDevice( &( _jd->file ) ); createIgnorePCSFile(); - QString sig; + TQString sig; int pcs_version = 0; _jd->stream >> sig >> pcs_version; if ( sig == "PCS" && pcs_version == KDEV_PCS_VERSION ) @@ -1501,7 +1501,7 @@ bool CppSupportPart::parseProject( bool force ) for ( int i = 0; i < numFiles; ++i ) { - QString fn; + TQString fn; uint ts; uint offset; @@ -1513,7 +1513,7 @@ bool CppSupportPart::parseProject( bool force ) _jd->files = reorder( modifiedFileList() ); - QProgressBar* bar = new QProgressBar( _jd->files.count( ), mainWindow( ) ->statusBar( ) ); + TQProgressBar* bar = new TQProgressBar( _jd->files.count( ), mainWindow( ) ->statusBar( ) ); bar->setMinimumWidth( 120 ); bar->setCenterIndicator( true ); mainWindow( ) ->statusBar( ) ->addWidget( bar ); @@ -1522,11 +1522,11 @@ bool CppSupportPart::parseProject( bool force ) _jd->progressBar = bar; _jd->dir.setPath( m_projectDirectory ); _jd->it = _jd->files.begin(); - _jd->reparseList = QStringList(); + _jd->reparseList = TQStringList(); _jd->backgroundCount = 0; _jd->cycle = 0; - QTimer::singleShot( 0, this, SLOT( slotParseFiles() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotParseFiles() ) ); m_saveMemoryTimer->stop(); //Do not regularly remove cached files that may still be needed while parsing(the cache anyway be full for the whole parsing-process) return true; @@ -1544,15 +1544,15 @@ void CppSupportPart::slotParseFiles() { _jd->progressBar->setProgress( _jd->progressBar->progress() + 1 ); - QFileInfo fileInfo( _jd->dir, *( _jd->it ) ); + TQFileInfo fileInfo( _jd->dir, *( _jd->it ) ); if ( fileInfo.exists() && fileInfo.isFile() && fileInfo.isReadable() ) { - QString absFilePath = URLUtil::canonicalPath( fileInfo.absFilePath() ); + TQString absFilePath = URLUtil::canonicalPath( fileInfo.absFilePath() ); if ( isValidSource( absFilePath ) ) { - QDateTime t = fileInfo.lastModified(); + TQDateTime t = fileInfo.lastModified(); if ( ! ( m_timestamp.contains( absFilePath ) && m_timestamp[ absFilePath ] == t ) ) { @@ -1583,7 +1583,7 @@ void CppSupportPart::slotParseFiles() } ++( _jd->it ); - QTimer::singleShot( 0, this, SLOT( slotParseFiles() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotParseFiles() ) ); if( _jd->it == _jd->files.end()) { if( _jd->reparseList.isEmpty() ) { @@ -1603,7 +1603,7 @@ void CppSupportPart::slotParseFiles() _jd->lastBackgroundState = -1; _jd->backgroundState = 0; _jd->cycle = 1; - _jd->lastParse = QTime::currentTime(); + _jd->lastParse = TQTime::currentTime(); kapp->restoreOverrideCursor( ); } } @@ -1618,10 +1618,10 @@ void CppSupportPart::slotParseFiles() kapp->restoreOverrideCursor( ); emit updatedSourceInfo(); mainWindow( ) ->statusBar( ) ->message( i18n( "Done" ), 2000 ); - QFile::remove( project() ->projectDirectory() + TQFile::remove( project() ->projectDirectory() + "/" + project() ->projectName() + ".kdevelop.ignore_pcs" ); - QFile::remove( project() ->projectDirectory() + TQFile::remove( project() ->projectDirectory() + "/" + project() ->projectName().lower() + ".kdevelop.ignore_pcs" ); @@ -1637,13 +1637,13 @@ void CppSupportPart::slotParseFiles() } else { _jd->progressBar->setProgress( _jd->backgroundState ); ///restart _jd->progressBar->setTotalSteps( _jd->backgroundCount ); - if( _jd->lastParse.msecsTo( QTime::currentTime()) > 60000 && !m_backgroundParser->filesInQueue()) { + if( _jd->lastParse.msecsTo( TQTime::currentTime()) > 60000 && !m_backgroundParser->filesInQueue()) { _jd->backgroundCount = _jd->backgroundState; ///Stop waiting if there is no progress and no file in the background-parser - QTimer::singleShot( 0, this, SLOT( slotParseFiles() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotParseFiles() ) ); } else { int timeStep = 0; if( alwaysParseInBackground ) { - QTimer::singleShot( 10, this, SLOT( slotParseFiles() ) ); + TQTimer::singleShot( 10, this, TQT_SLOT( slotParseFiles() ) ); } else { if( _jd->it == _jd->reparseList.end() ) { /*_jd->it = _jd->files.end(); @@ -1651,7 +1651,7 @@ void CppSupportPart::slotParseFiles() timeStep = 1; } else { /*///Parse the files one by one - if( _jd->lastParse.msecsTo( QTime::currentTime()) > 100 || _jd->backgroundState != _jd->lastBackgroundState ) {*/ + if( _jd->lastParse.msecsTo( TQTime::currentTime()) > 100 || _jd->backgroundState != _jd->lastBackgroundState ) {*/ maybeParse( *_jd->it, false ); ++(_jd->it); _jd->lastBackgroundState = _jd->backgroundState; @@ -1659,41 +1659,41 @@ void CppSupportPart::slotParseFiles() timeStep = 1; }*/ } - QTimer::singleShot( timeStep, this, SLOT( slotParseFiles() ) ); + TQTimer::singleShot( timeStep, this, TQT_SLOT( slotParseFiles() ) ); } } } } } -void CppSupportPart::maybeParse( const QString& fn, bool background ) +void CppSupportPart::maybeParse( const TQString& fn, bool background ) { if ( !isValidSource( fn ) ) return ; - QFileInfo fileInfo( fn ); - QString path = URLUtil::canonicalPath( fn ); - QDateTime t = fileInfo.lastModified(); + TQFileInfo fileInfo( fn ); + TQString path = URLUtil::canonicalPath( fn ); + TQDateTime t = fileInfo.lastModified(); if ( !fileInfo.exists() ) return; - QMap<QString, QDateTime>::Iterator it = m_timestamp.find( path ); + TQMap<TQString, TQDateTime>::Iterator it = m_timestamp.find( path ); if ( codeModel()->hasFile( fn ) && it != m_timestamp.end() && *it == t ) return; - QStringList l; + TQStringList l; l << fn; parseFilesAndDependencies( l, background ); } -bool CppSupportPart::isQueued( const QString& file ) const { +bool CppSupportPart::isQueued( const TQString& file ) const { //int c = m_backgroundParser->countInQueue( file ); //if( c == 0 ) return false; return m_parseEmitWaiting.waiting( file, ParseEmitWaiting::Silent, 2 ); //Since it may be possible that the background-parser is currently parsing the file(in an obselete state), it is allowed to have the file in the queue twice. } -void CppSupportPart::slotNeedTextHint( int line, int column, QString& textHint ) +void CppSupportPart::slotNeedTextHint( int line, int column, TQString& textHint ) { if ( 1 || !m_activeEditor ) return ; @@ -1723,7 +1723,7 @@ void CppSupportPart::slotNeedTextHint( int line, int column, QString& textHint ) m_backgroundParser->unlock(); } -void CppSupportPart::MakeMemberHelper( QString& text, int& atLine, int& atColumn ) +void CppSupportPart::MakeMemberHelper( TQString& text, int& atLine, int& atColumn ) { if ( !m_activeViewCursor || !m_valid ) return ; @@ -1731,7 +1731,7 @@ void CppSupportPart::MakeMemberHelper( QString& text, int& atLine, int& atColumn atLine = -2; atColumn = 0; - QString implFile = findSourceFile(); + TQString implFile = findSourceFile(); m_backgroundParser->lock(); TranslationUnitAST* translationUnit = *m_backgroundParser->translationUnit( m_activeFileName ); @@ -1767,33 +1767,33 @@ void CppSupportPart::MakeMemberHelper( QString& text, int& atLine, int& atColumn if ( !fail && decl && declarator && declarator->parameterDeclarationClause() ) { - QStringList scope; + TQStringList scope; scopeOfNode( decl, scope ); - QString scopeStr = scope.join( "::" ); + TQString scopeStr = scope.join( "::" ); if ( !scopeStr.isEmpty() ) scopeStr += "::"; - QString declStr = declaratorToString( declarator, scopeStr ).simplifyWhiteSpace(); + TQString declStr = declaratorToString( declarator, scopeStr ).simplifyWhiteSpace(); if ( declarator->exceptionSpecification() ) { - declStr += QString::fromLatin1( " throw( " ); - QPtrList<AST> l = declarator->exceptionSpecification() ->nodeList(); - QPtrListIterator<AST> type_it( l ); + declStr += TQString::fromLatin1( " throw( " ); + TQPtrList<AST> l = declarator->exceptionSpecification() ->nodeList(); + TQPtrListIterator<AST> type_it( l ); while ( type_it.current() ) { declStr += type_it.current() ->text(); ++type_it; if ( type_it.current() ) - declStr += QString::fromLatin1( ", " ); + declStr += TQString::fromLatin1( ", " ); } - declStr += QString::fromLatin1( " )" ); + declStr += TQString::fromLatin1( " )" ); } text += "\n\n"; - QString type = typeSpecToString( decl->typeSpec() ); + TQString type = typeSpecToString( decl->typeSpec() ); text += type; if ( !type.isNull() ) text += + " "; @@ -1815,18 +1815,18 @@ void CppSupportPart::MakeMemberHelper( QString& text, int& atLine, int& atColumn void CppSupportPart::slotMakeMember() { - QString text; + TQString text; int atColumn, atLine; MakeMemberHelper( text, atLine, atColumn ); if ( !text.isEmpty() ) { - QString implFile = findSourceFile(); + TQString implFile = findSourceFile(); if ( !implFile.isEmpty() ) { partController() ->editDocument( KURL( implFile ) ); - kapp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers, 500 ); + kapp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers, 500 ); } if ( atLine == -2 ) atLine = m_activeEditor->numLines() - 1; @@ -1845,17 +1845,17 @@ void CppSupportPart::slotMakeMember() } } -QStringList CppSupportPart::subclassWidget( const QString& formName ) +TQStringList CppSupportPart::subclassWidget( const TQString& formName ) { - QStringList newFileNames; + TQStringList newFileNames; SubclassingDlg *dlg = new SubclassingDlg( this, formName, newFileNames ); dlg->exec(); return newFileNames; } -QStringList CppSupportPart::updateWidget( const QString& formName, const QString& fileName ) +TQStringList CppSupportPart::updateWidget( const TQString& formName, const TQString& fileName ) { - QStringList dummy; + TQStringList dummy; SubclassingDlg *dlg = new SubclassingDlg( this, formName, fileName, dummy ); dlg->exec(); return dummy; @@ -1868,11 +1868,11 @@ void CppSupportPart::partRemoved( KParts::Part* part ) if ( KTextEditor::Document * doc = dynamic_cast<KTextEditor::Document*>( part ) ) { - QString fileName = doc->url().path(); + TQString fileName = doc->url().path(); if ( !isValidSource( fileName ) ) return ; - QString canonicalFileName = URLUtil::canonicalPath( fileName ); + TQString canonicalFileName = URLUtil::canonicalPath( fileName ); m_backgroundParser->removeFile( canonicalFileName ); m_backgroundParser->addFile( canonicalFileName, true ); } @@ -1884,26 +1884,26 @@ void CppSupportPart::slotProjectCompiled() parseProject(); } -QStringList CppSupportPart::modifiedFileList() +TQStringList CppSupportPart::modifiedFileList() { - QStringList lst; + TQStringList lst; - QStringList fileList = m_projectFileList; - QStringList::Iterator it = fileList.begin(); + TQStringList fileList = m_projectFileList; + TQStringList::Iterator it = fileList.begin(); while ( it != fileList.end() ) { - QString fileName = *it; + TQString fileName = *it; ++it; - QFileInfo fileInfo( m_projectDirectory, fileName ); - QString path = URLUtil::canonicalPath( fileInfo.absFilePath() ); + TQFileInfo fileInfo( m_projectDirectory, fileName ); + TQString path = URLUtil::canonicalPath( fileInfo.absFilePath() ); if ( !( isSource( path ) || isHeader( path ) ) ) continue; - QDateTime t = fileInfo.lastModified(); + TQDateTime t = fileInfo.lastModified(); - QMap<QString, QDateTime>::Iterator dictIt = m_timestamp.find( path ); + TQMap<TQString, TQDateTime>::Iterator dictIt = m_timestamp.find( path ); if ( fileInfo.exists() && dictIt != m_timestamp.end() && *dictIt == t ) continue; @@ -1918,8 +1918,8 @@ KTextEditor::Document * CppSupportPart::findDocument( const KURL & url ) if ( !partController() ->parts() ) return 0; - QPtrList<KParts::Part> parts( *partController() ->parts() ); - QPtrListIterator<KParts::Part> it( parts ); + TQPtrList<KParts::Part> parts( *partController() ->parts() ); + TQPtrListIterator<KParts::Part> it( parts ); while ( KParts::Part * part = it.current() ) { KTextEditor::Document * doc = dynamic_cast<KTextEditor::Document*>( part ); @@ -1936,16 +1936,16 @@ void CppSupportPart::setupCatalog( ) kdDebug( 9007 ) << "CppSupportPart::setupCatalog()" << endl; KStandardDirs *dirs = CppSupportFactory::instance() ->dirs(); - QStringList pcsList = dirs->findAllResources( "pcs", "*.db", false, true ); - QStringList pcsIdxList = dirs->findAllResources( "pcs", "*.idx", false, true ); + TQStringList pcsList = dirs->findAllResources( "pcs", "*.db", false, true ); + TQStringList pcsIdxList = dirs->findAllResources( "pcs", "*.idx", false, true ); - QStringList enabledPCSs; + TQStringList enabledPCSs; if ( DomUtil::elementByPath( *project() ->projectDom(), "kdevcppsupport/references" ).isNull() ) { - for ( QStringList::Iterator it = pcsList.begin(); it != pcsList.end(); ++it ) + for ( TQStringList::Iterator it = pcsList.begin(); it != pcsList.end(); ++it ) { kdDebug( 9007 ) << "CppSupportPart::setupCatalog()1 " << *it << endl; - enabledPCSs.push_back( QFileInfo( *it ).baseName(true) ); + enabledPCSs.push_back( TQFileInfo( *it ).baseName(true) ); } } else @@ -1953,18 +1953,18 @@ void CppSupportPart::setupCatalog( ) enabledPCSs = DomUtil::readListEntry( *project() ->projectDom(), "kdevcppsupport/references", "pcs" ); } - QStringList indexList = QStringList() << "kind" << "name" << "scope" << "fileName" << "prefix"; + TQStringList indexList = TQStringList() << "kind" << "name" << "scope" << "fileName" << "prefix"; if ( pcsList.size() && pcsVersion() < KDEV_DB_VERSION ) { - QStringList l = pcsList + pcsIdxList; + TQStringList l = pcsList + pcsIdxList; int rtn = KMessageBox::questionYesNoList( 0, i18n( "Persistent class store will be disabled: you have a wrong version of pcs installed.\nRemove old pcs files?" ), l, i18n( "C++ Support" ), KStdGuiItem::del(), KStdGuiItem::cancel() ); if ( rtn == KMessageBox::Yes ) { - QStringList::Iterator it = l.begin(); + TQStringList::Iterator it = l.begin(); while ( it != l.end() ) { - QFile::remove + TQFile::remove ( *it ); ++it; } @@ -1977,16 +1977,16 @@ void CppSupportPart::setupCatalog( ) } } - QStringList::Iterator it = pcsList.begin(); + TQStringList::Iterator it = pcsList.begin(); while ( it != pcsList.end() ) { kdDebug( 9007 ) << "CppSupportPart::setupCatalog()2 " << *it << endl; Catalog * catalog = new Catalog(); catalog->open( *it ); - catalog->setEnabled( enabledPCSs.contains( QFileInfo( *it ).baseName(true) ) ); + catalog->setEnabled( enabledPCSs.contains( TQFileInfo( *it ).baseName(true) ) ); ++it; - for ( QStringList::Iterator idxIt = indexList.begin(); idxIt != indexList.end(); ++idxIt ) + for ( TQStringList::Iterator idxIt = indexList.begin(); idxIt != indexList.end(); ++idxIt ) catalog->addIndex( ( *idxIt ).utf8() ); m_catalogList.append( catalog ); @@ -1998,12 +1998,12 @@ void CppSupportPart::setupCatalog( ) KMimeType::List CppSupportPart::mimeTypes( ) { - QStringList mimeList; + TQStringList mimeList; mimeList += m_headerMimeTypes; mimeList += m_sourceMimeTypes; KMimeType::List list; - for ( QStringList::Iterator it = mimeList.begin(); it != mimeList.end(); ++it ) + for ( TQStringList::Iterator it = mimeList.begin(); it != mimeList.end(); ++it ) { if ( KMimeType::Ptr mime = KMimeType::mimeType( *it ) ) list << mime; @@ -2027,17 +2027,17 @@ void CppSupportPart::setPcsVersion( int version ) config->sync(); } -QString CppSupportPart::formatTag( const Tag & inputTag ) +TQString CppSupportPart::formatTag( const Tag & inputTag ) { Tag tag = inputTag; switch ( tag.kind() ) { case Tag::Kind_Namespace: - return QString::fromLatin1( "namespace " ) + tag.name(); + return TQString::fromLatin1( "namespace " ) + tag.name(); case Tag::Kind_Class: - return QString::fromLatin1( "class " ) + tag.name(); + return TQString::fromLatin1( "class " ) + tag.name(); case Tag::Kind_Function: case Tag::Kind_FunctionDeclaration: @@ -2075,14 +2075,14 @@ void CppSupportPart::codeCompletionConfigStored( ) void CppSupportPart::splitHeaderSourceConfigStored( ) { - QString o = splitHeaderSourceConfig()->orientation(); + TQString o = splitHeaderSourceConfig()->orientation(); if ( o == "Vertical" ) emit splitOrientationChanged( Qt::Vertical ); else if ( o == "Horizontal" ) emit splitOrientationChanged( Qt::Horizontal ); } -void CppSupportPart::removeWithReferences( const QString & fileName ) +void CppSupportPart::removeWithReferences( const TQString & fileName ) { kdDebug( 9007 ) << "remove with references: " << fileName << endl; m_timestamp.remove( fileName ); @@ -2094,23 +2094,23 @@ kdDebug( 9007 ) << "remove with references: " << fileName << endl; codeModel() ->removeFile( codeModel() ->fileByName( fileName ) ); } -bool CppSupportPart::isValidSource( const QString& fileName ) const +bool CppSupportPart::isValidSource( const TQString& fileName ) const { - QFileInfo fileInfo( fileName ); - QString path = URLUtil::canonicalPath( fileInfo.absFilePath() ); + TQFileInfo fileInfo( fileName ); + TQString path = URLUtil::canonicalPath( fileInfo.absFilePath() ); return /*project() && project() ->isProjectFile( path ) &&*/ ( isSource( path ) || isHeader( path ) ) - && !QFile::exists( fileInfo.dirPath( true ) + "/.kdev_ignore" ); + && !TQFile::exists( fileInfo.dirPath( true ) + "/.kdev_ignore" ); } -QString CppSupportPart::formatModelItem( const CodeModelItem *item, bool shortDescription ) +TQString CppSupportPart::formatModelItem( const CodeModelItem *item, bool shortDescription ) { if ( item->isFunction() || item->isFunctionDefinition() ) { const FunctionModel * model = static_cast<const FunctionModel*>( item ); - QString function; - QString args; + TQString function; + TQString args; ArgumentList argumentList = model->argumentList(); for ( ArgumentList::const_iterator it = argumentList.begin(); it != argumentList.end(); ++it ) { @@ -2118,10 +2118,10 @@ QString CppSupportPart::formatModelItem( const CodeModelItem *item, bool shortDe args += formatModelItem( ( *it ).data() ); } if ( !shortDescription ) - function += ( model->isVirtual() ? QString( "virtual " ) : QString( "" ) ) + model->resultType() + " "; + function += ( model->isVirtual() ? TQString( "virtual " ) : TQString( "" ) ) + model->resultType() + " "; - function += model->name() + "(" + args + ")" + ( model->isConstant() ? QString( " const" ) : QString( "" ) ) + - ( model->isAbstract() ? QString( " = 0" ) : QString( "" ) ); + function += model->name() + "(" + args + ")" + ( model->isConstant() ? TQString( " const" ) : TQString( "" ) ) + + ( model->isAbstract() ? TQString( " = 0" ) : TQString( "" ) ); return function; } @@ -2135,12 +2135,12 @@ QString CppSupportPart::formatModelItem( const CodeModelItem *item, bool shortDe else if ( item->isArgument() ) { const ArgumentModel * model = static_cast<const ArgumentModel*>( item ); - QString arg; + TQString arg; if ( !shortDescription ) arg += model->type() + " "; arg += model->name(); if ( !shortDescription ) - arg += model->defaultValue().isEmpty() ? QString( "" ) : QString( " = " ) + model->defaultValue(); + arg += model->defaultValue().isEmpty() ? TQString( "" ) : TQString( " = " ) + model->defaultValue(); return arg.stripWhiteSpace(); } else @@ -2159,7 +2159,7 @@ void CppSupportPart::saveProjectSourceInfo() if ( !project() || fileList.isEmpty() ) return ; - QFile f( project() ->projectDirectory() + "/" + TQFile f( project() ->projectDirectory() + "/" + project() ->projectName() + ".kdevelop.pcs" ); if ( !f.open( IO_WriteOnly ) ) return ; @@ -2168,10 +2168,10 @@ void CppSupportPart::saveProjectSourceInfo() createIgnorePCSFile(); - QDataStream stream( &f ); - QMap<QString, uint> offsets; + TQDataStream stream( &f ); + TQMap<TQString, uint> offsets; - QString pcs( "PCS" ); + TQString pcs( "PCS" ); stream << pcs << KDEV_PCS_VERSION; stream << int( fileList.size() ); @@ -2200,22 +2200,22 @@ void CppSupportPart::saveProjectSourceInfo() stream.device() ->at( end ); } - QFile::remove( project() ->projectDirectory() + "/" + TQFile::remove( project() ->projectDirectory() + "/" + project() ->projectName() + ".kdevelop.ignore_pcs" ); - QFile::remove( project() ->projectDirectory() + "/" + TQFile::remove( project() ->projectDirectory() + "/" + project() ->projectName().lower() + ".kdevelop.ignore_pcs" ); m_backgroundParser->unlock(); } -QString CppSupportPart::extractInterface( const ClassDom& klass ) +TQString CppSupportPart::extractInterface( const ClassDom& klass ) { - QString txt; - QTextStream stream( &txt, IO_WriteOnly ); + TQString txt; + TQTextStream stream( &txt, IO_WriteOnly ); - QString name = klass->name() + "Interface"; - QString ind; - ind.fill( QChar( ' ' ), 4 ); + TQString name = klass->name() + "Interface"; + TQString ind; + ind.fill( TQChar( ' ' ), 4 ); stream << "class " << name << "\n" @@ -2255,21 +2255,21 @@ void CppSupportPart::slotExtractInterface( ) if ( !m_activeClass ) return ; - QFileInfo fileInfo( m_activeClass->fileName() ); - QString ifaceFileName = fileInfo.dirPath( true ) + "/" + m_activeClass->name().lower() + "_interface.h"; - if ( QFile::exists( ifaceFileName ) ) + TQFileInfo fileInfo( m_activeClass->fileName() ); + TQString ifaceFileName = fileInfo.dirPath( true ) + "/" + m_activeClass->name().lower() + "_interface.h"; + if ( TQFile::exists( ifaceFileName ) ) { KMessageBox::error( mainWindow() ->main(), i18n( "File %1 already exists" ).arg( ifaceFileName ), i18n( "C++ Support" ) ); } else { - QString text = extractInterface( m_activeClass ); + TQString text = extractInterface( m_activeClass ); - QFile f( ifaceFileName ); + TQFile f( ifaceFileName ); if ( f.open( IO_WriteOnly ) ) { - QTextStream stream( &f ); + TQTextStream stream( &f ); stream << "#ifndef __" << m_activeClass->name().upper() << "_INTERFACE_H" << "\n" << "#define __" << m_activeClass->name().upper() << "_INTERFACE_H" << "\n" @@ -2298,19 +2298,19 @@ void CppSupportPart::gotoLine( int line ) m_activeViewCursor->setCursorPositionReal( line, 0 ); } -FileDom CppSupportPart::fileByName( const QString& name) { +FileDom CppSupportPart::fileByName( const TQString& name) { return codeModel()->fileByName( name ); } -int CppSupportPart::parseFilesAndDependencies( QStringList files, bool background, bool parseFirst, bool silent ) { - QMap<QString, int> fileGroups; +int CppSupportPart::parseFilesAndDependencies( TQStringList files, bool background, bool parseFirst, bool silent ) { + TQMap<TQString, int> fileGroups; int nextGroup = 0; - for( QStringList::iterator it = files.begin(); it != files.end(); ++it ) { + for( TQStringList::iterator it = files.begin(); it != files.end(); ++it ) { FileDom d = fileByName( *it ); - QStringList lst; + TQStringList lst; if( !d ) { lst << *it; }else{ @@ -2326,20 +2326,20 @@ int CppSupportPart::parseFilesAndDependencies( QStringList files, bool backgroun if( fileGroups.find( *it ) != fileGroups.end() ) cgroup = fileGroups[*it]; - for( QStringList::iterator lit = lst.begin(); lit != lst.end(); ++lit ) + for( TQStringList::iterator lit = lst.begin(); lit != lst.end(); ++lit ) fileGroups[*lit] = cgroup; } - QValueVector<QStringList> groups; + TQValueVector<TQStringList> groups; groups.resize( nextGroup ); ///put the groups together - for( QMap<QString, int>::iterator it = fileGroups.begin(); it != fileGroups.end(); ++it ) { + for( TQMap<TQString, int>::iterator it = fileGroups.begin(); it != fileGroups.end(); ++it ) { groups[*it] << it.key(); } for( int a = 0; a < nextGroup; a++ ) { - QStringList group = reorder( groups[a] ); + TQStringList group = reorder( groups[a] ); /* kdDebug( 9007 ) << "reparsing the following group: " << ":\n" << group.join("\n") << "\n\n";*/ @@ -2361,7 +2361,7 @@ int CppSupportPart::parseFilesAndDependencies( QStringList files, bool backgroun } if( parseFirst && !group.empty() ) { - for(QStringList::iterator it = --group.end(); it != group.end(); ) { + for(TQStringList::iterator it = --group.end(); it != group.end(); ) { backgroundParser()->addFileFront(*it); if( it == group.begin() ) { it = group.end(); @@ -2370,7 +2370,7 @@ int CppSupportPart::parseFilesAndDependencies( QStringList files, bool backgroun } } } else { - for(QStringList::iterator it = group.begin(); it != group.end(); ++it) { + for(TQStringList::iterator it = group.begin(); it != group.end(); ++it) { backgroundParser()->addFile(*it); } } @@ -2378,7 +2378,7 @@ int CppSupportPart::parseFilesAndDependencies( QStringList files, bool backgroun m_backgroundParser->unlock(); } else { - for(QStringList::iterator it = group.begin(); it != group.end(); ++it) { + for(TQStringList::iterator it = group.begin(); it != group.end(); ++it) { m_driver->parseFile( *it ); } } @@ -2387,7 +2387,7 @@ int CppSupportPart::parseFilesAndDependencies( QStringList files, bool backgroun return fileGroups.count(); } -int CppSupportPart::parseFileAndDependencies( const QString & fileName, bool background, bool parseFirst, bool silent ) { +int CppSupportPart::parseFileAndDependencies( const TQString & fileName, bool background, bool parseFirst, bool silent ) { if(! isValidSource( fileName ) ) return 0; // kdDebug( 9007 ) << "reparsing dependencies of " << fileName << "\n"; @@ -2400,7 +2400,7 @@ void CppSupportPart::parseEmit( ParseEmitWaiting::Processed files ) { bool modelHasFiles = true; - for( QStringList::iterator it = files.res.begin(); it != files.res.end(); ++it ) { + for( TQStringList::iterator it = files.res.begin(); it != files.res.end(); ++it ) { if( !codeModel()->hasFile( *it ) ) modelHasFiles = false; } @@ -2409,16 +2409,16 @@ void CppSupportPart::parseEmit( ParseEmitWaiting::Processed files ) { if( (files.flag & ParseEmitWaiting::HadErrors) && modelHasFiles && !files.hasFlag( ParseEmitWaiting::Silent ) ) { mainWindow() ->statusBar() ->message( "File parsed, but not updating code-model because of errors", 2000 ); kdDebug( 9007 ) << "not updating code-model because at least one file has errors" << endl; - // for( QStringList::iterator it = files.res.begin(); it != files.res.end(); ++it ) + // for( TQStringList::iterator it = files.res.begin(); it != files.res.end(); ++it ) // m_backgroundParser->removeFile( *it ); } else { ///update timestamps - for( QStringList::iterator it = files.res.begin(); it != files.res.end(); ++it ) { + for( TQStringList::iterator it = files.res.begin(); it != files.res.end(); ++it ) { if( !codeModel()->hasFile( *it ) ) modelHasFiles = false; - QString& fileName = *it; + TQString& fileName = *it; - QFileInfo fileInfo( fileName ); - QString path = URLUtil::canonicalPath( fileName ); + TQFileInfo fileInfo( fileName ); + TQString path = URLUtil::canonicalPath( fileName ); if ( !fileInfo.exists() ) { removeWithReferences( path ); @@ -2433,15 +2433,15 @@ void CppSupportPart::parseEmit( ParseEmitWaiting::Processed files ) { m_backgroundParser->lock(); - QStringList l = files.res; + TQStringList l = files.res; - QMap<QString, bool> wholeResult; - QStringList missing; + TQMap<TQString, bool> wholeResult; + TQStringList missing; - QMap<QString, FileDom> newFiles; + TQMap<TQString, FileDom> newFiles; while(!l.isEmpty() ) { - QString fileName = l.front(); + TQString fileName = l.front(); if( !m_backgroundParser->hasTranslationUnit( fileName ) ) { kdDebug( 9007 ) << "error: translation-unit is missing: " << fileName << endl; @@ -2462,8 +2462,8 @@ void CppSupportPart::parseEmit( ParseEmitWaiting::Processed files ) { newFiles[fileName] = walker.file(); ///update timestamps - QFileInfo fileInfo( fileName ); - QString path = URLUtil::canonicalPath( fileName ); + TQFileInfo fileInfo( fileName ); + TQString path = URLUtil::canonicalPath( fileName ); m_timestamp[ path ] = fileInfo.lastModified(); } else { @@ -2471,8 +2471,8 @@ void CppSupportPart::parseEmit( ParseEmitWaiting::Processed files ) { } if( walker.file() ) { - QStringList grp = walker.file()->wholeGroupStrings(); - for( QStringList::const_iterator it = grp.begin(); it != grp.end(); ++it ) + TQStringList grp = walker.file()->wholeGroupStrings(); + for( TQStringList::const_iterator it = grp.begin(); it != grp.end(); ++it ) wholeResult[*it] = true; } } @@ -2486,7 +2486,7 @@ void CppSupportPart::parseEmit( ParseEmitWaiting::Processed files ) { } bool canUpdate = true; - for( QMap<QString, FileDom>::const_iterator it = newFiles.begin(); it != newFiles.end(); ++it ) { + for( TQMap<TQString, FileDom>::const_iterator it = newFiles.begin(); it != newFiles.end(); ++it ) { FileDom oldFile = codeModel()->fileByName( it.key() ); if( !oldFile || !oldFile->canUpdate( *it ) ) { @@ -2497,14 +2497,14 @@ void CppSupportPart::parseEmit( ParseEmitWaiting::Processed files ) { if( canUpdate ) { ///Update the code-model - for( QMap<QString, FileDom>::const_iterator it = newFiles.begin(); it != newFiles.end(); ++it ) { + for( TQMap<TQString, FileDom>::const_iterator it = newFiles.begin(); it != newFiles.end(); ++it ) { FileDom oldFile = codeModel()->fileByName( it.key() ); oldFile->update( *it ); codeModel()->mergeGroups( oldFile->groupId(), (*it)->groupId() ); ///Merge parsing-groups together } } else { ///Remove the current files and replace them with the new ones - for( QMap<QString, FileDom>::const_iterator it = newFiles.begin(); it != newFiles.end(); ++it ) { + for( TQMap<TQString, FileDom>::const_iterator it = newFiles.begin(); it != newFiles.end(); ++it ) { removeWithReferences( it.key() ); codeModel()->addFile( *it ); } @@ -2513,7 +2513,7 @@ void CppSupportPart::parseEmit( ParseEmitWaiting::Processed files ) { ///make the list unique l.clear(); - for( QMap<QString, bool>::const_iterator it = wholeResult.begin(); it != wholeResult.end(); ++it ) + for( TQMap<TQString, bool>::const_iterator it = wholeResult.begin(); it != wholeResult.end(); ++it ) l << it.key();*/ m_backgroundParser->unlock(); @@ -2526,11 +2526,11 @@ void CppSupportPart::parseEmit( ParseEmitWaiting::Processed files ) { if( files.hasFlag( ParseEmitWaiting::Silent ) ) { if( alwaysParseInBackground ) - for( QStringList::iterator it = files.res.begin(); it != files.res.end(); ++it ) + for( TQStringList::iterator it = files.res.begin(); it != files.res.end(); ++it ) m_backgroundParser->removeFile( *it ); } else { if( !canUpdate ) { ///If the current model could be updated, do not emit addedSourceInfo(..) and remove the units from the parser, because nobody will be using them - QStringList l = files.res; + TQStringList l = files.res; while(!l.isEmpty() ) { emit aboutToRemoveSourceInfo( l.front() ); emit removedSourceInfo( l.front() ); @@ -2541,7 +2541,7 @@ void CppSupportPart::parseEmit( ParseEmitWaiting::Processed files ) { if( !files.hasFlag( ParseEmitWaiting::Silent ) ) emitFileParsed( files ); } else { - QStringList l = files.res; + TQStringList l = files.res; while( !l.isEmpty() ) { emit codeModelUpdated( l.front() ); emit aboutToRemoveSourceInfo( l.front() ); @@ -2555,16 +2555,16 @@ void CppSupportPart::parseEmit( ParseEmitWaiting::Processed files ) { } } -/*void CppSupportPart::recomputeCodeModel( const QString& fileName ) +/*void CppSupportPart::recomputeCodeModel( const TQString& fileName ) {*/ //} -void CppSupportPart::emitSynchronousParseReady( const QString& file, ParsedFilePointer unit ) { +void CppSupportPart::emitSynchronousParseReady( const TQString& file, ParsedFilePointer unit ) { emit synchronousParseReady( file, unit ); } -void CppSupportPart::emitFileParsed( QStringList l ) +void CppSupportPart::emitFileParsed( TQStringList l ) { while( !l.isEmpty() ) { emit fileParsed( l.front() ); @@ -2572,22 +2572,22 @@ void CppSupportPart::emitFileParsed( QStringList l ) } } -bool CppSupportPart::isHeader( const QString& fileName ) const +bool CppSupportPart::isHeader( const TQString& fileName ) const { /*KMimeType::Ptr ptr = KMimeType::findByPath( fileName ); if ( ptr && m_headerMimeTypes.contains( ptr->name() ) ) return true;*/ - return ( m_headerExtensions.findIndex( QFileInfo( fileName ).extension() ) != -1 ); + return ( m_headerExtensions.findIndex( TQFileInfo( fileName ).extension() ) != -1 ); } -bool CppSupportPart::isSource( const QString& fileName ) const +bool CppSupportPart::isSource( const TQString& fileName ) const { /*KMimeType::Ptr ptr = KMimeType::findByPath( fileName ); if ( ptr && m_sourceMimeTypes.contains( ptr->name() ) ) return true;*/ - return ( m_sourceExtensions.findIndex( QFileInfo( fileName ).extension() ) != -1 ); + return ( m_sourceExtensions.findIndex( TQFileInfo( fileName ).extension() ) != -1 ); } void CppSupportPart::gotoDeclarationLine( int line ) @@ -2602,14 +2602,14 @@ void CppSupportPart::gotoDeclarationLine( int line ) } } -void CppSupportPart::removeCatalog( const QString & dbName ) +void CppSupportPart::removeCatalog( const TQString & dbName ) { - if ( !QFile::exists( dbName ) ) + if ( !TQFile::exists( dbName ) ) return ; - QValueList<Catalog*> catalogs = codeRepository() ->registeredCatalogs(); + TQValueList<Catalog*> catalogs = codeRepository() ->registeredCatalogs(); Catalog* c = 0; - for ( QValueList<Catalog*>::Iterator it = catalogs.begin(); it != catalogs.end(); ++it ) + for ( TQValueList<Catalog*>::Iterator it = catalogs.begin(); it != catalogs.end(); ++it ) { if ( ( *it ) ->dbName() == dbName ) { @@ -2624,15 +2624,15 @@ void CppSupportPart::removeCatalog( const QString & dbName ) m_catalogList.remove( c ); } - QFileInfo fileInfo( dbName ); - QDir dir( fileInfo.dir( true ) ); - QStringList indexList = QStringList() << "kind" << "name" << "scope" << "fileName" << "prefix"; - for(QStringList::Iterator iter = indexList.begin(); iter != indexList.end(); iter++) + TQFileInfo fileInfo( dbName ); + TQDir dir( fileInfo.dir( true ) ); + TQStringList indexList = TQStringList() << "kind" << "name" << "scope" << "fileName" << "prefix"; + for(TQStringList::Iterator iter = indexList.begin(); iter != indexList.end(); iter++) { - QStringList fileList = dir.entryList( fileInfo.baseName(true) +"." +(*iter) + ".idx" ); - for ( QStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it ) + TQStringList fileList = dir.entryList( fileInfo.baseName(true) +"." +(*iter) + ".idx" ); + for ( TQStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it ) { - QString idxName = fileInfo.dirPath( true ) + "/" + *it; + TQString idxName = fileInfo.dirPath( true ) + "/" + *it; kdDebug( 9007 ) << "=========> remove db index: " << idxName << endl; dir.remove( *it ); } @@ -2679,7 +2679,7 @@ void CppSupportPart::slotCursorPositionChanged() unsigned int column = 0; if ( KDevEditorUtil::currentPositionReal( &line, &column, dynamic_cast<KTextEditor::Document*>( partController()->activePart() ) ) ) { - QString typeInfoString = codeCompletion()->createTypeInfoString( line, column ); + TQString typeInfoString = codeCompletion()->createTypeInfoString( line, column ); mainWindow()->statusBar()->message( typeInfoString ); } } @@ -2697,8 +2697,8 @@ void CppSupportPart::slotFunctionHint( ) // m_functionHintTimer->stop(); if ( FunctionDefinitionDom fun = currentFunctionDefinition() ) { - QStringList scope = fun->scope(); - QString funName = scope.join( "::" ); + TQStringList scope = fun->scope(); + TQString funName = scope.join( "::" ); if ( !funName.isEmpty() ) funName += "::"; @@ -2711,11 +2711,11 @@ void CppSupportPart::slotFunctionHint( ) void CppSupportPart::createIgnorePCSFile( ) { - static QCString skip_me( "ignore me\n" ); + static TQCString skip_me( "ignore me\n" ); - QString skip_file_name = project() ->projectDirectory() + "/" + TQString skip_file_name = project() ->projectDirectory() + "/" + project() ->projectName() + ".kdevelop.ignore_pcs"; - QFile skip_pcs_file( skip_file_name ); + TQFile skip_pcs_file( skip_file_name ); if ( skip_pcs_file.open( IO_WriteOnly ) ) { skip_pcs_file.writeBlock( skip_me ); @@ -2723,7 +2723,7 @@ void CppSupportPart::createIgnorePCSFile( ) } } -QString CppSupportPart::specialHeaderName( bool local ) const +TQString CppSupportPart::specialHeaderName( bool local ) const { if ( local ) return ::locateLocal( "data", "kdevcppsupport/configuration", CppSupportFactory::instance() ); @@ -2735,7 +2735,7 @@ void CppSupportPart::updateParserConfiguration() { m_backgroundParser->updateParserConfiguration(); - QString conf_file_name = specialHeaderName(); + TQString conf_file_name = specialHeaderName(); m_driver->removeAllMacrosInFile( conf_file_name ); dynamic_cast<KDevDriver*>(m_driver)->setup(); @@ -2788,7 +2788,7 @@ void CppSupportPart::slotDeleteParserStore() { void CppSupportPart::slotCreateSubclass() { - QFileInfo fi( m_contextFileName ); + TQFileInfo fi( m_contextFileName ); if ( fi.extension( false ) != "ui" ) return ; QtDesignerCppIntegration *des = dynamic_cast<QtDesignerCppIntegration*>( designer( KInterfaceDesigner::QtDesigner ) ); @@ -2796,10 +2796,10 @@ void CppSupportPart::slotCreateSubclass() des->selectImplementation( m_contextFileName ); } -void CppSupportPart::addMethod( ClassDom aClass, const QString& name, const QString type, - const QString& parameters, CodeModelItem::Access accessType, +void CppSupportPart::addMethod( ClassDom aClass, const TQString& name, const TQString type, + const TQString& parameters, CodeModelItem::Access accessType, bool isConst, bool isInline, bool isVirtual, bool isPureVirtual, - const QString& implementation ) + const TQString& implementation ) { partController() ->editDocument( KURL( aClass->fileName() ) ); KTextEditor::EditInterface* editIface = dynamic_cast<KTextEditor::EditInterface*>( partController() ->activePart() ); @@ -2808,18 +2808,18 @@ void CppSupportPart::addMethod( ClassDom aClass, const QString& name, const QStr /// @fixme show messagebox return ; } - QString declarationString = type + " " + name + "(" + parameters + ")" + ( isConst ? " const" : "" ); + TQString declarationString = type + " " + name + "(" + parameters + ")" + ( isConst ? " const" : "" ); KDevSourceFormatter* sourceFormatter = extension<KDevSourceFormatter>( "KDevelop/SourceFormatter" ); - QString finalDeclaration = ( ( isVirtual || isPureVirtual ) ? "\nvirtual " : "\n" + declarationString + + TQString finalDeclaration = ( ( isVirtual || isPureVirtual ) ? "\nvirtual " : "\n" + declarationString + ( isPureVirtual ? " = 0 " : "" ) + ( isInline ? "\n{\n" + implementation + "\n}\n" : ";" ) ); if ( sourceFormatter != 0 ) finalDeclaration = sourceFormatter->formatSource( finalDeclaration ); - QString indentString = "\t"; + TQString indentString = "\t"; if ( sourceFormatter != 0 ) indentString = sourceFormatter->indentString(); @@ -2832,23 +2832,23 @@ void CppSupportPart::addMethod( ClassDom aClass, const QString& name, const QStr return ; // construct fully qualified name for method definition - QString fullyQualifiedName = aClass->scope().join("::"); + TQString fullyQualifiedName = aClass->scope().join("::"); if (! fullyQualifiedName.isEmpty()) { fullyQualifiedName += "::"; } fullyQualifiedName += aClass->name() + "::" + name; - QString definitionString = "\n" + type + " " + fullyQualifiedName + "(" + parameters + ")" + ( isConst ? " const" : "" ) + "\n{\n" + implementation + "\n}\n"; + TQString definitionString = "\n" + type + " " + fullyQualifiedName + "(" + parameters + ")" + ( isConst ? " const" : "" ) + "\n{\n" + implementation + "\n}\n"; if ( sourceFormatter != 0 ) definitionString = sourceFormatter->formatSource( definitionString ); - QFileInfo info( aClass->fileName() ); - QString implementationFile = info.dirPath( true ) + "/" + info.baseName() + ".cpp" ; - QFileInfo fileInfo( implementationFile ); + TQFileInfo info( aClass->fileName() ); + TQString implementationFile = info.dirPath( true ) + "/" + info.baseName() + ".cpp" ; + TQFileInfo fileInfo( implementationFile ); KDevCreateFile* createFileSupport = extension<KDevCreateFile>( "KDevelop/CreateFile" ); - if ( !QFile::exists( fileInfo.absFilePath() ) && createFileSupport != 0 ) + if ( !TQFile::exists( fileInfo.absFilePath() ) && createFileSupport != 0 ) createFileSupport->createNewFile( fileInfo.extension(), fileInfo.dirPath( true ), fileInfo.baseName() ); partController() ->editDocument( KURL( implementationFile ) ); @@ -2856,7 +2856,7 @@ void CppSupportPart::addMethod( ClassDom aClass, const QString& name, const QStr if ( !editIface ) return ; //@fixme errorverdoedelung - editIface->insertLine( editIface->numLines(), QString::fromLatin1( "" ) ); + editIface->insertLine( editIface->numLines(), TQString::fromLatin1( "" ) ); editIface->insertText( editIface->numLines() - 1, 0, definitionString ); backgroundParser() ->addFile( implementationFile ); } @@ -3011,42 +3011,42 @@ void CppSupportPart::buildSafeFileSet() { SynchronizedFileSet::SetType files; //everything that goes into this set must be deep-copied kdDebug( 9007 ) << "CppSupportPart:: rebuilding safe-file-set" << endl; - for( QStringList::const_iterator it = m_projectFileList.begin(); it != m_projectFileList.end(); ++it ) { - QFileInfo fi( *it ); - QString file = *it; + for( TQStringList::const_iterator it = m_projectFileList.begin(); it != m_projectFileList.end(); ++it ) { + TQFileInfo fi( *it ); + TQString file = *it; if( fi.isRelative() ) { - fi.setFile( QDir(m_projectDirectory), *it ); + fi.setFile( TQDir(m_projectDirectory), *it ); file = fi.absFilePath(); } //deep-copy - files.insert( QString::fromUtf8(file.utf8()) ); + files.insert( TQString::fromUtf8(file.utf8()) ); } ///Now get all translation-units from the code-repository - QValueList<Catalog::QueryArgument> args; + TQValueList<Catalog::QueryArgument> args; args << Catalog::QueryArgument( "kind", Tag::Kind_TranslationUnit ); - QValueList<Tag> tags( codeCompletion()->repository()->query( args ) ); + TQValueList<Tag> tags( codeCompletion()->repository()->query( args ) ); - for( QValueList<Tag>::const_iterator it = tags.begin(); it != tags.end(); ++it ) { + for( TQValueList<Tag>::const_iterator it = tags.begin(); it != tags.end(); ++it ) { files.insert( (*it).fileName() + "||" + (*it).attribute("macroValueHash").toString() + "||" + (*it).attribute("macroIdHash").toString() ); } m_safeProjectFiles.setFiles( files ); } void CppSupportPart::addToRepository( ParsedFilePointer file ) { - QString catalogString( "automatic_" + KURL::encode_string_no_slash(m_projectDirectory) ); + TQString catalogString( "automatic_" + KURL::encode_string_no_slash(m_projectDirectory) ); KStandardDirs *dirs = CppSupportFactory::instance() ->dirs(); - QString dbName = dirs->saveLocation( "data", "kdevcppsupport/pcs" ) + catalogString + ".db"; + TQString dbName = dirs->saveLocation( "data", "kdevcppsupport/pcs" ) + catalogString + ".db"; Catalog* catalog = 0; ///First check if the catalog is already there - QValueList<Catalog*> catalogs = codeRepository()->registeredCatalogs(); - for( QValueList<Catalog*>::const_iterator it = catalogs.begin(); it != catalogs.end(); ++it ) { + TQValueList<Catalog*> catalogs = codeRepository()->registeredCatalogs(); + for( TQValueList<Catalog*>::const_iterator it = catalogs.begin(); it != catalogs.end(); ++it ) { if( (*it)->dbName() == dbName ) { catalog = *it; break; @@ -3055,7 +3055,7 @@ void CppSupportPart::addToRepository( ParsedFilePointer file ) { if( !catalog ) { kdDebug( 9007 ) << "creating new catalog named " << catalogString << " for automatic filling" << endl; - //QStringList indexList = QStringList() << "kind" << "name" << "scope" << "fileName" << "prefix"; + //TQStringList indexList = TQStringList() << "kind" << "name" << "scope" << "fileName" << "prefix"; catalog = new Catalog; catalog->open( dbName ); catalog->addIndex( "kind" ); @@ -3064,27 +3064,27 @@ void CppSupportPart::addToRepository( ParsedFilePointer file ) { catalog->addIndex( "prefix" ); catalog->addIndex( "fileName" ); /* - for ( QStringList::Iterator idxIt = indexList.begin(); idxIt != indexList.end(); ++idxIt ) + for ( TQStringList::Iterator idxIt = indexList.begin(); idxIt != indexList.end(); ++idxIt ) catalog->addIndex( ( *idxIt ).utf8() );*/ addCatalog( catalog ); } catalog->setEnabled( true ); ///Now check if the file was already parsed with the same parameters, if yes don't parse again(auto-update is currently not supported, when major changes have been done in the libraries, the repository should be deleted) - QValueList<Catalog::QueryArgument> args; + TQValueList<Catalog::QueryArgument> args; bool compatibleParsed = false; Tag compatibleParsedTag; args << Catalog::QueryArgument( "kind", Tag::Kind_TranslationUnit ); args << Catalog::QueryArgument( "fileName", file->fileName() ); - QValueList<Tag> tags( catalog->query( args ) ); + TQValueList<Tag> tags( catalog->query( args ) ); if( !tags.isEmpty() ) { - for( QValueList<Tag>::const_iterator it = tags.begin(); it != tags.end(); ++it ) { + for( TQValueList<Tag>::const_iterator it = tags.begin(); it != tags.end(); ++it ) { if( (*it).hasAttribute( "cppparsedfile" ) ) { - QVariant v = (*it).attribute( "cppparsedfile" ); + TQVariant v = (*it).attribute( "cppparsedfile" ); ///@todo reenable this - /*QByteArray b = v.toByteArray(); + /*TQByteArray b = v.toByteArray(); if( !b.isEmpty() ) { //Would be much more efficient not to do this deserialization ParsedFile f(b); @@ -3105,8 +3105,8 @@ void CppSupportPart::addToRepository( ParsedFilePointer file ) { if( compatibleParsed ) { ///Add a Tag that makes sure that the file will not be parsed again compatibleParsedTag.setAttribute( "includedFrom", file->includedFrom() ); - QByteArray data; - QDataStream s( data, IO_WriteOnly ); + TQByteArray data; + TQDataStream s( data, IO_WriteOnly ); file->write( s ); compatibleParsedTag.setAttribute( "cppparsedfile", data ); catalog->addItem( compatibleParsedTag ); @@ -3118,32 +3118,32 @@ void CppSupportPart::addToRepository( ParsedFilePointer file ) { w.parseTranslationUnit( *file ); codeRepository()->touchCatalog( catalog ); - m_safeProjectFiles.insert( file->fileName() + "||" + QString("%1").arg(file->usedMacros().valueHash()) + "||" + QString("%1").arg(file->usedMacros().idHash()) ); + m_safeProjectFiles.insert( file->fileName() + "||" + TQString("%1").arg(file->usedMacros().valueHash()) + "||" + TQString("%1").arg(file->usedMacros().idHash()) ); } -QString CppSupportPart::findHeaderSimple( const QString &header ) +TQString CppSupportPart::findHeaderSimple( const TQString &header ) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = m_projectFileList.begin(); it != m_projectFileList.end(); ++it ) { - QString s = *it; + TQString s = *it; if (s == header) return s; if ( ( s.right( header.length() ) == header ) && ( s[s.length() - header.length() - 1] == '/' ) ) return s; } - return QString::null; + return TQString::null; } -UIBlockTester::UIBlockTesterThread::UIBlockTesterThread( UIBlockTester& parent ) : QThread(), m_parent( parent ), m_stop(false) { +UIBlockTester::UIBlockTesterThread::UIBlockTesterThread( UIBlockTester& parent ) : TQThread(), m_parent( parent ), m_stop(false) { } void UIBlockTester::UIBlockTesterThread::run() { while(!m_stop) { msleep( m_parent.m_msecs / 10 ); m_parent.m_timeMutex.lock(); - QDateTime t = QDateTime::currentDateTime(); + TQDateTime t = TQDateTime::currentDateTime(); uint msecs = m_parent.m_lastTime.time().msecsTo( t.time() ); if( msecs > m_parent.m_msecs ) { m_parent.lockup(); @@ -3158,9 +3158,9 @@ void UIBlockTester::UIBlockTesterThread::stop() { } UIBlockTester::UIBlockTester( uint milliseconds ) : m_thread( *this ), m_msecs( milliseconds ) { - m_timer = new QTimer( this ); + m_timer = new TQTimer( this ); m_timer->start( milliseconds/10 ); - connect( m_timer, SIGNAL(timeout()), this, SLOT(timer()) ); + connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timer()) ); timer(); m_thread.start(); } @@ -3171,7 +3171,7 @@ UIBlockTester::~UIBlockTester() { void UIBlockTester::timer() { m_timeMutex.lock(); - m_lastTime = QDateTime::currentDateTime(); + m_lastTime = TQDateTime::currentDateTime(); m_timeMutex.unlock(); } |