diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /buildtools/qmake/scope.cpp | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/qmake/scope.cpp')
-rw-r--r-- | buildtools/qmake/scope.cpp | 360 |
1 files changed, 180 insertions, 180 deletions
diff --git a/buildtools/qmake/scope.cpp b/buildtools/qmake/scope.cpp index 3f182ded..e332edd2 100644 --- a/buildtools/qmake/scope.cpp +++ b/buildtools/qmake/scope.cpp @@ -31,7 +31,7 @@ #include "trollprojectpart.h" #include "qmakedefaultopts.h" -const TQStringList Scope::KnownVariables = TQStringList() << "QT" << "CONFIG" << "TEMPLATE" << "SUBDIRS" << "VERSION" << "LIBS" << "target.path" << "INSTALLS" << "MAKEFILE" << "TARGETDEPS" << "INCLUDEPATH" << "TARGET" << "DESTDIR" << "DEFINES" << "QMAKE_CXXFLAGS_DEBUG" << "QMAKE_CXXFLAGS_RELEASE" << "OBJECTS_DIR" << "UI_DIR" << "MOC_DIR" << "IDL_COMPILER" << "IDL_OPTIONS" << "RCC_DIR" << "IDLS" << "RESOURCES" << "IMAGES" << "LEXSOURCES" << "DISTFILES" << "YACCSOURCES" << "TRANSLATIONS" << "HEADERS" << "SOURCES" << "INTERFACES" << "FORMS" ; +const TQStringList Scope::KnownVariables = TQStringList() << "QT" << "CONFIG" << "TEMPLATE" << "SUBDIRS" << "VERSION" << "LIBS" << "target.path" << "INSTALLS" << "MAKEFILE" << "TARGETDEPS" << "INCLUDEPATH" << "TARGET" << "DESTDIR" << "DEFINES" << "TQMAKE_CXXFLAGS_DEBUG" << "TQMAKE_CXXFLAGS_RELEASE" << "OBJECTS_DIR" << "UI_DIR" << "TQMOC_DIR" << "IDL_COMPILER" << "IDL_OPTIONS" << "RCC_DIR" << "IDLS" << "RESOURCES" << "IMAGES" << "LEXSOURCES" << "DISTFILES" << "YACCSOURCES" << "TRANSLATIONS" << "HEADERS" << "SOURCES" << "INTERFACES" << "FORMS" ; const TQStringList Scope::KnownConfigValues = TQStringList() << "debug" << "release" << "debug_and_release" << "warn_on" << "warn_off" << "staticlib" << "dll" << "plugin" << "designer" << "create_pkgconf" << "create_libtool" << "qt" << "console" << "windows" << "x11" << "thread" << "exceptions" << "stl" << "rtti" << "opengl" << "thread" << "ordered" << "precompile_header" << "qtestlib" << "uitools" << "dbus" << "assistant" << "build_all" << "help"; @@ -42,7 +42,7 @@ Scope::Scope( const TQMap<TQString, TQString>& env, const TQString &filename, Tr { if( !TQFileInfo( filename ).exists() ) { - m_root = new QMake::ProjectAST(); + m_root = new TQMake::ProjectAST(); m_root->setFileName( filename ); }else { @@ -80,25 +80,25 @@ Scope::~Scope() } // Simple/Function Scopes -Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, QMake::ProjectAST* scope, - QMakeDefaultOpts* defaultopts, TrollProjectPart* part ) - : m_root( scope ), m_incast( 0 ), m_parent( parent ), m_num(num), m_isEnabled( true ), +Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* tqparent, TQMake::ProjectAST* scope, + TQMakeDefaultOpts* defaultopts, TrollProjectPart* part ) + : m_root( scope ), m_incast( 0 ), m_parent( tqparent ), m_num(num), m_isEnabled( true ), m_part(part), m_defaultopts(defaultopts), m_environment( env ) { init(); } //Subdirs -Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, const TQString& filename, +Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* tqparent, const TQString& filename, TrollProjectPart* part, bool isEnabled ) - : m_root( 0 ), m_incast( 0 ), m_parent( parent ), m_num(num), m_isEnabled( isEnabled ), + : m_root( 0 ), m_incast( 0 ), m_parent( tqparent ), m_num(num), m_isEnabled( isEnabled ), m_part(part), m_defaultopts(0), m_environment( env ) { if ( !loadFromFile( filename ) ) { if( !TQFileInfo( filename ).exists() && TQFileInfo( TQFileInfo( filename ).dirPath( true ) ).exists() ) { - m_root = new QMake::ProjectAST(); + m_root = new TQMake::ProjectAST(); m_root->setFileName( filename ); }else { @@ -114,15 +114,15 @@ Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* par } //Include Scope -Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, QMake::IncludeAST* incast, const TQString& path, - const TQString& incfile, QMakeDefaultOpts* defaultopts, TrollProjectPart* part ) - : m_root( 0 ), m_incast( incast ), m_parent( parent ), m_num(num), m_isEnabled( true ), +Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* tqparent, TQMake::IncludeAST* incast, const TQString& path, + const TQString& incfile, TQMakeDefaultOpts* defaultopts, TrollProjectPart* part ) + : m_root( 0 ), m_incast( incast ), m_parent( tqparent ), m_num(num), m_isEnabled( true ), m_part(part), m_defaultopts(defaultopts), m_environment( env ) { TQString absfilename; TQString tmp = incfile.stripWhiteSpace(); - if( tmp.contains(")" ) ) - tmp = tmp.mid(0, tmp.find(")") ); + if( tmp.tqcontains(")" ) ) + tmp = tmp.mid(0, tmp.tqfind(")") ); if( tmp.startsWith( "\"" ) ) tmp = tmp.mid( 1, tmp.length()-2 ); @@ -136,7 +136,7 @@ Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* par { if( !TQFileInfo( absfilename ).exists() && TQFileInfo( TQFileInfo( absfilename ).dirPath( true ) ).exists() ) { - m_root = new QMake::ProjectAST(); + m_root = new TQMake::ProjectAST(); m_root->setFileName( absfilename ); }else { @@ -152,13 +152,13 @@ Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* par bool Scope::loadFromFile( const TQString& filename ) { - if ( !TQFileInfo(filename).exists() || QMake::Driver::parseFile( filename, &m_root, 0 ) != 0 ) + if ( !TQFileInfo(filename).exists() || TQMake::Driver::parseFile( filename, &m_root, 0 ) != 0 ) { kdDebug( 9024 ) << "Couldn't parse project: " << filename << endl; if( DomUtil::readBoolEntry( *m_part->projectDom(), "/kdevtrollproject/qmake/showParseErrors", true ) ) { - KMessageBox::error( 0, i18n( "Could not parse project file: %1" ).arg( filename ), + KMessageBox::error( 0, i18n( "Could not parse project file: %1" ).tqarg( filename ), i18n( "Could not parse project file" ) ); } m_root = 0; @@ -198,7 +198,7 @@ void Scope::saveToFile() const file.close(); }else { - KMessageBox::error( 0, i18n( "Could not write project file: %1" ).arg( filename ), + KMessageBox::error( 0, i18n( "Could not write project file: %1" ).tqarg( filename ), i18n( "Could not write project file" ) ); } #ifdef DEBUG @@ -291,13 +291,13 @@ TQStringList Scope::variableValuesForOp( const TQString& variable , const TQStri if( !m_root ) return result; - TQValueList<QMake::AST*>::const_iterator it; - for ( it = m_root->m_children.begin(); it != m_root->m_children.end(); ++it ) + TQValueList<TQMake::AST*>::const_iterator it; + for ( it = m_root->m_tqchildren.begin(); it != m_root->m_tqchildren.end(); ++it ) { - QMake::AST* ast = *it; - if ( ast->nodeType() == QMake::AST::AssignmentAST ) + TQMake::AST* ast = *it; + if ( ast->nodeType() == TQMake::AST::AssignmentAST ) { - QMake::AssignmentAST * assign = static_cast<QMake::AssignmentAST*>( ast ); + TQMake::AssignmentAST * assign = static_cast<TQMake::AssignmentAST*>( ast ); if ( assign->scopedID == variable && assign->op == op ) { result += assign->values; @@ -315,7 +315,7 @@ TQStringList Scope::variableValues( const TQString& variable, bool checkIncParen if ( !m_root ) return result; - if( m_varCache.contains( variable ) && fetchFromParent && ( checkIncParent || scopeType() != Scope::IncludeScope ) ) + if( m_varCache.tqcontains( variable ) && fetchFromParent && ( checkIncParent || scopeType() != Scope::IncludeScope ) ) { return m_varCache[variable]; } @@ -329,15 +329,15 @@ TQStringList Scope::variableValues( const TQString& variable, bool checkIncParen return result; } -void Scope::calcValuesFromStatements( const TQString& variable, TQStringList& result, bool checkIncParent, QMake::AST* stopHere, bool fetchFromParent, bool setDefault, bool evaluateSubScopes ) const +void Scope::calcValuesFromStatements( const TQString& variable, TQStringList& result, bool checkIncParent, TQMake::AST* stopHere, bool fetchFromParent, bool setDefault, bool evaluateSubScopes ) const { if( !m_root ) return; /* For variables that we don't know and which are not QT/CONFIG find the default value */ if( setDefault && m_defaultopts - && m_defaultopts->variables().findIndex(variable) != -1 - && ( variable == "TEMPLATE" || variable == "QT" || KnownVariables.findIndex(variable) == -1 || variable == "CONFIG" ) ) + && m_defaultopts->variables().tqfindIndex(variable) != -1 + && ( variable == "TEMPLATE" || variable == "QT" || KnownVariables.tqfindIndex(variable) == -1 || variable == "CONFIG" ) ) { result = m_defaultopts->variableValues(variable); } @@ -351,15 +351,15 @@ void Scope::calcValuesFromStatements( const TQString& variable, TQStringList& re m_parent->calcValuesFromStatements( variable, result, true, this->m_incast, fetchFromParent, setDefault, evaluateSubScopes ); } - TQValueList<QMake::AST*>::const_iterator it; - for ( it = m_root->m_children.begin(); it != m_root->m_children.end(); ++it ) + TQValueList<TQMake::AST*>::const_iterator it; + for ( it = m_root->m_tqchildren.begin(); it != m_root->m_tqchildren.end(); ++it ) { if ( stopHere && *it == stopHere ) return ; - QMake::AST* ast = *it; - if ( ast->nodeType() == QMake::AST::AssignmentAST ) + TQMake::AST* ast = *it; + if ( ast->nodeType() == TQMake::AST::AssignmentAST ) { - QMake::AssignmentAST * assign = static_cast<QMake::AssignmentAST*>( ast ); + TQMake::AssignmentAST * assign = static_cast<TQMake::AssignmentAST*>( ast ); if ( assign->scopedID == variable ) { if ( assign->op == "=" ) @@ -370,7 +370,7 @@ void Scope::calcValuesFromStatements( const TQString& variable, TQStringList& re { for ( TQStringList::const_iterator sit = assign->values.begin(); sit != assign->values.end() ; ++sit ) { - if ( result.findIndex( *sit ) == -1 ) + if ( result.tqfindIndex( *sit ) == -1 ) result.append( *sit ); } } @@ -378,21 +378,21 @@ void Scope::calcValuesFromStatements( const TQString& variable, TQStringList& re { for ( TQStringList::const_iterator sit = assign->values.begin(); sit != assign->values.end() ; ++sit ) { - if ( result.findIndex( *sit ) != -1 ) + if ( result.tqfindIndex( *sit ) != -1 ) result.remove( *sit ); } } } }else if( evaluateSubScopes ) { - if( ast->nodeType() == QMake::AST::IncludeAST ) + if( ast->nodeType() == TQMake::AST::IncludeAST ) { - QMake::IncludeAST* iast = static_cast<QMake::IncludeAST*>(ast); + TQMake::IncludeAST* iast = static_cast<TQMake::IncludeAST*>(ast); TQValueList<unsigned int> l = m_scopes.keys(); for( unsigned int i = 0; i < l.count(); ++i ) { int num = l[ i ]; - if( m_scopes.contains( num ) ) + if( m_scopes.tqcontains( num ) ) { Scope* s = m_scopes[num]; if( s && s->scopeType() == IncludeScope && s->m_incast == iast ) @@ -403,16 +403,16 @@ void Scope::calcValuesFromStatements( const TQString& variable, TQStringList& re } } - else if( ast->nodeType() == QMake::AST::ProjectAST ) + else if( ast->nodeType() == TQMake::AST::ProjectAST ) { - QMake::ProjectAST* past = static_cast<QMake::ProjectAST*>(ast); + TQMake::ProjectAST* past = static_cast<TQMake::ProjectAST*>(ast); if( past->isFunctionScope() || past->isScope() ) { TQValueList<unsigned int> l = m_scopes.keys(); for( unsigned int i = 0; i < l.count(); ++i ) { int num = l[ i ]; - if( m_scopes.contains( num ) ) + if( m_scopes.tqcontains( num ) ) { Scope* s = m_scopes[num]; if( s && s->m_root == past && s->m_root->scopedID == past->scopedID ) @@ -486,13 +486,13 @@ Scope* Scope::createFunctionScope( const TQString& funcName, const TQString& arg if ( !m_root ) return 0; - QMake::ProjectAST* ast = new QMake::ProjectAST( QMake::ProjectAST::FunctionScope ); + TQMake::ProjectAST* ast = new TQMake::ProjectAST( TQMake::ProjectAST::FunctionScope ); ast->scopedID = funcName; ast->args = args; ast->setDepth( m_root->depth() ); - ast->addChildAST( new QMake::NewLineAST() ); + ast->addChildAST( new TQMake::NewLineAST() ); m_root->addChildAST( ast ); - m_root->addChildAST( new QMake::NewLineAST() ); + m_root->addChildAST( new TQMake::NewLineAST() ); Scope* funcScope = new Scope( m_environment, getNextScopeNum(), this, ast, m_defaultopts, m_part ); if( funcScope->scopeType() != Scope::InvalidScope ) { @@ -508,14 +508,14 @@ Scope* Scope::createSimpleScope( const TQString& scopename ) if ( !m_root ) return 0; - QMake::ProjectAST* ast = new QMake::ProjectAST( QMake::ProjectAST::Scope ); + TQMake::ProjectAST* ast = new TQMake::ProjectAST( TQMake::ProjectAST::Scope ); ast->scopedID = scopename; - ast->addChildAST( new QMake::NewLineAST() ); + ast->addChildAST( new TQMake::NewLineAST() ); ast->setDepth( m_root->depth() ); m_root->addChildAST( ast ); - m_root->addChildAST( new QMake::NewLineAST() ); + m_root->addChildAST( new TQMake::NewLineAST() ); /* We can't unconditionally add the scope name to CONFIG, scope might be win32 which may only be in CONFIG under windows. - if ( m_part->isQt4Project() ) + if ( m_part->isTQt4Project() ) addToPlusOp( "CONFIG", TQStringList( scopename ) ); */ Scope* simpleScope = new Scope( m_environment, getNextScopeNum(), this, ast, m_defaultopts, m_part ); @@ -547,7 +547,7 @@ Scope* Scope::createIncludeScope( const TQString& includeFile, bool negate ) if( funcScope == 0 ) return 0; - QMake::IncludeAST* ast = new QMake::IncludeAST(); + TQMake::IncludeAST* ast = new TQMake::IncludeAST(); ast->setDepth( m_root->depth() ); ast->projectName = includeFile; Scope* incScope = new Scope( m_environment, funcScope->getNextScopeNum(), funcScope, ast, projectDir(), resolveVariables( ast->projectName ), m_defaultopts, m_part ); @@ -571,17 +571,17 @@ Scope* Scope::createSubProject( const TQString& projname ) if( !m_root ) return 0; - if( variableValuesForOp( "SUBDIRS", "-=").findIndex( projname ) != -1 ) + if( variableValuesForOp( "SUBDIRS", "-=").tqfindIndex( projname ) != -1 ) removeFromMinusOp( "SUBDIRS", projname ); TQString realprojname = resolveVariables(projname); - if( variableValuesForOp( "SUBDIRS", "-=").findIndex( realprojname ) != -1 ) + if( variableValuesForOp( "SUBDIRS", "-=").tqfindIndex( realprojname ) != -1 ) removeFromMinusOp( "SUBDIRS", realprojname ); TQDir curdir( projectDir() ); - if ( variableValues("TEMPLATE").findIndex( "subdirs" ) != -1 ) + if ( variableValues("TEMPLATE").tqfindIndex( "subdirs" ) != -1 ) { TQString filename; if( !realprojname.endsWith(".pro") ) @@ -592,7 +592,7 @@ Scope* Scope::createSubProject( const TQString& projname ) curdir.cd( realprojname ); TQStringList entries = curdir.entryList("*.pro", TQDir::Files); - if ( !entries.isEmpty() && entries.findIndex( curdir.dirName()+".pro" ) == -1 ) + if ( !entries.isEmpty() && entries.tqfindIndex( curdir.dirName()+".pro" ) == -1 ) filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+entries.first(); else filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+curdir.dirName()+".pro"; @@ -622,13 +622,13 @@ Scope* Scope::createSubProject( const TQString& projname ) bool Scope::deleteFunctionScope( unsigned int num ) { - if ( !m_root || !m_scopes.contains( num ) ) + if ( !m_root || !m_scopes.tqcontains( num ) ) return false; Scope* funcScope = m_scopes[ num ]; if ( funcScope ) { - QMake::AST* ast = m_root->m_children[ m_root->m_children.findIndex( funcScope->m_root ) ]; + TQMake::AST* ast = m_root->m_tqchildren[ m_root->m_tqchildren.tqfindIndex( funcScope->m_root ) ]; if( !ast ) return false; m_scopes.remove( num ); @@ -642,13 +642,13 @@ bool Scope::deleteFunctionScope( unsigned int num ) bool Scope::deleteSimpleScope( unsigned int num ) { - if ( !m_root || !m_scopes.contains( num ) ) + if ( !m_root || !m_scopes.tqcontains( num ) ) return false; Scope* simpleScope = m_scopes[ num ]; if ( simpleScope ) { - QMake::AST* ast = m_root->m_children[ m_root->m_children.findIndex( simpleScope->m_root ) ]; + TQMake::AST* ast = m_root->m_tqchildren[ m_root->m_tqchildren.tqfindIndex( simpleScope->m_root ) ]; if( !ast ) return false; m_scopes.remove( num ); @@ -663,13 +663,13 @@ bool Scope::deleteSimpleScope( unsigned int num ) bool Scope::deleteIncludeScope( unsigned int num ) { - if ( !m_root || !m_scopes.contains( num ) ) + if ( !m_root || !m_scopes.tqcontains( num ) ) return false; Scope * incScope = m_scopes[ num ]; if( !incScope ) return false; - QMake::AST* ast = incScope->m_incast; + TQMake::AST* ast = incScope->m_incast; if( !ast ) return false; m_scopes.remove( num ); @@ -682,14 +682,14 @@ bool Scope::deleteIncludeScope( unsigned int num ) bool Scope::deleteSubProject( unsigned int num, bool deleteSubdir ) { - if ( !m_root || !m_scopes.contains( num ) ) + if ( !m_root || !m_scopes.tqcontains( num ) ) return false; - TQValueList<QMake::AST*>::iterator it = findExistingVariable( "TEMPLATE" ); - if ( it != m_root->m_children.end() ) + TQValueList<TQMake::AST*>::iterator it = findExistingVariable( "TEMPLATE" ); + if ( it != m_root->m_tqchildren.end() ) { - QMake::AssignmentAST * tempast = static_cast<QMake::AssignmentAST*>( *it ); - if ( tempast->values.findIndex( "subdirs" ) != -1 || findExistingVariable( "TEMPLATE" ) != m_root->m_children.end() ) + TQMake::AssignmentAST * tempast = static_cast<TQMake::AssignmentAST*>( *it ); + if ( tempast->values.tqfindIndex( "subdirs" ) != -1 || findExistingVariable( "TEMPLATE" ) != m_root->m_tqchildren.end() ) { Scope* project = m_scopes[ num ]; if( !project ) @@ -722,12 +722,12 @@ bool Scope::deleteSubProject( unsigned int num, bool deleteSubdir ) kdDebug(9024) << "removed subproject?:" << d.remove( dir ) << endl; } } - TQValueList<QMake::AST*>::iterator foundit = findExistingVariable( "SUBDIRS" ); - if ( foundit != m_root->m_children.end() ) + TQValueList<TQMake::AST*>::iterator foundit = findExistingVariable( "SUBDIRS" ); + if ( foundit != m_root->m_tqchildren.end() ) { - QMake::AssignmentAST * ast = static_cast<QMake::AssignmentAST*>( *foundit ); + TQMake::AssignmentAST * ast = static_cast<TQMake::AssignmentAST*>( *foundit ); updateValues( ast->values, TQStringList( projdir ), true, ast->indent ); - if( m_varCache.contains( "SUBDIRS" ) ) + if( m_varCache.tqcontains( "SUBDIRS" ) ) m_varCache.erase( "SUBDIRS" ); }else return false; @@ -746,7 +746,7 @@ void Scope::updateValues( TQStringList& origValues, const TQStringList& newValue for ( TQStringList::const_iterator it = newValues.begin(); it != newValues.end() ; ++it ) { - if ( origValues.findIndex( *it ) == -1 && !remove ) + if ( origValues.tqfindIndex( *it ) == -1 && !remove ) { while ( !origValues.isEmpty() && origValues.last() == getLineEndingString() ) origValues.pop_back(); @@ -769,17 +769,17 @@ void Scope::updateValues( TQStringList& origValues, const TQStringList& newValue origValues.append(" "); TQString newval = *it; TQRegExp re("([^$])\\$([^$\\(\\)\\{\\} /]*)( |\\)|/)"); - newval.replace(re, "\\1$(\\2)\\3"); - if( (newval).contains(" ") || (newval).contains("\t") || (newval).contains( getLineEndingString() ) || (newval).contains("#") ) + newval.tqreplace(re, "\\1$(\\2)\\3"); + if( (newval).tqcontains(" ") || (newval).tqcontains("\t") || (newval).tqcontains( getLineEndingString() ) || (newval).tqcontains("#") ) origValues.append( "\""+newval+"\"" ); else origValues.append( newval ); origValues.append( getLineEndingString() ); - } else if ( origValues.findIndex( *it ) != -1 && remove ) + } else if ( origValues.tqfindIndex( *it ) != -1 && remove ) { - TQStringList::iterator posit = origValues.find( *it ); + TQStringList::iterator posit = origValues.tqfind( *it ); posit = origValues.remove( posit ); - while( posit != origValues.end() && ( (*posit).find( TQRegExp("\\\\[\\s]*"+getLineEndingString() ) ) != -1 + while( posit != origValues.end() && ( (*posit).tqfind( TQRegExp("\\\\[\\s]*"+getLineEndingString() ) ) != -1 || (*posit).stripWhiteSpace() == "" ) ) { posit = origValues.remove( posit ); @@ -790,9 +790,9 @@ void Scope::updateValues( TQStringList& origValues, const TQStringList& newValue || origValues.last() == getLineEndingString() || origValues.last().stripWhiteSpace() == "" ) && !origValues.isEmpty() ) origValues.pop_back(); - if( !origValues.isEmpty() && origValues.last().find( TQRegExp("\\\\[ \t]*#") ) != -1 ) - origValues[origValues.count()-1] = origValues[origValues.count()-1].mid(origValues[origValues.count()-1].find( "#") ); - if( !origValues.isEmpty() && origValues.last().find( getLineEndingString() ) == -1 ) + if( !origValues.isEmpty() && origValues.last().tqfind( TQRegExp("\\\\[ \t]*#") ) != -1 ) + origValues[origValues.count()-1] = origValues[origValues.count()-1].mid(origValues[origValues.count()-1].tqfind( "#") ); + if( !origValues.isEmpty() && origValues.last().tqfind( getLineEndingString() ) == -1 ) origValues.append(getLineEndingString()); } @@ -801,14 +801,14 @@ void Scope::updateVariable( const TQString& variable, const TQString& op, const if ( !m_root || listIsEmpty( values ) ) return ; - if( m_varCache.contains( variable ) ) + if( m_varCache.tqcontains( variable ) ) m_varCache.erase( variable ); - for ( int i = m_root->m_children.count() - 1; i >= 0; --i ) + for ( int i = m_root->m_tqchildren.count() - 1; i >= 0; --i ) { - if ( m_root->m_children[ i ] ->nodeType() == QMake::AST::AssignmentAST ) + if ( m_root->m_tqchildren[ i ] ->nodeType() == TQMake::AST::AssignmentAST ) { - QMake::AssignmentAST * assignment = static_cast<QMake::AssignmentAST*>( m_root->m_children[ i ] ); + TQMake::AssignmentAST * assignment = static_cast<TQMake::AssignmentAST*>( m_root->m_tqchildren[ i ] ); if ( assignment->scopedID == variable && Scope::isCompatible( assignment->op, op ) ) { updateValues( assignment->values, values, removeFromOp, assignment->indent ); @@ -823,7 +823,7 @@ void Scope::updateVariable( const TQString& variable, const TQString& op, const { for ( TQStringList::const_iterator it = values.begin() ; it != values.end() ; ++it ) { - if ( op == "+=" && !removeFromOp && assignment->values.findIndex( *it ) != -1 ) + if ( op == "+=" && !removeFromOp && assignment->values.tqfindIndex( *it ) != -1 ) { if ( assignment->op == "=" ) { @@ -841,7 +841,7 @@ void Scope::updateVariable( const TQString& variable, const TQString& op, const } } } - else if ( op == "-=" && !removeFromOp && assignment->values.findIndex( *it ) != -1 ) + else if ( op == "-=" && !removeFromOp && assignment->values.tqfindIndex( *it ) != -1 ) { updateValues( assignment->values, TQStringList( *it ), true, assignment->indent ); if ( listIsEmpty( assignment->values ) ) @@ -858,7 +858,7 @@ void Scope::updateVariable( const TQString& variable, const TQString& op, const m_root->removeChildAST( assignment ); delete assignment; } - else if ( assignment->op == "+=" && assignment->values.findIndex( *it ) != -1 ) + else if ( assignment->op == "+=" && assignment->values.tqfindIndex( *it ) != -1 ) { updateValues( assignment->values, TQStringList( *it ), true, assignment->indent ); if ( listIsEmpty( assignment->values ) ) @@ -876,7 +876,7 @@ void Scope::updateVariable( const TQString& variable, const TQString& op, const if ( !removeFromOp ) { - QMake::AssignmentAST * ast = new QMake::AssignmentAST(); + TQMake::AssignmentAST * ast = new TQMake::AssignmentAST(); ast->scopedID = variable; ast->op = op; updateValues( ast->values, values ); @@ -885,31 +885,31 @@ void Scope::updateVariable( const TQString& variable, const TQString& op, const else ast->setDepth( m_root->depth()+1 ); m_root->addChildAST( ast ); - if ( values.findIndex( getLineEndingString() ) == -1 ) + if ( values.tqfindIndex( getLineEndingString() ) == -1 ) { ast->values.append( getLineEndingString() ); } } } -TQValueList<QMake::AST*>::iterator Scope::findExistingVariable( const TQString& variable ) +TQValueList<TQMake::AST*>::iterator Scope::findExistingVariable( const TQString& variable ) { - TQValueList<QMake::AST*>::iterator it; + TQValueList<TQMake::AST*>::iterator it; TQStringList ops; ops << "=" << "+="; - for ( it = m_root->m_children.begin(); it != m_root->m_children.end() ; ++it ) + for ( it = m_root->m_tqchildren.begin(); it != m_root->m_tqchildren.end() ; ++it ) { - if ( ( *it ) ->nodeType() == QMake::AST::AssignmentAST ) + if ( ( *it ) ->nodeType() == TQMake::AST::AssignmentAST ) { - QMake::AssignmentAST * assignment = static_cast<QMake::AssignmentAST*>( *it ); - if ( assignment->scopedID == variable && ops.findIndex( assignment->op ) != -1 ) + TQMake::AssignmentAST * assignment = static_cast<TQMake::AssignmentAST*>( *it ); + if ( assignment->scopedID == variable && ops.tqfindIndex( assignment->op ) != -1 ) { return it; } } } - return m_root->m_children.end(); + return m_root->m_tqchildren.end(); } void Scope::init() @@ -920,17 +920,17 @@ void Scope::init() kdDebug(9024) << "Initializing Scope: " << scopeName() << this << endl; m_maxCustomVarNum = 1; - TQValueList<QMake::AST*>::const_iterator it; - for ( it = m_root->m_children.begin(); it != m_root->m_children.end(); ++it ) + TQValueList<TQMake::AST*>::const_iterator it; + for ( it = m_root->m_tqchildren.begin(); it != m_root->m_tqchildren.end(); ++it ) { - if ( ( *it ) ->nodeType() == QMake::AST::ProjectAST ) + if ( ( *it ) ->nodeType() == TQMake::AST::ProjectAST ) { - QMake::ProjectAST * p = static_cast<QMake::ProjectAST*>( *it ); + TQMake::ProjectAST * p = static_cast<TQMake::ProjectAST*>( *it ); m_scopes.insert( getNextScopeNum(), new Scope( m_environment, getNextScopeNum(), this, p, m_defaultopts, m_part ) ); } - else if ( ( *it ) ->nodeType() == QMake::AST::IncludeAST ) + else if ( ( *it ) ->nodeType() == TQMake::AST::IncludeAST ) { - QMake::IncludeAST * i = static_cast<QMake::IncludeAST*>( *it ); + TQMake::IncludeAST * i = static_cast<TQMake::IncludeAST*>( *it ); TQString filename = i->projectName; if( i->projectName.stripWhiteSpace().startsWith("$") ) { @@ -938,11 +938,11 @@ void Scope::init() } m_scopes.insert( getNextScopeNum(), new Scope( m_environment, getNextScopeNum(), this, i, projectDir(), filename, m_defaultopts, m_part ) ); } - else if ( ( *it ) ->nodeType() == QMake::AST::AssignmentAST ) + else if ( ( *it ) ->nodeType() == TQMake::AST::AssignmentAST ) { - QMake::AssignmentAST * m = static_cast<QMake::AssignmentAST*>( *it ); + TQMake::AssignmentAST * m = static_cast<TQMake::AssignmentAST*>( *it ); // Check wether TEMPLATE==subdirs here too! - if ( m->scopedID == "SUBDIRS" && variableValues("TEMPLATE").findIndex("subdirs") != -1 ) + if ( m->scopedID == "SUBDIRS" && variableValues("TEMPLATE").tqfindIndex("subdirs") != -1 ) { for ( TQStringList::const_iterator sit = m->values.begin() ; sit != m->values.end(); ++sit ) { @@ -977,7 +977,7 @@ void Scope::init() }else continue; } - if ( subproject.entryList().isEmpty() || subproject.entryList().findIndex( str + ".pro" ) != -1 ) + if ( subproject.entryList().isEmpty() || subproject.entryList().tqfindIndex( str + ".pro" ) != -1 ) projectfile = (str) + ".pro"; else projectfile = subproject.entryList().first(); @@ -992,16 +992,16 @@ void Scope::init() else { if ( !( - KnownVariables.findIndex( m->scopedID ) != -1 + KnownVariables.tqfindIndex( m->scopedID ) != -1 && ( m->op == "=" || m->op == "+=" || m->op == "-=") ) && !( - ( m->scopedID.contains( ".files" ) || m->scopedID.contains( ".path" ) ) - && variableValues("INSTALLS").findIndex(m->scopedID.left( m->scopedID.findRev(".") != -1 ) ) + ( m->scopedID.tqcontains( ".files" ) || m->scopedID.tqcontains( ".path" ) ) + && variableValues("INSTALLS").tqfindIndex(m->scopedID.left( m->scopedID.tqfindRev(".") != -1 ) ) ) && !( - ( m->scopedID.contains( ".subdir" ) ) - && variableValues("SUBDIRS").findIndex(m->scopedID.left( m->scopedID.findRev(".") != -1 ) ) + ( m->scopedID.tqcontains( ".subdir" ) ) + && variableValues("SUBDIRS").tqfindIndex(m->scopedID.left( m->scopedID.tqfindRev(".") != -1 ) ) ) ) { @@ -1040,7 +1040,7 @@ const TQMap<unsigned int, TQMap<TQString, TQString> > Scope::customVariables() c if( !m_root ) return result; - TQMap<unsigned int, QMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); + TQMap<unsigned int, TQMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); for ( ; it != m_customVariables.end(); ++it ) { TQMap<TQString,TQString> temp; @@ -1056,11 +1056,11 @@ void Scope::updateCustomVariable( unsigned int id, const TQString& name, const T { if( !m_root ) return; - if ( id > 0 && m_customVariables.contains( id ) ) + if ( id > 0 && m_customVariables.tqcontains( id ) ) { m_customVariables[ id ] ->values.clear(); updateValues( m_customVariables[ id ] ->values, newvalues.stripWhiteSpace() ); - if( m_varCache.contains( m_customVariables[ id ]->scopedID ) ) + if( m_varCache.tqcontains( m_customVariables[ id ]->scopedID ) ) m_varCache.erase( m_customVariables[ id ]->scopedID ); m_customVariables[ id ] ->op = newop; m_customVariables[ id ] ->scopedID = name; @@ -1069,7 +1069,7 @@ void Scope::updateCustomVariable( unsigned int id, const TQString& name, const T unsigned int Scope::addCustomVariable( const TQString& var, const TQString& op, const TQString& values ) { - QMake::AssignmentAST* newast = new QMake::AssignmentAST(); + TQMake::AssignmentAST* newast = new TQMake::AssignmentAST(); newast->scopedID = var; newast->op = op; newast->values.append(values.stripWhiteSpace()); @@ -1084,11 +1084,11 @@ unsigned int Scope::addCustomVariable( const TQString& var, const TQString& op, void Scope::removeCustomVariable( unsigned int id ) { - if( m_customVariables.contains(id) ) + if( m_customVariables.tqcontains(id) ) { - QMake::AssignmentAST* m = m_customVariables[id]; + TQMake::AssignmentAST* m = m_customVariables[id]; m_customVariables.remove(id); - m_root->m_children.remove( m ); + m_root->m_tqchildren.remove( m ); } } @@ -1097,12 +1097,12 @@ bool Scope::isVariableReset( const TQString& var ) bool result = false; if( !m_root ) return result; - TQValueList<QMake::AST*>::const_iterator it = m_root->m_children.begin(); - for ( ; it != m_root->m_children.end(); ++it ) + TQValueList<TQMake::AST*>::const_iterator it = m_root->m_tqchildren.begin(); + for ( ; it != m_root->m_tqchildren.end(); ++it ) { - if ( ( *it ) ->nodeType() == QMake::AST::AssignmentAST ) + if ( ( *it ) ->nodeType() == TQMake::AST::AssignmentAST ) { - QMake::AssignmentAST * ast = static_cast<QMake::AssignmentAST*>( *it ); + TQMake::AssignmentAST * ast = static_cast<TQMake::AssignmentAST*>( *it ); if ( ast->scopedID == var && ast->op == "=" ) { result = true; @@ -1118,18 +1118,18 @@ void Scope::removeVariable( const TQString& var, const TQString& op ) if ( !m_root ) return ; - QMake::AssignmentAST* ast = 0; + TQMake::AssignmentAST* ast = 0; - TQValueList<QMake::AST*>::iterator it = m_root->m_children.begin(); - for ( ; it != m_root->m_children.end(); ++it ) + TQValueList<TQMake::AST*>::iterator it = m_root->m_tqchildren.begin(); + for ( ; it != m_root->m_tqchildren.end(); ++it ) { - if ( ( *it ) ->nodeType() == QMake::AST::AssignmentAST ) + if ( ( *it ) ->nodeType() == TQMake::AST::AssignmentAST ) { - ast = static_cast<QMake::AssignmentAST*>( *it ); + ast = static_cast<TQMake::AssignmentAST*>( *it ); if ( ast->scopedID == var && ast->op == op ) { - m_root->m_children.remove( ast ); - it = m_root->m_children.begin(); + m_root->m_tqchildren.remove( ast ); + it = m_root->m_tqchildren.begin(); } } } @@ -1182,9 +1182,9 @@ TQStringList Scope::cleanStringList(const TQStringList& list) const return result; } -bool Scope::isQt4Project() const +bool Scope::isTQt4Project() const { - return m_part->isQt4Project(); + return m_part->isTQt4Project(); } void Scope::reloadProject() @@ -1209,7 +1209,7 @@ void Scope::reloadProject() delete m_root; if ( !loadFromFile( filename ) && !TQFileInfo( filename ).exists() ) { - m_root = new QMake::ProjectAST(); + m_root = new TQMake::ProjectAST(); m_root->setFileName( filename ); } init(); @@ -1220,20 +1220,20 @@ Scope* Scope::disableSubproject( const TQString& dir) if( !m_root || ( m_root->isProject() && !m_incast ) ) return 0; - if( scopeType() != Scope::IncludeScope && variableValuesForOp( "SUBDIRS", "+=").findIndex( dir ) != -1 ) + if( scopeType() != Scope::IncludeScope && variableValuesForOp( "SUBDIRS", "+=").tqfindIndex( dir ) != -1 ) removeFromPlusOp( "SUBDIRS", dir ); else if( scopeType() != Scope::IncludeScope ) removeFromPlusOp( "SUBDIRS", dir ); TQDir curdir( projectDir() ); - if ( variableValues("TEMPLATE").findIndex( "subdirs" ) != -1 ) + if ( variableValues("TEMPLATE").tqfindIndex( "subdirs" ) != -1 ) { curdir.cd(dir); TQString filename; TQStringList entries = curdir.entryList("*.pro", TQDir::Files); - if ( !entries.isEmpty() && entries.findIndex( curdir.dirName()+".pro" ) != -1 ) + if ( !entries.isEmpty() && entries.tqfindIndex( curdir.dirName()+".pro" ) != -1 ) filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+entries.first(); else filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+curdir.dirName()+".pro"; @@ -1255,12 +1255,12 @@ TQString Scope::resolveVariables( const TQString& value ) const } -TQString Scope::resolveVariables( const TQString& value, QMake::AST* stopHere ) const +TQString Scope::resolveVariables( const TQString& value, TQMake::AST* stopHere ) const { return resolveVariables(TQStringList(value), stopHere).front(); } -TQStringList Scope::variableValues( const TQString& variable, QMake::AST* stopHere, bool fetchFromParent ) const +TQStringList Scope::variableValues( const TQString& variable, TQMake::AST* stopHere, bool fetchFromParent ) const { TQStringList result; @@ -1272,7 +1272,7 @@ TQStringList Scope::variableValues( const TQString& variable, QMake::AST* stopHe return result; } -TQStringList Scope::resolveVariables( const TQStringList& values, QMake::AST* stopHere ) const +TQStringList Scope::resolveVariables( const TQStringList& values, TQMake::AST* stopHere ) const { TQStringList result = values; TQMap<TQString, TQStringList> variables; @@ -1285,7 +1285,7 @@ TQStringList Scope::resolveVariables( const TQStringList& values, QMake::AST* st pos = re.search( (*it), pos ); if( pos > -1 ) { - if( !variables.contains( re.cap(1) ) ) + if( !variables.tqcontains( re.cap(1) ) ) { variables[re.cap(1)] = resolveVariables( variableValues( re.cap(1), stopHere ) ); if( variables[re.cap(1)].isEmpty() && re.cap(1) == "TARGET" ) @@ -1303,7 +1303,7 @@ TQStringList Scope::resolveVariables( const TQStringList& values, QMake::AST* st pos = re.search( (*it), pos ); if( pos > -1 ) { - if( !variables.contains( re.cap(1) ) ) + if( !variables.tqcontains( re.cap(1) ) ) { variables[re.cap(1)] = resolveVariables( variableValues( re.cap(1), stopHere ) ); if( variables[re.cap(1)].isEmpty() && re.cap(1) == "TARGET" ) @@ -1322,8 +1322,8 @@ TQStringList Scope::resolveVariables( const TQStringList& values, QMake::AST* st pos = re.search( (*it), pos ); if( pos > -1 ) { - if( !envvars.contains( re.cap(1) ) ) - if( m_environment.contains( re.cap(1) ) != -1 ) + if( !envvars.tqcontains( re.cap(1) ) ) + if( m_environment.tqcontains( re.cap(1) ) != -1 ) envvars[re.cap(1)] = m_environment[ re.cap(1) ]; else if ( ::getenv( re.cap(1).local8Bit() ) != 0 ) envvars[re.cap(1)] = TQString::fromLocal8Bit( ::getenv( re.cap(1).local8Bit() ) ); @@ -1332,14 +1332,14 @@ TQStringList Scope::resolveVariables( const TQStringList& values, QMake::AST* st } for( TQMap<TQString, TQString>::const_iterator it2 = envvars.begin(); it2 != envvars.end(); ++it2 ) { - (*it).replace("$$("+it2.key()+")", it2.data() ); + (*it).tqreplace("$$("+it2.key()+")", it2.data() ); } for( TQMap<TQString, TQStringList>::const_iterator it2 = variables.begin(); it2 != variables.end(); ++it2 ) { for( TQStringList::const_iterator it3 = it2.data().begin(); it3 != it2.data().end(); ++it3 ) { - (*it).replace("$$"+it2.key(), *it3 ); - (*it).replace("$${"+it2.key()+"}", *it3 ); + (*it).tqreplace("$$"+it2.key(), *it3 ); + (*it).tqreplace("$${"+it2.key()+"}", *it3 ); } } } @@ -1353,7 +1353,7 @@ void Scope::allFiles( const TQString& projectDirectory, std::set<TQString>& res TQString file; TQStringList values; TQString header = ""; - if( variableValues("TEMPLATE",false ).findIndex("subdirs") == -1 ) + if( variableValues("TEMPLATE",false ).tqfindIndex("subdirs") == -1 ) { values = variableValues( "INSTALLS" ,false, false ); TQStringList::const_iterator it; @@ -1368,7 +1368,7 @@ void Scope::allFiles( const TQString& projectDirectory, std::set<TQString>& res { file = myRelPath + TQString(TQChar(TQDir::separator())) + *filesit; file = resolveVariables( file ); - if( file.contains("*") ) + if( file.tqcontains("*") ) { TQFileInfo fi( projectDirectory + TQString( TQChar( TQDir::separator() ) ) + file ); TQDir absDir = fi.dir( true ); @@ -1408,7 +1408,7 @@ void Scope::allFiles( const TQString& projectDirectory, std::set<TQString>& res { file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - if( file.contains("*") ) + if( file.tqcontains("*") ) { TQFileInfo fi( projectDirectory + TQString( TQChar( TQDir::separator() ) ) + file ); TQDir absDir = fi.dir( true ); @@ -1426,7 +1426,7 @@ void Scope::allFiles( const TQString& projectDirectory, std::set<TQString>& res } } - if ( isQt4Project() ) + if ( isTQt4Project() ) { values = variableValues( "RESOURCES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) @@ -1481,7 +1481,7 @@ void Scope::allFiles( const TQString& projectDirectory, std::set<TQString>& res file = resolveVariables( file ); res.insert( TQDir::cleanDirPath( file ) ); - if( !m_part->isQt4Project()) + if( !m_part->isTQt4Project()) { header = projectDir()+TQString(TQChar(TQDir::separator())) + *it+".h"; if( TQFileInfo(header).exists() ) @@ -1493,7 +1493,7 @@ void Scope::allFiles( const TQString& projectDirectory, std::set<TQString>& res else { header = projectDir()+TQString(TQChar(TQDir::separator())) + "ui_" +*it; - header.replace(TQRegExp("\\.ui$"),".h"); + header.tqreplace(TQRegExp("\\.ui$"),".h"); if( TQFileInfo(header).exists() ) res.insert( TQDir::cleanDirPath( header ) ); } @@ -1541,7 +1541,7 @@ TQString Scope::findCustomVarForPath( const TQString& path ) if( !m_root ) return result; - TQMap<unsigned int, QMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); + TQMap<unsigned int, TQMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); for( ; it != m_customVariables.end(); ++it ) { kdDebug(9024) << "Checking " << path << " against " << cleanStringList(it.data()->values) << endl; @@ -1552,7 +1552,7 @@ TQString Scope::findCustomVarForPath( const TQString& path ) } if( scopeType() != ProjectScope ) { - return parent()->findCustomVarForPath( path ); + return tqparent()->findCustomVarForPath( path ); } return result; } @@ -1561,7 +1561,7 @@ void Scope::loadDefaultOpts() { if( !m_defaultopts && m_root ) { - m_defaultopts = new QMakeDefaultOpts(); + m_defaultopts = new TQMakeDefaultOpts(); if( DomUtil::readBoolEntry( *m_part->projectDom(), "/kdevtrollproject/qmake/disableDefaultOpts", true ) ) { m_defaultopts->readVariables( m_part->qmakePath(), TQFileInfo( m_root->fileName() ).dirPath( true ) ); @@ -1576,13 +1576,13 @@ TQString Scope::getLineEndingString() const { switch( m_root->lineEnding() ) { - case QMake::ProjectAST::Windows: + case TQMake::ProjectAST::Windows: return TQString("\r\n"); break; - case QMake::ProjectAST::MacOS: + case TQMake::ProjectAST::MacOS: return TQString("\r"); break; - case QMake::ProjectAST::Unix: + case TQMake::ProjectAST::Unix: return TQString("\n"); break; } @@ -1595,13 +1595,13 @@ TQString Scope::getLineEndingString() const TQString Scope::replaceWs(TQString s) { - return s.replace( getLineEndingString(), "%nl").replace("\t", "%tab").replace(" ", "%spc"); + return s.tqreplace( getLineEndingString(), "%nl").tqreplace("\t", "%tab").tqreplace(" ", "%spc"); } bool Scope::containsContinue(const TQString& s ) const { - return( s.find( TQRegExp( "\\\\\\s*"+getLineEndingString() ) ) != -1 - || s.find( TQRegExp( "\\\\\\s*#" ) ) != -1 ); + return( s.tqfind( TQRegExp( "\\\\\\s*"+getLineEndingString() ) ) != -1 + || s.tqfind( TQRegExp( "\\\\\\s*#" ) ) != -1 ); } bool Scope::isComment( const TQString& s) const @@ -1616,86 +1616,86 @@ void Scope::printTree() p.processProject(m_root); } -Scope::PrintAST::PrintAST() : QMake::ASTVisitor() +Scope::PrintAST::PrintAST() : TQMake::ASTVisitor() { indent = 0; } -void Scope::PrintAST::processProject( QMake::ProjectAST* p ) +void Scope::PrintAST::processProject( TQMake::ProjectAST* p ) { - QMake::ASTVisitor::processProject(p); + TQMake::ASTVisitor::processProject(p); } -void Scope::PrintAST::enterRealProject( QMake::ProjectAST* p ) +void Scope::PrintAST::enterRealProject( TQMake::ProjectAST* p ) { kdDebug(9024) << getIndent() << "--------- Entering Project: " << replaceWs(p->fileName()) << " --------------" << endl; indent += 4; - QMake::ASTVisitor::enterRealProject(p); + TQMake::ASTVisitor::enterRealProject(p); } -void Scope::PrintAST::leaveRealProject( QMake::ProjectAST* p ) +void Scope::PrintAST::leaveRealProject( TQMake::ProjectAST* p ) { indent -= 4; kdDebug(9024) << getIndent() << "--------- Leaving Project: " << replaceWs(p->fileName()) << " --------------" << endl; - QMake::ASTVisitor::leaveRealProject(p); + TQMake::ASTVisitor::leaveRealProject(p); } -void Scope::PrintAST::enterScope( QMake::ProjectAST* p ) +void Scope::PrintAST::enterScope( TQMake::ProjectAST* p ) { kdDebug(9024) << getIndent() << "--------- Entering Scope: " << replaceWs(p->scopedID) << " --------------" << endl; indent += 4; - QMake::ASTVisitor::enterScope(p); + TQMake::ASTVisitor::enterScope(p); } -void Scope::PrintAST::leaveScope( QMake::ProjectAST* p ) +void Scope::PrintAST::leaveScope( TQMake::ProjectAST* p ) { indent -= 4; kdDebug(9024) << getIndent() << "--------- Leaving Scope: " << replaceWs(p->scopedID) << " --------------" << endl; - QMake::ASTVisitor::leaveScope(p); + TQMake::ASTVisitor::leaveScope(p); } -void Scope::PrintAST::enterFunctionScope( QMake::ProjectAST* p ) +void Scope::PrintAST::enterFunctionScope( TQMake::ProjectAST* p ) { kdDebug(9024) << getIndent() << "--------- Entering FunctionScope: " << replaceWs(p->scopedID) << "(" << replaceWs(p->args) << ")"<< " --------------" << endl; indent += 4; - QMake::ASTVisitor::enterFunctionScope(p); + TQMake::ASTVisitor::enterFunctionScope(p); } -void Scope::PrintAST::leaveFunctionScope( QMake::ProjectAST* p ) +void Scope::PrintAST::leaveFunctionScope( TQMake::ProjectAST* p ) { indent -= 4; kdDebug(9024) << getIndent() << "--------- Leaving FunctionScope: " << replaceWs(p->scopedID) << "(" << replaceWs(p->args) << ")"<< " --------------" << endl; - QMake::ASTVisitor::leaveFunctionScope(p); + TQMake::ASTVisitor::leaveFunctionScope(p); } TQString Scope::PrintAST::replaceWs(TQString s) { - return s.replace("\n", "%nl").replace("\t", "%tab").replace(" ", "%spc"); + return s.tqreplace("\n", "%nl").tqreplace("\t", "%tab").tqreplace(" ", "%spc"); } -void Scope::PrintAST::processAssignment( QMake::AssignmentAST* a) +void Scope::PrintAST::processAssignment( TQMake::AssignmentAST* a) { kdDebug(9024) << getIndent() << "Assignment: " << replaceWs(a->scopedID) << " " << replaceWs(a->op) << " " << replaceWs(a->values.join("|"))<< endl; - QMake::ASTVisitor::processAssignment(a); + TQMake::ASTVisitor::processAssignment(a); } -void Scope::PrintAST::processNewLine( QMake::NewLineAST* n) +void Scope::PrintAST::processNewLine( TQMake::NewLineAST* n) { kdDebug(9024) << getIndent() << "Newline " << endl; - QMake::ASTVisitor::processNewLine(n); + TQMake::ASTVisitor::processNewLine(n); } -void Scope::PrintAST::processComment( QMake::CommentAST* a) +void Scope::PrintAST::processComment( TQMake::CommentAST* a) { kdDebug(9024) << getIndent() << "Comment: " << replaceWs(a->comment) << endl; - QMake::ASTVisitor::processComment(a); + TQMake::ASTVisitor::processComment(a); } -void Scope::PrintAST::processInclude( QMake::IncludeAST* a) +void Scope::PrintAST::processInclude( TQMake::IncludeAST* a) { kdDebug(9024) << getIndent() << "Include: " << replaceWs(a->projectName) << endl; - QMake::ASTVisitor::processInclude(a); + TQMake::ASTVisitor::processInclude(a); } TQString Scope::PrintAST::getIndent() @@ -1707,4 +1707,4 @@ TQString Scope::PrintAST::getIndent() } #endif -// kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on +// kate: space-indent on; indent-width 4; tab-width 4; tqreplace-tabs on |