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 /buildtools/qmake/scope.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 'buildtools/qmake/scope.cpp')
-rw-r--r-- | buildtools/qmake/scope.cpp | 480 |
1 files changed, 240 insertions, 240 deletions
diff --git a/buildtools/qmake/scope.cpp b/buildtools/qmake/scope.cpp index c090861b..3f182ded 100644 --- a/buildtools/qmake/scope.cpp +++ b/buildtools/qmake/scope.cpp @@ -13,13 +13,13 @@ #include <kdebug.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qdir.h> -#include <qpair.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqdir.h> +#include <tqpair.h> #include <qmakedriver.h> -#include <qregexp.h> -#include <qtimer.h> +#include <tqregexp.h> +#include <tqtimer.h> #include <kdirwatch.h> @@ -31,16 +31,16 @@ #include "trollprojectpart.h" #include "qmakedefaultopts.h" -const QStringList Scope::KnownVariables = QStringList() << "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" << "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 QStringList Scope::KnownConfigValues = QStringList() << "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"; +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"; -Scope::Scope( const QMap<QString, QString>& env, const QString &filename, TrollProjectPart* part ) +Scope::Scope( const TQMap<TQString, TQString>& env, const TQString &filename, TrollProjectPart* part ) : m_root( 0 ), m_incast( 0 ), m_parent( 0 ), m_num(0), m_isEnabled( true ), m_part(part), m_defaultopts(0), m_environment( env ) { if ( !loadFromFile( filename ) ) { - if( !QFileInfo( filename ).exists() ) + if( !TQFileInfo( filename ).exists() ) { m_root = new QMake::ProjectAST(); m_root->setFileName( filename ); @@ -60,7 +60,7 @@ Scope::Scope( const QMap<QString, QString>& env, const QString &filename, TrollP Scope::~Scope() { - QMap<unsigned int, Scope*>::iterator it; + TQMap<unsigned int, Scope*>::iterator it; for ( it = m_scopes.begin() ; it != m_scopes.end() ; ++it ) { Scope* s = it.data(); @@ -80,7 +80,7 @@ Scope::~Scope() } // Simple/Function Scopes -Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, QMake::ProjectAST* scope, +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 ), m_part(part), m_defaultopts(defaultopts), m_environment( env ) @@ -89,14 +89,14 @@ Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent } //Subdirs -Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, const QString& filename, +Scope::Scope( const TQMap<TQString, TQString>& env, unsigned int num, Scope* parent, const TQString& filename, TrollProjectPart* part, bool isEnabled ) : m_root( 0 ), m_incast( 0 ), m_parent( parent ), m_num(num), m_isEnabled( isEnabled ), m_part(part), m_defaultopts(0), m_environment( env ) { if ( !loadFromFile( filename ) ) { - if( !QFileInfo( filename ).exists() && QFileInfo( QFileInfo( filename ).dirPath( true ) ).exists() ) + if( !TQFileInfo( filename ).exists() && TQFileInfo( TQFileInfo( filename ).dirPath( true ) ).exists() ) { m_root = new QMake::ProjectAST(); m_root->setFileName( filename ); @@ -114,27 +114,27 @@ Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent } //Include Scope -Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent, QMake::IncludeAST* incast, const QString& path, - const QString& incfile, QMakeDefaultOpts* defaultopts, TrollProjectPart* part ) +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 ), m_part(part), m_defaultopts(defaultopts), m_environment( env ) { - QString absfilename; - QString tmp = incfile.stripWhiteSpace(); + TQString absfilename; + TQString tmp = incfile.stripWhiteSpace(); if( tmp.contains(")" ) ) tmp = tmp.mid(0, tmp.find(")") ); if( tmp.startsWith( "\"" ) ) tmp = tmp.mid( 1, tmp.length()-2 ); - if( QFileInfo(tmp).isRelative() ) + if( TQFileInfo(tmp).isRelative() ) { - absfilename = QDir::cleanDirPath( path + QString( QChar( QDir::separator() ) ) + tmp ); + absfilename = TQDir::cleanDirPath( path + TQString( TQChar( TQDir::separator() ) ) + tmp ); }else - absfilename = QDir::cleanDirPath( tmp ); + absfilename = TQDir::cleanDirPath( tmp ); if ( !loadFromFile( absfilename ) ) { - if( !QFileInfo( absfilename ).exists() && QFileInfo( QFileInfo( absfilename ).dirPath( true ) ).exists() ) + if( !TQFileInfo( absfilename ).exists() && TQFileInfo( TQFileInfo( absfilename ).dirPath( true ) ).exists() ) { m_root = new QMake::ProjectAST(); m_root->setFileName( absfilename ); @@ -150,9 +150,9 @@ Scope::Scope( const QMap<QString, QString>& env, unsigned int num, Scope* parent init(); } -bool Scope::loadFromFile( const QString& filename ) +bool Scope::loadFromFile( const TQString& filename ) { - if ( !QFileInfo(filename).exists() || QMake::Driver::parseFile( filename, &m_root, 0 ) != 0 ) + if ( !TQFileInfo(filename).exists() || QMake::Driver::parseFile( filename, &m_root, 0 ) != 0 ) { kdDebug( 9024 ) << "Couldn't parse project: " << filename << endl; if( DomUtil::readBoolEntry( *m_part->projectDom(), @@ -179,20 +179,20 @@ void Scope::saveToFile() const return; } - QString filename; + TQString filename; if ( scopeType() == ProjectScope ) filename = m_root->fileName() ; else if ( scopeType() == IncludeScope ) - filename = m_parent->projectDir() + QString( QChar( QDir::separator() ) ) + m_incast->projectName; + filename = m_parent->projectDir() + TQString( TQChar( TQDir::separator() ) ) + m_incast->projectName; if ( filename.isEmpty() ) return ; m_part->dirWatch()->stopScan(); - QFile file( filename ); + TQFile file( filename ); if ( file.open( IO_WriteOnly ) ) { - QTextStream out( &file ); - QString astbuffer; + TQTextStream out( &file ); + TQString astbuffer; m_root->writeBack( astbuffer ); out << astbuffer; file.close(); @@ -208,7 +208,7 @@ void Scope::saveToFile() const m_part->dirWatch()->startScan(); } -void Scope::addToPlusOp( const QString& variable, const QStringList& values ) +void Scope::addToPlusOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -216,7 +216,7 @@ void Scope::addToPlusOp( const QString& variable, const QStringList& values ) updateVariable( variable, "+=", values, false ); } -void Scope::removeFromPlusOp( const QString& variable, const QStringList& values ) +void Scope::removeFromPlusOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -225,7 +225,7 @@ void Scope::removeFromPlusOp( const QString& variable, const QStringList& values } -void Scope::addToMinusOp( const QString& variable, const QStringList& values ) +void Scope::addToMinusOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -233,7 +233,7 @@ void Scope::addToMinusOp( const QString& variable, const QStringList& values ) updateVariable( variable, "-=", values, false ); } -void Scope::removeFromMinusOp( const QString& variable, const QStringList& values ) +void Scope::removeFromMinusOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -241,7 +241,7 @@ void Scope::removeFromMinusOp( const QString& variable, const QStringList& value updateVariable( variable, "-=", values, true ); } -void Scope::addToEqualOp( const QString& variable, const QStringList& values ) +void Scope::addToEqualOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -249,7 +249,7 @@ void Scope::addToEqualOp( const QString& variable, const QStringList& values ) updateVariable( variable, "=", values, false ); } -void Scope::removeFromEqualOp( const QString& variable, const QStringList& values ) +void Scope::removeFromEqualOp( const TQString& variable, const TQStringList& values ) { if ( !m_root ) return ; @@ -257,7 +257,7 @@ void Scope::removeFromEqualOp( const QString& variable, const QStringList& value updateVariable( variable, "=", values, true ); } -void Scope::setPlusOp( const QString& variable, const QStringList& values ) +void Scope::setPlusOp( const TQString& variable, const TQStringList& values ) { if( !m_root || Scope::listsEqual(values, variableValuesForOp(variable, "+=") ) ) return; @@ -266,7 +266,7 @@ void Scope::setPlusOp( const QString& variable, const QStringList& values ) updateVariable( variable, "+=", values, false ); } -void Scope::setEqualOp( const QString& variable, const QStringList& values ) +void Scope::setEqualOp( const TQString& variable, const TQStringList& values ) { if( !m_root || Scope::listsEqual(values, variableValuesForOp(variable, "=") ) ) return; @@ -275,7 +275,7 @@ void Scope::setEqualOp( const QString& variable, const QStringList& values ) updateVariable( variable, "=", values, false ); } -void Scope::setMinusOp( const QString& variable, const QStringList& values ) +void Scope::setMinusOp( const TQString& variable, const TQStringList& values ) { if( !m_root || Scope::listsEqual(values, variableValuesForOp(variable, "-=") ) ) return; @@ -284,14 +284,14 @@ void Scope::setMinusOp( const QString& variable, const QStringList& values ) updateVariable( variable, "-=", values, false ); } -QStringList Scope::variableValuesForOp( const QString& variable , const QString& op ) const +TQStringList Scope::variableValuesForOp( const TQString& variable , const TQString& op ) const { - QStringList result; + TQStringList result; if( !m_root ) return result; - QValueList<QMake::AST*>::const_iterator it; + TQValueList<QMake::AST*>::const_iterator it; for ( it = m_root->m_children.begin(); it != m_root->m_children.end(); ++it ) { QMake::AST* ast = *it; @@ -308,9 +308,9 @@ QStringList Scope::variableValuesForOp( const QString& variable , const QString& return result; } -QStringList Scope::variableValues( const QString& variable, bool checkIncParent, bool fetchFromParent, bool evaluateSubScopes ) +TQStringList Scope::variableValues( const TQString& variable, bool checkIncParent, bool fetchFromParent, bool evaluateSubScopes ) { - QStringList result; + TQStringList result; if ( !m_root ) return result; @@ -329,7 +329,7 @@ QStringList Scope::variableValues( const QString& variable, bool checkIncParent, return result; } -void Scope::calcValuesFromStatements( const QString& variable, QStringList& result, bool checkIncParent, QMake::AST* stopHere, bool fetchFromParent, bool setDefault, bool evaluateSubScopes ) const +void Scope::calcValuesFromStatements( const TQString& variable, TQStringList& result, bool checkIncParent, QMake::AST* stopHere, bool fetchFromParent, bool setDefault, bool evaluateSubScopes ) const { if( !m_root ) return; @@ -351,7 +351,7 @@ void Scope::calcValuesFromStatements( const QString& variable, QStringList& resu m_parent->calcValuesFromStatements( variable, result, true, this->m_incast, fetchFromParent, setDefault, evaluateSubScopes ); } - QValueList<QMake::AST*>::const_iterator it; + TQValueList<QMake::AST*>::const_iterator it; for ( it = m_root->m_children.begin(); it != m_root->m_children.end(); ++it ) { if ( stopHere && *it == stopHere ) @@ -368,7 +368,7 @@ void Scope::calcValuesFromStatements( const QString& variable, QStringList& resu } else if ( assign->op == "+=" ) { - for ( QStringList::const_iterator sit = assign->values.begin(); sit != assign->values.end() ; ++sit ) + for ( TQStringList::const_iterator sit = assign->values.begin(); sit != assign->values.end() ; ++sit ) { if ( result.findIndex( *sit ) == -1 ) result.append( *sit ); @@ -376,7 +376,7 @@ void Scope::calcValuesFromStatements( const QString& variable, QStringList& resu } else if ( assign->op == "-=" ) { - for ( QStringList::const_iterator sit = assign->values.begin(); sit != assign->values.end() ; ++sit ) + for ( TQStringList::const_iterator sit = assign->values.begin(); sit != assign->values.end() ; ++sit ) { if ( result.findIndex( *sit ) != -1 ) result.remove( *sit ); @@ -388,7 +388,7 @@ void Scope::calcValuesFromStatements( const QString& variable, QStringList& resu if( ast->nodeType() == QMake::AST::IncludeAST ) { QMake::IncludeAST* iast = static_cast<QMake::IncludeAST*>(ast); - QValueList<unsigned int> l = m_scopes.keys(); + TQValueList<unsigned int> l = m_scopes.keys(); for( unsigned int i = 0; i < l.count(); ++i ) { int num = l[ i ]; @@ -408,7 +408,7 @@ void Scope::calcValuesFromStatements( const QString& variable, QStringList& resu QMake::ProjectAST* past = static_cast<QMake::ProjectAST*>(ast); if( past->isFunctionScope() || past->isScope() ) { - QValueList<unsigned int> l = m_scopes.keys(); + TQValueList<unsigned int> l = m_scopes.keys(); for( unsigned int i = 0; i < l.count(); ++i ) { int num = l[ i ]; @@ -445,7 +445,7 @@ Scope::ScopeType Scope::scopeType() const return InvalidScope; } -QString Scope::scopeName() const +TQString Scope::scopeName() const { if ( !m_root ) return ""; @@ -457,31 +457,31 @@ QString Scope::scopeName() const return m_root->scopedID; else if ( m_root->isProject() ) { - if( m_parent && QDir::cleanDirPath( m_parent->projectDir() ) != QDir::cleanDirPath( projectDir() ) ) + if( m_parent && TQDir::cleanDirPath( m_parent->projectDir() ) != TQDir::cleanDirPath( projectDir() ) ) { return URLUtil::getRelativePath( m_parent->projectDir(), projectDir() ); - }else if ( m_parent && QDir::cleanDirPath( m_parent->projectDir() ) == QDir::cleanDirPath( projectDir() ) ) + }else if ( m_parent && TQDir::cleanDirPath( m_parent->projectDir() ) == TQDir::cleanDirPath( projectDir() ) ) { return fileName(); }else - return QFileInfo( projectDir() ).fileName() ; + return TQFileInfo( projectDir() ).fileName() ; } - return QString(); + return TQString(); } -QString Scope::fileName() const +TQString Scope::fileName() const { if( !m_root ) return ""; if ( m_incast ) return m_incast->projectName; else if ( m_root->isProject() ) - return QFileInfo( m_root->fileName() ).fileName(); + return TQFileInfo( m_root->fileName() ).fileName(); else return m_parent->fileName(); } -Scope* Scope::createFunctionScope( const QString& funcName, const QString& args ) +Scope* Scope::createFunctionScope( const TQString& funcName, const TQString& args ) { if ( !m_root ) return 0; @@ -503,7 +503,7 @@ Scope* Scope::createFunctionScope( const QString& funcName, const QString& args return 0; } -Scope* Scope::createSimpleScope( const QString& scopename ) +Scope* Scope::createSimpleScope( const TQString& scopename ) { if ( !m_root ) return 0; @@ -516,7 +516,7 @@ Scope* Scope::createSimpleScope( const QString& scopename ) m_root->addChildAST( new QMake::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() ) - addToPlusOp( "CONFIG", QStringList( scopename ) ); + addToPlusOp( "CONFIG", TQStringList( scopename ) ); */ Scope* simpleScope = new Scope( m_environment, getNextScopeNum(), this, ast, m_defaultopts, m_part ); @@ -530,7 +530,7 @@ Scope* Scope::createSimpleScope( const QString& scopename ) } -Scope* Scope::createIncludeScope( const QString& includeFile, bool negate ) +Scope* Scope::createIncludeScope( const TQString& includeFile, bool negate ) { if ( !m_root ) return 0; @@ -566,7 +566,7 @@ Scope* Scope::createIncludeScope( const QString& includeFile, bool negate ) } -Scope* Scope::createSubProject( const QString& projname ) +Scope* Scope::createSubProject( const TQString& projname ) { if( !m_root ) return 0; @@ -574,30 +574,30 @@ Scope* Scope::createSubProject( const QString& projname ) if( variableValuesForOp( "SUBDIRS", "-=").findIndex( projname ) != -1 ) removeFromMinusOp( "SUBDIRS", projname ); - QString realprojname = resolveVariables(projname); + TQString realprojname = resolveVariables(projname); if( variableValuesForOp( "SUBDIRS", "-=").findIndex( realprojname ) != -1 ) removeFromMinusOp( "SUBDIRS", realprojname ); - QDir curdir( projectDir() ); + TQDir curdir( projectDir() ); if ( variableValues("TEMPLATE").findIndex( "subdirs" ) != -1 ) { - QString filename; + TQString filename; if( !realprojname.endsWith(".pro") ) { if ( !curdir.exists( realprojname ) ) if ( !curdir.mkdir( realprojname ) ) return 0; curdir.cd( realprojname ); - QStringList entries = curdir.entryList("*.pro", QDir::Files); + TQStringList entries = curdir.entryList("*.pro", TQDir::Files); if ( !entries.isEmpty() && entries.findIndex( curdir.dirName()+".pro" ) == -1 ) - filename = curdir.absPath() + QString(QChar(QDir::separator()))+entries.first(); + filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+entries.first(); else - filename = curdir.absPath() + QString(QChar(QDir::separator()))+curdir.dirName()+".pro"; + filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+curdir.dirName()+".pro"; }else - filename = curdir.absPath() + QString(QChar(QDir::separator())) + realprojname; + filename = curdir.absPath() + TQString(TQChar(TQDir::separator())) + realprojname; kdDebug( 9024 ) << "Creating subproject with filename:" << filename << endl; @@ -606,9 +606,9 @@ Scope* Scope::createSubProject( const QString& projname ) if ( s->scopeType() != InvalidScope ) { if( s->variableValues("TEMPLATE").isEmpty() ) - s->setEqualOp("TEMPLATE", QStringList("app")); + s->setEqualOp("TEMPLATE", TQStringList("app")); s->saveToFile(); - addToPlusOp( "SUBDIRS", QStringList( realprojname ) ); + addToPlusOp( "SUBDIRS", TQStringList( realprojname ) ); m_scopes.insert( getNextScopeNum(), s ); return s; } else @@ -685,7 +685,7 @@ bool Scope::deleteSubProject( unsigned int num, bool deleteSubdir ) if ( !m_root || !m_scopes.contains( num ) ) return false; - QValueList<QMake::AST*>::iterator it = findExistingVariable( "TEMPLATE" ); + TQValueList<QMake::AST*>::iterator it = findExistingVariable( "TEMPLATE" ); if ( it != m_root->m_children.end() ) { QMake::AssignmentAST * tempast = static_cast<QMake::AssignmentAST*>( *it ); @@ -695,18 +695,18 @@ bool Scope::deleteSubProject( unsigned int num, bool deleteSubdir ) if( !project ) return false; - QString projdir = project->scopeName(); + TQString projdir = project->scopeName(); if ( deleteSubdir ) { - QDir projdir = QDir( projectDir() ); - QString dir = project->scopeName(); + TQDir projdir = TQDir( projectDir() ); + TQString dir = project->scopeName(); if( !dir.endsWith(".pro") ) { - QDir subdir = QDir( projectDir() + QString( QChar( QDir::separator() ) ) + dir ); + TQDir subdir = TQDir( projectDir() + TQString( TQChar( TQDir::separator() ) ) + dir ); if ( subdir.exists() ) { - QStringList entries = subdir.entryList(); - for ( QStringList::iterator eit = entries.begin() ; eit != entries.end() ; ++eit ) + TQStringList entries = subdir.entryList(); + for ( TQStringList::iterator eit = entries.begin() ; eit != entries.end() ; ++eit ) { if( *eit == "." || *eit == ".." ) continue; @@ -718,15 +718,15 @@ bool Scope::deleteSubProject( unsigned int num, bool deleteSubdir ) } }else { - QDir d( project->projectDir() ); + TQDir d( project->projectDir() ); kdDebug(9024) << "removed subproject?:" << d.remove( dir ) << endl; } } - QValueList<QMake::AST*>::iterator foundit = findExistingVariable( "SUBDIRS" ); + TQValueList<QMake::AST*>::iterator foundit = findExistingVariable( "SUBDIRS" ); if ( foundit != m_root->m_children.end() ) { QMake::AssignmentAST * ast = static_cast<QMake::AssignmentAST*>( *foundit ); - updateValues( ast->values, QStringList( projdir ), true, ast->indent ); + updateValues( ast->values, TQStringList( projdir ), true, ast->indent ); if( m_varCache.contains( "SUBDIRS" ) ) m_varCache.erase( "SUBDIRS" ); }else @@ -739,12 +739,12 @@ bool Scope::deleteSubProject( unsigned int num, bool deleteSubdir ) return false; } -void Scope::updateValues( QStringList& origValues, const QStringList& newValues, bool remove, QString indent ) +void Scope::updateValues( TQStringList& origValues, const TQStringList& newValues, bool remove, TQString indent ) { if( !m_root ) return; - for ( QStringList::const_iterator it = newValues.begin(); it != newValues.end() ; ++it ) + for ( TQStringList::const_iterator it = newValues.begin(); it != newValues.end() ; ++it ) { if ( origValues.findIndex( *it ) == -1 && !remove ) { @@ -767,8 +767,8 @@ void Scope::updateValues( QStringList& origValues, const QStringList& newValues, origValues.append( indent ); }else if ( origValues.isEmpty() ) origValues.append(" "); - QString newval = *it; - QRegExp re("([^$])\\$([^$\\(\\)\\{\\} /]*)( |\\)|/)"); + TQString newval = *it; + TQRegExp re("([^$])\\$([^$\\(\\)\\{\\} /]*)( |\\)|/)"); newval.replace(re, "\\1$(\\2)\\3"); if( (newval).contains(" ") || (newval).contains("\t") || (newval).contains( getLineEndingString() ) || (newval).contains("#") ) origValues.append( "\""+newval+"\"" ); @@ -777,9 +777,9 @@ void Scope::updateValues( QStringList& origValues, const QStringList& newValues, origValues.append( getLineEndingString() ); } else if ( origValues.findIndex( *it ) != -1 && remove ) { - QStringList::iterator posit = origValues.find( *it ); + TQStringList::iterator posit = origValues.find( *it ); posit = origValues.remove( posit ); - while( posit != origValues.end() && ( (*posit).find( QRegExp("\\\\[\\s]*"+getLineEndingString() ) ) != -1 + while( posit != origValues.end() && ( (*posit).find( TQRegExp("\\\\[\\s]*"+getLineEndingString() ) ) != -1 || (*posit).stripWhiteSpace() == "" ) ) { posit = origValues.remove( posit ); @@ -790,13 +790,13 @@ void Scope::updateValues( QStringList& origValues, const QStringList& newValues, || origValues.last() == getLineEndingString() || origValues.last().stripWhiteSpace() == "" ) && !origValues.isEmpty() ) origValues.pop_back(); - if( !origValues.isEmpty() && origValues.last().find( QRegExp("\\\\[ \t]*#") ) != -1 ) + 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 ) origValues.append(getLineEndingString()); } -void Scope::updateVariable( const QString& variable, const QString& op, const QStringList& values, bool removeFromOp ) +void Scope::updateVariable( const TQString& variable, const TQString& op, const TQStringList& values, bool removeFromOp ) { if ( !m_root || listIsEmpty( values ) ) return ; @@ -821,7 +821,7 @@ void Scope::updateVariable( const QString& variable, const QString& op, const QS } else if ( assignment->scopedID == variable && !Scope::isCompatible( assignment->op, op ) ) { - for ( QStringList::const_iterator it = values.begin() ; it != values.end() ; ++it ) + for ( TQStringList::const_iterator it = values.begin() ; it != values.end() ; ++it ) { if ( op == "+=" && !removeFromOp && assignment->values.findIndex( *it ) != -1 ) { @@ -832,7 +832,7 @@ void Scope::updateVariable( const QString& variable, const QString& op, const QS } else if ( assignment->op == "-=" ) { - updateValues( assignment->values, QStringList( *it ), true, assignment->indent ); + updateValues( assignment->values, TQStringList( *it ), true, assignment->indent ); if ( listIsEmpty( assignment->values ) ) { m_root->removeChildAST( assignment ); @@ -843,7 +843,7 @@ void Scope::updateVariable( const QString& variable, const QString& op, const QS } else if ( op == "-=" && !removeFromOp && assignment->values.findIndex( *it ) != -1 ) { - updateValues( assignment->values, QStringList( *it ), true, assignment->indent ); + updateValues( assignment->values, TQStringList( *it ), true, assignment->indent ); if ( listIsEmpty( assignment->values ) ) { m_root->removeChildAST( assignment ); @@ -860,7 +860,7 @@ void Scope::updateVariable( const QString& variable, const QString& op, const QS } else if ( assignment->op == "+=" && assignment->values.findIndex( *it ) != -1 ) { - updateValues( assignment->values, QStringList( *it ), true, assignment->indent ); + updateValues( assignment->values, TQStringList( *it ), true, assignment->indent ); if ( listIsEmpty( assignment->values ) ) { m_root->removeChildAST( assignment ); @@ -892,10 +892,10 @@ void Scope::updateVariable( const QString& variable, const QString& op, const QS } } -QValueList<QMake::AST*>::iterator Scope::findExistingVariable( const QString& variable ) +TQValueList<QMake::AST*>::iterator Scope::findExistingVariable( const TQString& variable ) { - QValueList<QMake::AST*>::iterator it; - QStringList ops; + TQValueList<QMake::AST*>::iterator it; + TQStringList ops; ops << "=" << "+="; for ( it = m_root->m_children.begin(); it != m_root->m_children.end() ; ++it ) @@ -920,7 +920,7 @@ void Scope::init() kdDebug(9024) << "Initializing Scope: " << scopeName() << this << endl; m_maxCustomVarNum = 1; - QValueList<QMake::AST*>::const_iterator it; + TQValueList<QMake::AST*>::const_iterator it; for ( it = m_root->m_children.begin(); it != m_root->m_children.end(); ++it ) { if ( ( *it ) ->nodeType() == QMake::AST::ProjectAST ) @@ -931,7 +931,7 @@ void Scope::init() else if ( ( *it ) ->nodeType() == QMake::AST::IncludeAST ) { QMake::IncludeAST * i = static_cast<QMake::IncludeAST*>( *it ); - QString filename = i->projectName; + TQString filename = i->projectName; if( i->projectName.stripWhiteSpace().startsWith("$") ) { filename = resolveVariables(i->projectName, *it); @@ -944,36 +944,36 @@ void Scope::init() // Check wether TEMPLATE==subdirs here too! if ( m->scopedID == "SUBDIRS" && variableValues("TEMPLATE").findIndex("subdirs") != -1 ) { - for ( QStringList::const_iterator sit = m->values.begin() ; sit != m->values.end(); ++sit ) + for ( TQStringList::const_iterator sit = m->values.begin() ; sit != m->values.end(); ++sit ) { - QString str = *sit; + TQString str = *sit; if ( containsContinue( str ) || isComment( str ) || str == getLineEndingString() || str == "." || str == "./" || (str).stripWhiteSpace() == "" ) continue; - QDir subproject; - QString projectfile; + TQDir subproject; + TQString projectfile; kdDebug(9024) << "reading subproject: " << str << endl; if( str.startsWith("$") ) str = resolveVariables(str, *it); if( str.endsWith(".pro") ) { - subproject = QDir( projectDir(), "*.pro", QDir::Name | QDir::IgnoreCase, QDir::Files ); + subproject = TQDir( projectDir(), "*.pro", TQDir::Name | TQDir::IgnoreCase, TQDir::Files ); projectfile = str; }else { - QString dir = str; - if( QFileInfo( dir ).isRelative() ) - dir = projectDir() + QString( QChar( QDir::separator() ) ) + dir; - subproject = QDir( dir, - "*.pro", QDir::Name | QDir::IgnoreCase, QDir::Files ); + TQString dir = str; + if( TQFileInfo( dir ).isRelative() ) + dir = projectDir() + TQString( TQChar( TQDir::separator() ) ) + dir; + subproject = TQDir( dir, + "*.pro", TQDir::Name | TQDir::IgnoreCase, TQDir::Files ); if( !subproject.exists() ) { kdDebug(9024) << "Project Dir doesn't exist, trying to find name.subdir variable:" << str << endl; if( !variableValues(str+".subdir").isEmpty() ) { kdDebug(9024) << "Found name.subdir variable for " << str << endl; - subproject = QDir( projectDir() + QString( QChar( QDir::separator() ) ) + subproject = TQDir( projectDir() + TQString( TQChar( TQDir::separator() ) ) + variableValues(str+".subdir").first(), - "*.pro", QDir::Name | QDir::IgnoreCase, QDir::Files ); + "*.pro", TQDir::Name | TQDir::IgnoreCase, TQDir::Files ); }else continue; } @@ -1012,21 +1012,21 @@ void Scope::init() } } -QString Scope::projectName() const +TQString Scope::projectName() const { if( !m_root ) return ""; - return QFileInfo( projectDir() ).fileName(); + return TQFileInfo( projectDir() ).fileName(); } -QString Scope::projectDir() const +TQString Scope::projectDir() const { if( !m_root ) return ""; if ( m_root->isProject() ) { - return QFileInfo( m_root->fileName() ).dirPath( true ); + return TQFileInfo( m_root->fileName() ).dirPath( true ); } else { @@ -1034,16 +1034,16 @@ QString Scope::projectDir() const } } -const QMap<unsigned int, QMap<QString, QString> > Scope::customVariables() const +const TQMap<unsigned int, TQMap<TQString, TQString> > Scope::customVariables() const { - QMap<unsigned int, QMap<QString, QString> > result; + TQMap<unsigned int, TQMap<TQString, TQString> > result; if( !m_root ) return result; - QMap<unsigned int, QMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); + TQMap<unsigned int, QMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); for ( ; it != m_customVariables.end(); ++it ) { - QMap<QString,QString> temp; + TQMap<TQString,TQString> temp; temp[ "var" ] = it.data()->scopedID; temp[ "op" ] = it.data()->op; temp[ "values" ] = it.data()->values.join("").stripWhiteSpace(); @@ -1052,7 +1052,7 @@ const QMap<unsigned int, QMap<QString, QString> > Scope::customVariables() const return result; } -void Scope::updateCustomVariable( unsigned int id, const QString& name, const QString& newop, const QString& newvalues ) +void Scope::updateCustomVariable( unsigned int id, const TQString& name, const TQString& newop, const TQString& newvalues ) { if( !m_root ) return; @@ -1067,7 +1067,7 @@ void Scope::updateCustomVariable( unsigned int id, const QString& name, const QS } } -unsigned int Scope::addCustomVariable( const QString& var, const QString& op, const QString& values ) +unsigned int Scope::addCustomVariable( const TQString& var, const TQString& op, const TQString& values ) { QMake::AssignmentAST* newast = new QMake::AssignmentAST(); newast->scopedID = var; @@ -1092,12 +1092,12 @@ void Scope::removeCustomVariable( unsigned int id ) } } -bool Scope::isVariableReset( const QString& var ) +bool Scope::isVariableReset( const TQString& var ) { bool result = false; if( !m_root ) return result; - QValueList<QMake::AST*>::const_iterator it = m_root->m_children.begin(); + TQValueList<QMake::AST*>::const_iterator it = m_root->m_children.begin(); for ( ; it != m_root->m_children.end(); ++it ) { if ( ( *it ) ->nodeType() == QMake::AST::AssignmentAST ) @@ -1113,14 +1113,14 @@ bool Scope::isVariableReset( const QString& var ) return result; } -void Scope::removeVariable( const QString& var, const QString& op ) +void Scope::removeVariable( const TQString& var, const TQString& op ) { if ( !m_root ) return ; QMake::AssignmentAST* ast = 0; - QValueList<QMake::AST*>::iterator it = m_root->m_children.begin(); + TQValueList<QMake::AST*>::iterator it = m_root->m_children.begin(); for ( ; it != m_root->m_children.end(); ++it ) { if ( ( *it ) ->nodeType() == QMake::AST::AssignmentAST ) @@ -1135,11 +1135,11 @@ void Scope::removeVariable( const QString& var, const QString& op ) } } -bool Scope::listIsEmpty( const QStringList& values ) +bool Scope::listIsEmpty( const TQStringList& values ) { if ( values.size() < 1 ) return true; - for ( QStringList::const_iterator it = values.begin(); it != values.end(); ++it ) + for ( TQStringList::const_iterator it = values.begin(); it != values.end(); ++it ) { if ( ( *it ).stripWhiteSpace() != "" && ( *it ).stripWhiteSpace() != "\\" ) return false; @@ -1147,7 +1147,7 @@ bool Scope::listIsEmpty( const QStringList& values ) return true; } -bool Scope::isCompatible( const QString& op1, const QString& op2) +bool Scope::isCompatible( const TQString& op1, const TQString& op2) { if( op1 == "+=" ) return ( op2 == "+=" || op2 == "=" ); @@ -1158,21 +1158,21 @@ bool Scope::isCompatible( const QString& op1, const QString& op2) return false; } -bool Scope::listsEqual(const QStringList& l1, const QStringList& l2) +bool Scope::listsEqual(const TQStringList& l1, const TQStringList& l2) { - QStringList left = l1; - QStringList right = l2; + TQStringList left = l1; + TQStringList right = l2; // left.sort(); // right.sort(); return (left == right); } -QStringList Scope::cleanStringList(const QStringList& list) const +TQStringList Scope::cleanStringList(const TQStringList& list) const { - QStringList result; - for( QStringList::const_iterator it = list.begin(); it != list.end(); ++it ) + TQStringList result; + for( TQStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { - QString s = *it; + TQString s = *it; if( s.stripWhiteSpace() != "" && !containsContinue(s) && s.stripWhiteSpace() != getLineEndingString() @@ -1192,8 +1192,8 @@ void Scope::reloadProject() if ( !m_root || !m_root->isProject() ) return; - QString filename = m_root->fileName(); - QMap<unsigned int, Scope*>::iterator it; + TQString filename = m_root->fileName(); + TQMap<unsigned int, Scope*>::iterator it; for ( it = m_scopes.begin() ; it != m_scopes.end() ; ++it ) { Scope* s = it.data(); @@ -1207,7 +1207,7 @@ void Scope::reloadProject() if ( m_root->isProject() ) delete m_root; - if ( !loadFromFile( filename ) && !QFileInfo( filename ).exists() ) + if ( !loadFromFile( filename ) && !TQFileInfo( filename ).exists() ) { m_root = new QMake::ProjectAST(); m_root->setFileName( filename ); @@ -1215,7 +1215,7 @@ void Scope::reloadProject() init(); } -Scope* Scope::disableSubproject( const QString& dir) +Scope* Scope::disableSubproject( const TQString& dir) { if( !m_root || ( m_root->isProject() && !m_incast ) ) return 0; @@ -1225,23 +1225,23 @@ Scope* Scope::disableSubproject( const QString& dir) else if( scopeType() != Scope::IncludeScope ) removeFromPlusOp( "SUBDIRS", dir ); - QDir curdir( projectDir() ); + TQDir curdir( projectDir() ); if ( variableValues("TEMPLATE").findIndex( "subdirs" ) != -1 ) { curdir.cd(dir); - QString filename; - QStringList entries = curdir.entryList("*.pro", QDir::Files); + TQString filename; + TQStringList entries = curdir.entryList("*.pro", TQDir::Files); if ( !entries.isEmpty() && entries.findIndex( curdir.dirName()+".pro" ) != -1 ) - filename = curdir.absPath() + QString(QChar(QDir::separator()))+entries.first(); + filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+entries.first(); else - filename = curdir.absPath() + QString(QChar(QDir::separator()))+curdir.dirName()+".pro"; + filename = curdir.absPath() + TQString(TQChar(TQDir::separator()))+curdir.dirName()+".pro"; kdDebug( 9024 ) << "Disabling subproject with filename:" << filename << endl; Scope* s = new Scope( m_environment, getNextScopeNum(), this, filename, m_part, false ); - addToMinusOp( "SUBDIRS", QStringList( dir ) ); + addToMinusOp( "SUBDIRS", TQStringList( dir ) ); m_scopes.insert( getNextScopeNum(), s ); return s; } @@ -1249,20 +1249,20 @@ Scope* Scope::disableSubproject( const QString& dir) return 0; } -QString Scope::resolveVariables( const QString& value ) const +TQString Scope::resolveVariables( const TQString& value ) const { - return resolveVariables(QStringList(value), 0).front(); + return resolveVariables(TQStringList(value), 0).front(); } -QString Scope::resolveVariables( const QString& value, QMake::AST* stopHere ) const +TQString Scope::resolveVariables( const TQString& value, QMake::AST* stopHere ) const { - return resolveVariables(QStringList(value), stopHere).front(); + return resolveVariables(TQStringList(value), stopHere).front(); } -QStringList Scope::variableValues( const QString& variable, QMake::AST* stopHere, bool fetchFromParent ) const +TQStringList Scope::variableValues( const TQString& variable, QMake::AST* stopHere, bool fetchFromParent ) const { - QStringList result; + TQStringList result; if ( !m_root ) return result; @@ -1272,13 +1272,13 @@ QStringList Scope::variableValues( const QString& variable, QMake::AST* stopHere return result; } -QStringList Scope::resolveVariables( const QStringList& values, QMake::AST* stopHere ) const +TQStringList Scope::resolveVariables( const TQStringList& values, QMake::AST* stopHere ) const { - QStringList result = values; - QMap<QString, QStringList> variables; - for( QStringList::iterator it = result.begin(); it != result.end(); ++it ) + TQStringList result = values; + TQMap<TQString, TQStringList> variables; + for( TQStringList::iterator it = result.begin(); it != result.end(); ++it ) { - QRegExp re("\\$\\$([^{}\\) /]*)( |\\)|/|$)"); + TQRegExp re("\\$\\$([^{}\\) /]*)( |\\)|/|$)"); int pos = 0; while( pos >= 0 ) { @@ -1290,13 +1290,13 @@ QStringList Scope::resolveVariables( const QStringList& values, QMake::AST* stop variables[re.cap(1)] = resolveVariables( variableValues( re.cap(1), stopHere ) ); if( variables[re.cap(1)].isEmpty() && re.cap(1) == "TARGET" ) { - variables[re.cap(1)] = QFileInfo( fileName() ).baseName(); + variables[re.cap(1)] = TQFileInfo( fileName() ).baseName(); } } pos += re.matchedLength(); } } - re = QRegExp("\\$\\$\\{([^\\)\\}]*)\\}"); + re = TQRegExp("\\$\\$\\{([^\\)\\}]*)\\}"); pos = 0; while( pos >= 0 ) { @@ -1308,15 +1308,15 @@ QStringList Scope::resolveVariables( const QStringList& values, QMake::AST* stop variables[re.cap(1)] = resolveVariables( variableValues( re.cap(1), stopHere ) ); if( variables[re.cap(1)].isEmpty() && re.cap(1) == "TARGET" ) { - variables[re.cap(1)] = QFileInfo( fileName() ).baseName(); + variables[re.cap(1)] = TQFileInfo( fileName() ).baseName(); } } pos += re.matchedLength(); } } - re = QRegExp("\\$\\$\\(([^\\)\\}]*)\\)"); + re = TQRegExp("\\$\\$\\(([^\\)\\}]*)\\)"); pos = 0; - QMap<QString, QString> envvars; + TQMap<TQString, TQString> envvars; while( pos >= 0 ) { pos = re.search( (*it), pos ); @@ -1326,17 +1326,17 @@ QStringList Scope::resolveVariables( const QStringList& values, QMake::AST* stop if( m_environment.contains( 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)] = QString::fromLocal8Bit( ::getenv( re.cap(1).local8Bit() ) ); + envvars[re.cap(1)] = TQString::fromLocal8Bit( ::getenv( re.cap(1).local8Bit() ) ); pos += re.matchedLength(); } } - for( QMap<QString, QString>::const_iterator it2 = envvars.begin(); it2 != envvars.end(); ++it2 ) + for( TQMap<TQString, TQString>::const_iterator it2 = envvars.begin(); it2 != envvars.end(); ++it2 ) { (*it).replace("$$("+it2.key()+")", it2.data() ); } - for( QMap<QString, QStringList>::const_iterator it2 = variables.begin(); it2 != variables.end(); ++it2 ) + for( TQMap<TQString, TQStringList>::const_iterator it2 = variables.begin(); it2 != variables.end(); ++it2 ) { - for( QStringList::const_iterator it3 = it2.data().begin(); it3 != it2.data().end(); ++it3 ) + for( TQStringList::const_iterator it3 = it2.data().begin(); it3 != it2.data().end(); ++it3 ) { (*it).replace("$$"+it2.key(), *it3 ); (*it).replace("$${"+it2.key()+"}", *it3 ); @@ -1346,43 +1346,43 @@ QStringList Scope::resolveVariables( const QStringList& values, QMake::AST* stop return result; } -void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) +void Scope::allFiles( const TQString& projectDirectory, std::set<TQString>& res ) { - QString myRelPath = URLUtil::getRelativePath( projectDirectory, projectDir() ); - QString file; - QStringList values; - QString header = ""; + TQString myRelPath = URLUtil::getRelativePath( projectDirectory, projectDir() ); + TQString file; + TQStringList values; + TQString header = ""; if( variableValues("TEMPLATE",false ).findIndex("subdirs") == -1 ) { values = variableValues( "INSTALLS" ,false, false ); - QStringList::const_iterator it; + TQStringList::const_iterator it; for ( it = values.begin(); it != values.end(); ++it ) { if ( ( *it ) == "target" ) continue; - QStringList files = variableValues( *it + ".files" ,false, false ); - QStringList::iterator filesit = files.begin(); + TQStringList files = variableValues( *it + ".files" ,false, false ); + TQStringList::iterator filesit = files.begin(); for ( ;filesit != files.end(); ++filesit ) { - file = myRelPath + QString(QChar(QDir::separator())) + *filesit; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *filesit; file = resolveVariables( file ); if( file.contains("*") ) { - QFileInfo fi( projectDirectory + QString( QChar( QDir::separator() ) ) + file ); - QDir absDir = fi.dir( true ); + TQFileInfo fi( projectDirectory + TQString( TQChar( TQDir::separator() ) ) + file ); + TQDir absDir = fi.dir( true ); absDir.setNameFilter( fi.fileName() ); - absDir.setFilter( QDir::Files | QDir::Readable | QDir::NoSymLinks ); - QStringList list = absDir.entryList(); - for( QStringList::const_iterator it = list.begin(); it != list.end(); ++it ) + absDir.setFilter( TQDir::Files | TQDir::Readable | TQDir::NoSymLinks ); + TQStringList list = absDir.entryList(); + for( TQStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { - res.insert( QDir::cleanDirPath( URLUtil::getRelativePath( projectDirectory, absDir.path()+QString( QChar( QDir::separator() ) )+*it ) ) ); + res.insert( TQDir::cleanDirPath( URLUtil::getRelativePath( projectDirectory, absDir.path()+TQString( TQChar( TQDir::separator() ) )+*it ) ) ); } } else { - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } } } @@ -1390,39 +1390,39 @@ void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) values = variableValues( "LEXSOURCES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } values = variableValues( "YACCSOURCES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } values = variableValues( "DISTFILES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); if( file.contains("*") ) { - QFileInfo fi( projectDirectory + QString( QChar( QDir::separator() ) ) + file ); - QDir absDir = fi.dir( true ); + TQFileInfo fi( projectDirectory + TQString( TQChar( TQDir::separator() ) ) + file ); + TQDir absDir = fi.dir( true ); absDir.setNameFilter( fi.fileName() ); - absDir.setFilter( QDir::Files | QDir::Readable | QDir::NoSymLinks ); - QStringList list = absDir.entryList(); - for( QStringList::const_iterator it = list.begin(); it != list.end(); ++it ) + absDir.setFilter( TQDir::Files | TQDir::Readable | TQDir::NoSymLinks ); + TQStringList list = absDir.entryList(); + for( TQStringList::const_iterator it = list.begin(); it != list.end(); ++it ) { - res.insert( QDir::cleanDirPath( URLUtil::getRelativePath( projectDirectory, absDir.path()+QString( QChar( QDir::separator() ) )+*it ) ) ); + res.insert( TQDir::cleanDirPath( URLUtil::getRelativePath( projectDirectory, absDir.path()+TQString( TQChar( TQDir::separator() ) )+*it ) ) ); } } else { - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } } @@ -1431,33 +1431,33 @@ void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) values = variableValues( "RESOURCES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } } values = variableValues( "IMAGES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } values = variableValues( "TRANSLATIONS" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } values = variableValues( "IDLS" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } if ( m_part->isTMakeProject() ) @@ -1465,11 +1465,11 @@ void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) values = variableValues( "INTERFACES" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); - if( QFileInfo(projectDir()+QString(QChar(QDir::separator())) + *it+".h").exists() ) - res.insert( QDir::cleanDirPath( file+".h" ) ); + res.insert( TQDir::cleanDirPath( file ) ); + if( TQFileInfo(projectDir()+TQString(TQChar(TQDir::separator())) + *it+".h").exists() ) + res.insert( TQDir::cleanDirPath( file+".h" ) ); } } else @@ -1477,25 +1477,25 @@ void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) values = variableValues( "FORMS" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); if( !m_part->isQt4Project()) { - header = projectDir()+QString(QChar(QDir::separator())) + *it+".h"; - if( QFileInfo(header).exists() ) - res.insert( QDir::cleanDirPath( header ) ); - header = projectDir()+QString(QChar(QDir::separator())) + *it+".cpp"; - if( QFileInfo(header).exists() ) - res.insert( QDir::cleanDirPath( header ) ); + header = projectDir()+TQString(TQChar(TQDir::separator())) + *it+".h"; + if( TQFileInfo(header).exists() ) + res.insert( TQDir::cleanDirPath( header ) ); + header = projectDir()+TQString(TQChar(TQDir::separator())) + *it+".cpp"; + if( TQFileInfo(header).exists() ) + res.insert( TQDir::cleanDirPath( header ) ); } else { - header = projectDir()+QString(QChar(QDir::separator())) + "ui_" +*it; - header.replace(QRegExp("\\.ui$"),".h"); - if( QFileInfo(header).exists() ) - res.insert( QDir::cleanDirPath( header ) ); + header = projectDir()+TQString(TQChar(TQDir::separator())) + "ui_" +*it; + header.replace(TQRegExp("\\.ui$"),".h"); + if( TQFileInfo(header).exists() ) + res.insert( TQDir::cleanDirPath( header ) ); } } } @@ -1504,44 +1504,44 @@ void Scope::allFiles( const QString& projectDirectory, std::set<QString>& res ) kdDebug(9024) << "scope:" << scopeType() << " found values: " << values << endl; for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } values = variableValues( "HEADERS" ,false, false ); for ( it = values.begin(); it != values.end(); ++it ) { - file = myRelPath + QString(QChar(QDir::separator())) + *it; + file = myRelPath + TQString(TQChar(TQDir::separator())) + *it; file = resolveVariables( file ); - res.insert( QDir::cleanDirPath( file ) ); + res.insert( TQDir::cleanDirPath( file ) ); } } - QMap<unsigned int, Scope*>::const_iterator it = m_scopes.begin(); + TQMap<unsigned int, Scope*>::const_iterator it = m_scopes.begin(); for( ; it != m_scopes.end(); ++it ) { it.data()->allFiles( projectDirectory, res ); } } -QStringList Scope::allFiles( const QString& projectDir ) +TQStringList Scope::allFiles( const TQString& projectDir ) { - QStringList result; - std::set<QString> files; + TQStringList result; + std::set<TQString> files; allFiles( projectDir, files ); - for( std::set<QString>::const_iterator it = files.begin(); it != files.end() ; ++it ) + for( std::set<TQString>::const_iterator it = files.begin(); it != files.end() ; ++it ) result.append( *it ); kdDebug(9024) << "all files: " << result << endl; return result; } -QString Scope::findCustomVarForPath( const QString& path ) +TQString Scope::findCustomVarForPath( const TQString& path ) { - QString result; + TQString result; if( !m_root ) return result; - QMap<unsigned int, QMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); + TQMap<unsigned int, QMake::AssignmentAST*>::const_iterator it = m_customVariables.begin(); for( ; it != m_customVariables.end(); ++it ) { kdDebug(9024) << "Checking " << path << " against " << cleanStringList(it.data()->values) << endl; @@ -1564,12 +1564,12 @@ void Scope::loadDefaultOpts() m_defaultopts = new QMakeDefaultOpts(); if( DomUtil::readBoolEntry( *m_part->projectDom(), "/kdevtrollproject/qmake/disableDefaultOpts", true ) ) { - m_defaultopts->readVariables( m_part->qmakePath(), QFileInfo( m_root->fileName() ).dirPath( true ) ); + m_defaultopts->readVariables( m_part->qmakePath(), TQFileInfo( m_root->fileName() ).dirPath( true ) ); } } } -QString Scope::getLineEndingString() const +TQString Scope::getLineEndingString() const { if( scopeType() == ProjectScope ) @@ -1577,13 +1577,13 @@ QString Scope::getLineEndingString() const switch( m_root->lineEnding() ) { case QMake::ProjectAST::Windows: - return QString("\r\n"); + return TQString("\r\n"); break; case QMake::ProjectAST::MacOS: - return QString("\r"); + return TQString("\r"); break; case QMake::ProjectAST::Unix: - return QString("\n"); + return TQString("\n"); break; } }else if( m_parent ) @@ -1593,18 +1593,18 @@ QString Scope::getLineEndingString() const return "\n"; } -QString Scope::replaceWs(QString s) +TQString Scope::replaceWs(TQString s) { return s.replace( getLineEndingString(), "%nl").replace("\t", "%tab").replace(" ", "%spc"); } -bool Scope::containsContinue(const QString& s ) const +bool Scope::containsContinue(const TQString& s ) const { - return( s.find( QRegExp( "\\\\\\s*"+getLineEndingString() ) ) != -1 - || s.find( QRegExp( "\\\\\\s*#" ) ) != -1 ); + return( s.find( TQRegExp( "\\\\\\s*"+getLineEndingString() ) ) != -1 + || s.find( TQRegExp( "\\\\\\s*#" ) ) != -1 ); } -bool Scope::isComment( const QString& s) const +bool Scope::isComment( const TQString& s) const { return s.startsWith("#"); } @@ -1668,7 +1668,7 @@ void Scope::PrintAST::leaveFunctionScope( QMake::ProjectAST* p ) QMake::ASTVisitor::leaveFunctionScope(p); } -QString Scope::PrintAST::replaceWs(QString s) +TQString Scope::PrintAST::replaceWs(TQString s) { return s.replace("\n", "%nl").replace("\t", "%tab").replace(" ", "%spc"); } @@ -1698,9 +1698,9 @@ void Scope::PrintAST::processInclude( QMake::IncludeAST* a) QMake::ASTVisitor::processInclude(a); } -QString Scope::PrintAST::getIndent() +TQString Scope::PrintAST::getIndent() { - QString ind; + TQString ind; for( int i = 0 ; i < indent ; i++) ind += " "; return ind; |