summaryrefslogtreecommitdiffstats
path: root/languages/cpp/ast_utils.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/cpp/ast_utils.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-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 'languages/cpp/ast_utils.cpp')
-rw-r--r--languages/cpp/ast_utils.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/languages/cpp/ast_utils.cpp b/languages/cpp/ast_utils.cpp
index a6ef1a2b..4c9d63d1 100644
--- a/languages/cpp/ast_utils.cpp
+++ b/languages/cpp/ast_utils.cpp
@@ -40,8 +40,8 @@ AST* findNodeAt( AST* node, int line, int column )
( line < endLine || ( line == endLine && column < endColumn ) ) )
{
- TQPtrList<AST> children = node->children();
- TQPtrListIterator<AST> it( children );
+ TQPtrList<AST> tqchildren = node->tqchildren();
+ TQPtrListIterator<AST> it( tqchildren );
while ( it.current() )
{
AST * a = it.current();
@@ -63,8 +63,8 @@ void scopeOfNode( AST* ast, TQStringList& scope )
if ( !ast )
return ;
- if ( ast->parent() )
- scopeOfNode( ast->parent(), scope );
+ if ( ast->tqparent() )
+ scopeOfNode( ast->tqparent(), scope );
TQString s;
switch ( ast->nodeType() )
@@ -73,7 +73,7 @@ void scopeOfNode( AST* ast, TQStringList& scope )
if ( ( ( ClassSpecifierAST* ) ast ) ->name() )
{
s = ( ( ClassSpecifierAST* ) ast ) ->name() ->text();
- s = s.isEmpty() ? TQString::fromLatin1( "<unnamed>" ) : s;
+ s = s.isEmpty() ? TQString::tqfromLatin1( "<unnamed>" ) : s;
scope.push_back( s );
}
break;
@@ -81,7 +81,7 @@ void scopeOfNode( AST* ast, TQStringList& scope )
case NodeType_Namespace:
{
AST* namespaceName = ( ( NamespaceAST* ) ast ) ->namespaceName();
- s = namespaceName ? namespaceName->text() : TQString::fromLatin1( "<unnamed>" );
+ s = namespaceName ? namespaceName->text() : TQString::tqfromLatin1( "<unnamed>" );
scope.push_back( s );
}
break;
@@ -116,15 +116,15 @@ void scopeOfNode( AST* ast, TQStringList& scope )
TQString typeSpecToString( TypeSpecifierAST* typeSpec ) /// @todo remove
{
if ( !typeSpec )
- return TQString::null;
+ return TQString();
- return typeSpec->text().replace( TQRegExp( " :: " ), "::" );
+ return typeSpec->text().tqreplace( TQRegExp( " :: " ), "::" );
}
TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, bool skipPtrOp )
{
if ( !declarator )
- return TQString::null;
+ return TQString();
TQString text;
@@ -141,7 +141,7 @@ TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, b
text += scope;
if ( declarator->subDeclarator() )
- text += TQString::fromLatin1( "(" ) + declaratorToString( declarator->subDeclarator() ) + TQString::fromLatin1( ")" );
+ text += TQString::tqfromLatin1( "(" ) + declaratorToString( declarator->subDeclarator() ) + TQString::tqfromLatin1( ")" );
if ( declarator->declaratorId() )
text += declarator->declaratorId() ->text();
@@ -185,6 +185,6 @@ TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, b
text += " const";
}
- return text.replace( TQRegExp( " :: " ), "::" ).simplifyWhiteSpace();
+ return text.tqreplace( TQRegExp( " :: " ), "::" ).simplifyWhiteSpace();
}
//kate: indent-mode csands; tab-width 4; space-indent off;