summaryrefslogtreecommitdiffstats
path: root/languages/cpp/ast_utils.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /languages/cpp/ast_utils.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/ast_utils.cpp')
-rw-r--r--languages/cpp/ast_utils.cpp50
1 files changed, 25 insertions, 25 deletions
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 <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
@@ -40,8 +40,8 @@ AST* findNodeAt( AST* node, int line, int column )
( line < endLine || ( line == endLine && column < endColumn ) ) )
{
- QPtrList<AST> children = node->children();
- QPtrListIterator<AST> it( children );
+ TQPtrList<AST> children = node->children();
+ TQPtrListIterator<AST> 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( "<unnamed>" ) : s;
+ s = s.isEmpty() ? TQString::fromLatin1( "<unnamed>" ) : 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( "<unnamed>" );
+ s = namespaceName ? namespaceName->text() : TQString::fromLatin1( "<unnamed>" );
scope.push_back( s );
}
break;
@@ -95,8 +95,8 @@ void scopeOfNode( AST* ast, QStringList& scope )
if ( !d->declaratorId() )
break;
- QPtrList<ClassOrNamespaceNameAST> l = d->declaratorId() ->classOrNamespaceNameList();
- QPtrListIterator<ClassOrNamespaceNameAST> nameIt( l );
+ TQPtrList<ClassOrNamespaceNameAST> l = d->declaratorId() ->classOrNamespaceNameList();
+ TQPtrListIterator<ClassOrNamespaceNameAST> 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<AST> ptrOpList = declarator->ptrOpList();
- for ( QPtrListIterator<AST> it( ptrOpList ); it.current(); ++it )
+ TQPtrList<AST> ptrOpList = declarator->ptrOpList();
+ for ( TQPtrListIterator<AST> 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<AST> arrays = declarator->arrayDimensionList();
- QPtrListIterator<AST> it( arrays );
+ TQPtrList<AST> arrays = declarator->arrayDimensionList();
+ TQPtrListIterator<AST> 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<ParameterDeclarationAST> params = l->parameterList();
- QPtrListIterator<ParameterDeclarationAST> it( params );
+ TQPtrList<ParameterDeclarationAST> params = l->parameterList();
+ TQPtrListIterator<ParameterDeclarationAST> 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;