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 --- languages/cpp/ast_utils.cpp | 50 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'languages/cpp/ast_utils.cpp') diff --git a/languages/cpp/ast_utils.cpp b/languages/cpp/ast_utils.cpp index d21f4782..a6ef1a2b 100644 --- a/languages/cpp/ast_utils.cpp +++ b/languages/cpp/ast_utils.cpp @@ -12,8 +12,8 @@ #include "ast_utils.h" #include "ast.h" -#include -#include +#include +#include #include #include @@ -40,8 +40,8 @@ AST* findNodeAt( AST* node, int line, int column ) ( line < endLine || ( line == endLine && column < endColumn ) ) ) { - QPtrList children = node->children(); - QPtrListIterator it( children ); + TQPtrList children = node->children(); + TQPtrListIterator it( children ); while ( it.current() ) { AST * a = it.current(); @@ -58,7 +58,7 @@ AST* findNodeAt( AST* node, int line, int column ) return 0; } -void scopeOfNode( AST* ast, QStringList& scope ) +void scopeOfNode( AST* ast, TQStringList& scope ) { if ( !ast ) return ; @@ -66,14 +66,14 @@ void scopeOfNode( AST* ast, QStringList& scope ) if ( ast->parent() ) scopeOfNode( ast->parent(), scope ); - QString s; + TQString s; switch ( ast->nodeType() ) { case NodeType_ClassSpecifier: if ( ( ( ClassSpecifierAST* ) ast ) ->name() ) { s = ( ( ClassSpecifierAST* ) ast ) ->name() ->text(); - s = s.isEmpty() ? QString::fromLatin1( "" ) : s; + s = s.isEmpty() ? TQString::fromLatin1( "" ) : s; scope.push_back( s ); } break; @@ -81,7 +81,7 @@ void scopeOfNode( AST* ast, QStringList& scope ) case NodeType_Namespace: { AST* namespaceName = ( ( NamespaceAST* ) ast ) ->namespaceName(); - s = namespaceName ? namespaceName->text() : QString::fromLatin1( "" ); + s = namespaceName ? namespaceName->text() : TQString::fromLatin1( "" ); scope.push_back( s ); } break; @@ -95,8 +95,8 @@ void scopeOfNode( AST* ast, QStringList& scope ) if ( !d->declaratorId() ) break; - QPtrList l = d->declaratorId() ->classOrNamespaceNameList(); - QPtrListIterator nameIt( l ); + TQPtrList l = d->declaratorId() ->classOrNamespaceNameList(); + TQPtrListIterator nameIt( l ); while ( nameIt.current() ) { AST * name = nameIt.current() ->name(); @@ -113,25 +113,25 @@ void scopeOfNode( AST* ast, QStringList& scope ) } -QString typeSpecToString( TypeSpecifierAST* typeSpec ) /// @todo remove +TQString typeSpecToString( TypeSpecifierAST* typeSpec ) /// @todo remove { if ( !typeSpec ) - return QString::null; + return TQString::null; - return typeSpec->text().replace( QRegExp( " :: " ), "::" ); + return typeSpec->text().replace( TQRegExp( " :: " ), "::" ); } -QString declaratorToString( DeclaratorAST* declarator, const QString& scope, bool skipPtrOp ) +TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, bool skipPtrOp ) { if ( !declarator ) - return QString::null; + return TQString::null; - QString text; + TQString text; if ( !skipPtrOp ) { - QPtrList ptrOpList = declarator->ptrOpList(); - for ( QPtrListIterator it( ptrOpList ); it.current(); ++it ) + TQPtrList ptrOpList = declarator->ptrOpList(); + for ( TQPtrListIterator it( ptrOpList ); it.current(); ++it ) { text += it.current() ->text(); } @@ -141,13 +141,13 @@ QString declaratorToString( DeclaratorAST* declarator, const QString& scope, boo text += scope; if ( declarator->subDeclarator() ) - text += QString::fromLatin1( "(" ) + declaratorToString( declarator->subDeclarator() ) + QString::fromLatin1( ")" ); + text += TQString::fromLatin1( "(" ) + declaratorToString( declarator->subDeclarator() ) + TQString::fromLatin1( ")" ); if ( declarator->declaratorId() ) text += declarator->declaratorId() ->text(); - QPtrList arrays = declarator->arrayDimensionList(); - QPtrListIterator it( arrays ); + TQPtrList arrays = declarator->arrayDimensionList(); + TQPtrListIterator it( arrays ); while ( it.current() ) { text += "[]"; @@ -161,12 +161,12 @@ QString declaratorToString( DeclaratorAST* declarator, const QString& scope, boo ParameterDeclarationListAST* l = declarator->parameterDeclarationClause() ->parameterDeclarationList(); if ( l != 0 ) { - QPtrList params = l->parameterList(); - QPtrListIterator it( params ); + TQPtrList params = l->parameterList(); + TQPtrListIterator it( params ); while ( it.current() ) { - QString type = typeSpecToString( it.current() ->typeSpec() ); + TQString type = typeSpecToString( it.current() ->typeSpec() ); text += type; if ( !type.isEmpty() ) text += " "; @@ -185,6 +185,6 @@ QString declaratorToString( DeclaratorAST* declarator, const QString& scope, boo text += " const"; } - return text.replace( QRegExp( " :: " ), "::" ).simplifyWhiteSpace(); + return text.replace( TQRegExp( " :: " ), "::" ).simplifyWhiteSpace(); } //kate: indent-mode csands; tab-width 4; space-indent off; -- cgit v1.2.3