From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- buildtools/autotools/makefilehandler.cpp | 54 ++++++++++++++++---------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'buildtools/autotools/makefilehandler.cpp') diff --git a/buildtools/autotools/makefilehandler.cpp b/buildtools/autotools/makefilehandler.cpp index 03ad5277..db30508d 100644 --- a/buildtools/autotools/makefilehandler.cpp +++ b/buildtools/autotools/makefilehandler.cpp @@ -12,12 +12,12 @@ *************************************************************************** */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -26,13 +26,13 @@ #include "makefilehandler.h" -typedef QValueList ASTList; +typedef TQValueList ASTList; class MakefileHandler::Private { public: - QMap projects; - QMap folderToFileMap; + TQMap projects; + TQMap folderToFileMap; }; MakefileHandler::MakefileHandler() @@ -45,23 +45,23 @@ MakefileHandler::~MakefileHandler() delete d; } -void MakefileHandler::parse( const QString& folder, bool recursive ) +void MakefileHandler::parse( const TQString& folder, bool recursive ) { //look for either Makefile.am.in, Makefile.am, or Makefile.in, in that order AutoTools::ProjectAST* ast; int ret = -1; - QString filePath = folder + "/Makefile.am.in"; - if ( QFile::exists( filePath ) ) + TQString filePath = folder + "/Makefile.am.in"; + if ( TQFile::exists( filePath ) ) ret = AutoTools::Driver::parseFile( filePath, &ast ); else { filePath = folder + "/Makefile.am"; - if ( QFile::exists( filePath ) ) + if ( TQFile::exists( filePath ) ) ret = AutoTools::Driver::parseFile( filePath, &ast ); else { filePath = folder + "/Makefile.in"; - if ( QFile::exists( filePath ) ) + if ( TQFile::exists( filePath ) ) ret = AutoTools::Driver::parseFile( filePath, &ast ); else kdDebug(9020) << k_funcinfo << "no appropriate file to parse in " @@ -81,8 +81,8 @@ void MakefileHandler::parse( const QString& folder, bool recursive ) if ( recursive && ast && ast->hasChildren() ) { - QValueList astChildList = ast->children(); - QValueList::iterator it(astChildList.begin()), clEnd(astChildList.end()); + TQValueList astChildList = ast->children(); + TQValueList::iterator it(astChildList.begin()), clEnd(astChildList.end()); for ( ; it != clEnd; ++it ) { if ( (*it)->nodeType() == AutoTools::AST::AssignmentAST ) @@ -90,14 +90,14 @@ void MakefileHandler::parse( const QString& folder, bool recursive ) AutoTools::AssignmentAST* assignment = static_cast( (*it) ); if ( assignment->scopedID == "SUBDIRS" ) { - QString list = assignment->values.join( QString::null ); + TQString list = assignment->values.join( TQString::null ); list.simplifyWhiteSpace(); kdDebug(9020) << k_funcinfo << "subdirs is " << list << endl; - QStringList subdirList = QStringList::split( " ", list ); - QStringList::iterator vit = subdirList.begin(); + TQStringList subdirList = TQStringList::split( " ", list ); + TQStringList::iterator vit = subdirList.begin(); for ( ; vit != subdirList.end(); ++vit ) { - QString realDir = ( *vit ); + TQString realDir = ( *vit ); if ( realDir.startsWith( "\\" ) ) realDir.remove( 0, 1 ); @@ -120,26 +120,26 @@ void MakefileHandler::parse( const QString& folder, bool recursive ) } } -AutoTools::ProjectAST* MakefileHandler::astForFolder( const QString& folderPath ) +AutoTools::ProjectAST* MakefileHandler::astForFolder( const TQString& folderPath ) { if ( d->folderToFileMap.contains( folderPath ) ) { - QString filePath = d->folderToFileMap[folderPath]; + TQString filePath = d->folderToFileMap[folderPath]; return d->projects[filePath]; } else return 0; } -bool MakefileHandler::isVariable( const QString& item ) const +bool MakefileHandler::isVariable( const TQString& item ) const { - if ( item.contains( QRegExp( "(\\$\\([a-zA-Z0-9_-]*\\)|@[a-zA-Z0-9_-]*@)" ) ) ) + if ( item.contains( TQRegExp( "(\\$\\([a-zA-Z0-9_-]*\\)|@[a-zA-Z0-9_-]*@)" ) ) ) return true; else return false; } -QString MakefileHandler::resolveVariable( const QString& variable, AutoTools::ProjectAST* ast ) +TQString MakefileHandler::resolveVariable( const TQString& variable, AutoTools::ProjectAST* ast ) { if ( !ast ) return variable; @@ -155,8 +155,8 @@ QString MakefileHandler::resolveVariable( const QString& variable, AutoTools::Pr if ( variable.find( assignment->scopedID ) != -1 ) { kdDebug(9020) << k_funcinfo << "Resolving variable '" << variable << "' to '" - << assignment->values.join( QString::null ).stripWhiteSpace() << "'" << endl; - return assignment->values.join( QString::null ).stripWhiteSpace(); + << assignment->values.join( TQString::null ).stripWhiteSpace() << "'" << endl; + return assignment->values.join( TQString::null ).stripWhiteSpace(); } } } -- cgit v1.2.1