diff options
Diffstat (limited to 'umbrello/umbrello/codeimport/kdevcppparser')
16 files changed, 137 insertions, 137 deletions
diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp b/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp index e6a7e2b5..8e107ccf 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/ast.cpp @@ -117,7 +117,7 @@ TQString nodeTypeToString( int type ) return "Custom"; } - return TQString::null; + return TQString(); } @@ -128,7 +128,7 @@ AST::AST() m_endLine( 0 ), m_endColumn( 0 ) { #ifndef CPPPARSER_NO_CHILDREN - m_children.setAutoDelete( false ); + m_tqchildren.setAutoDelete( false ); #endif } @@ -170,14 +170,14 @@ void AST::getEndPosition( int* line, int* col ) const * col = m_endColumn; } -void AST::setParent( AST* parent ) +void AST::setParent( AST* tqparent ) { #ifndef CPPPARSER_NO_CHILDREN if( m_parent ) m_parent->removeChild( this ); #endif - m_parent = parent; + m_parent = tqparent; #ifndef CPPPARSER_NO_CHILDREN if( m_parent ) @@ -188,12 +188,12 @@ void AST::setParent( AST* parent ) #ifndef CPPPARSER_NO_CHILDREN void AST::appendChild( AST* child ) { - m_children.append( child ); + m_tqchildren.append( child ); } void AST::removeChild( AST* child ) { - m_children.remove( child ); + m_tqchildren.remove( child ); } #endif @@ -227,7 +227,7 @@ void NameAST::addClassOrNamespaceName( ClassOrNamespaceNameAST::Node& classOrNam TQString NameAST::text() const { if( !m_unqualifiedName.get() ) - return TQString::null; + return TQString(); TQString str; @@ -462,11 +462,11 @@ void ClassOrNamespaceNameAST::setTemplateArgumentList( TemplateArgumentListAST:: TQString ClassOrNamespaceNameAST::text() const { if( !m_name.get() ) - return TQString::null; + return TQString(); TQString str = m_name->text(); if( m_templateArgumentList.get() ) - str += TQString::fromLatin1("< ") + m_templateArgumentList->text() + TQString::fromLatin1(" >"); + str += TQString::tqfromLatin1("< ") + m_templateArgumentList->text() + TQString::tqfromLatin1(" >"); return str; } diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast.h b/umbrello/umbrello/codeimport/kdevcppparser/ast.h index e2bd7835..0de3a2ed 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/ast.h +++ b/umbrello/umbrello/codeimport/kdevcppparser/ast.h @@ -24,7 +24,7 @@ #include <tqstring.h> #include <tqptrlist.h> -#if defined( Q_OS_WIN32 ) || defined( Q_CC_SUN ) +#if defined( Q_OS_WIN32 ) || defined( TQ_CC_SUN ) #ifndef _THROW0 # define _THROW0() @@ -177,9 +177,9 @@ enum NodeType TQString nodeTypeToString( int type ); -#if defined(CPPPARSER_QUICK_ALLOCATOR) +#if defined(CPPPARSER_TQUICK_ALLOCATOR) -#include <quick_allocator.h> +#include <tquick_allocator.h> #define DECLARE_ALLOC(tp) \ void * operator new(std::size_t) \ @@ -222,8 +222,8 @@ public: int nodeType() const { return m_nodeType; } void setNodeType( int nodeType ) { m_nodeType = nodeType; } - AST* parent() { return m_parent; } - void setParent( AST* parent ); + AST* tqparent() { return m_parent; } + void setParent( AST* tqparent ); void setStartPosition( int line, int col ); void getStartPosition( int* line, int* col ) const; @@ -232,7 +232,7 @@ public: void getEndPosition( int* line, int* col ) const; #ifndef CPPPARSER_NO_CHILDREN - TQPtrList<AST> children() { return m_children; } + TQPtrList<AST> tqchildren() { return m_tqchildren; } void appendChild( AST* child ); void removeChild( AST* child ); #endif @@ -266,7 +266,7 @@ private: int m_endLine, m_endColumn; Slice m_slice; #ifndef CPPPARSER_NO_CHILDREN - TQPtrList<AST> m_children; + TQPtrList<AST> m_tqchildren; #endif TQString m_comment; @@ -830,7 +830,7 @@ public: class ParameterDeclarationClauseAST* parameterDeclarationClause() { return m_parameterDeclarationClause.get(); } void setParameterDeclarationClause( AUTO_PTR<class ParameterDeclarationClauseAST>& parameterDeclarationClause ); - // ### replace 'constant' with cvQualify + // ### tqreplace 'constant' with cvQualify AST* constant() { return m_constant.get(); } void setConstant( AST::Node& constant ); diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp index 45cfd8ed..ac33d165 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.cpp @@ -35,8 +35,8 @@ AST* findNodeAt( AST* node, int line, int column ) if( (line > startLine || (line == startLine && column >= startColumn)) && (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(); ++it; @@ -57,8 +57,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() ) @@ -66,7 +66,7 @@ void scopeOfNode( AST* ast, TQStringList& scope ) case NodeType_ClassSpecifier: 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; @@ -74,7 +74,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; @@ -108,15 +108,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; @@ -131,7 +131,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(); @@ -171,6 +171,6 @@ TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope, b text += " const"; } - return text.replace( TQRegExp(" :: "), "::" ).simplifyWhiteSpace(); + return text.tqreplace( TQRegExp(" :: "), "::" ).simplifyWhiteSpace(); } diff --git a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h index 312a0c44..1f6209db 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h +++ b/umbrello/umbrello/codeimport/kdevcppparser/ast_utils.h @@ -24,6 +24,6 @@ namespace KTextEditor{ class EditInterface; } AST* findNodeAt( AST* unit, int line, int column ); void scopeOfNode( AST* ast, TQStringList& ); TQString typeSpecToString( TypeSpecifierAST* typeSpec ); -TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope = TQString::null, bool skipPtrOp=false ); +TQString declaratorToString( DeclaratorAST* declarator, const TQString& scope = TQString(), bool skipPtrOp=false ); #endif // __ast_utils_h diff --git a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp index 5763ec5e..f8e6c475 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.cpp @@ -150,7 +150,7 @@ void CppTree2Uml::parseTypedef( TypedefAST* ast ) */ bool isDatatype = Import_Utils::isDatatype(typeId, m_currentNamespace[m_nsCnt]); - if (type.contains('*') || isDatatype) { + if (type.tqcontains('*') || isDatatype) { UMLObject *inner = Import_Utils::createUMLObject( Uml::ot_Class, typeId, m_currentNamespace[m_nsCnt] ); @@ -300,7 +300,7 @@ void CppTree2Uml::parseFunctionDefinition( FunctionDefinitionAST* ast ) UMLOperation *m = Import_Utils::makeOperation(c, id); // if a class has no return type, it could be a constructor or // a destructor - if (d && returnType.isEmpty() && id.find("~") == -1) + if (d && returnType.isEmpty() && id.tqfind("~") == -1) isConstructor = true; parseFunctionArguments( d, m ); @@ -530,7 +530,7 @@ void CppTree2Uml::parseFunctionDeclaration( GroupAST* funSpec, GroupAST* storag UMLOperation *m = Import_Utils::makeOperation(c, id); // if a class has no return type, it could be a constructor or // a destructor - if (d && returnType.isEmpty() && id.find("~") == -1) + if (d && returnType.isEmpty() && id.tqfind("~") == -1) isConstructor = true; parseFunctionArguments( d, m ); @@ -554,7 +554,7 @@ void CppTree2Uml::parseFunctionArguments(DeclaratorAST* declarator, TQString name; if (param->declarator()) - name = declaratorToString(param->declarator(), TQString::null, true ); + name = declaratorToString(param->declarator(), TQString(), true ); TQString tp = typeOfDeclaration( param->typeSpec(), param->declarator() ); @@ -567,7 +567,7 @@ void CppTree2Uml::parseFunctionArguments(DeclaratorAST* declarator, TQString CppTree2Uml::typeOfDeclaration( TypeSpecifierAST* typeSpec, DeclaratorAST* declarator ) { if( !typeSpec || !declarator ) - return TQString::null; + return TQString(); TQString text; diff --git a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h index 7248c782..b97c7ced 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h +++ b/umbrello/umbrello/codeimport/kdevcppparser/cpptree2uml.h @@ -33,21 +33,21 @@ public: virtual void parseTranslationUnit( TranslationUnitAST* ); // declarations - //virtual void parseDeclaration( DeclarationAST* ); // use parent method - //virtual void parseLinkageSpecification( LinkageSpecificationAST* ); // use parent method + //virtual void parseDeclaration( DeclarationAST* ); // use tqparent method + //virtual void parseLinkageSpecification( LinkageSpecificationAST* ); // use tqparent method virtual void parseNamespace( NamespaceAST* ); - //virtual void parseNamespaceAlias( NamespaceAliasAST* ); // use parent method - //virtual void parseUsing( UsingAST* ); // use parent method - //virtual void parseUsingDirective( UsingDirectiveAST* ); // use parent method + //virtual void parseNamespaceAlias( NamespaceAliasAST* ); // use tqparent method + //virtual void parseUsing( UsingAST* ); // use tqparent method + //virtual void parseUsingDirective( UsingDirectiveAST* ); // use tqparent method virtual void parseTypedef( TypedefAST* ); virtual void parseTemplateDeclaration( TemplateDeclarationAST* ); virtual void parseSimpleDeclaration( SimpleDeclarationAST* ); virtual void parseFunctionDefinition( FunctionDefinitionAST* ); - //virtual void parseLinkageBody( LinkageBodyAST* ); // use parent method + //virtual void parseLinkageBody( LinkageBodyAST* ); // use tqparent method virtual void parseAccessDeclaration( AccessDeclarationAST* ); // type-specifier - //virtual void parseTypeSpecifier( TypeSpecifierAST* ); // use parent method + //virtual void parseTypeSpecifier( TypeSpecifierAST* ); // use tqparent method virtual void parseClassSpecifier( ClassSpecifierAST* ); virtual void parseEnumSpecifier( EnumSpecifierAST* ); virtual void parseElaboratedTypeSpecifier( ElaboratedTypeSpecifierAST* ); diff --git a/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp b/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp index 1a804c81..030f7f2b 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/driver.cpp @@ -100,7 +100,7 @@ void Driver::remove( const TQString & fileName ) m_problems.remove( fileName ); removeAllMacrosInFile( fileName ); - TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName ); + TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.tqfind( fileName ); if( it != m_parsedUnits.end() ){ TranslationUnitAST* unit = *it; m_parsedUnits.remove( it ); @@ -120,7 +120,7 @@ void Driver::removeAllMacrosInFile( const TQString& fileName ) TranslationUnitAST::Node Driver::takeTranslationUnit( const TQString& fileName ) { - TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( fileName ); + TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.tqfind( fileName ); TranslationUnitAST::Node unit( *it ); //m_parsedUnits.remove( it ); m_parsedUnits[ fileName] = 0; @@ -129,7 +129,7 @@ TranslationUnitAST::Node Driver::takeTranslationUnit( const TQString& fileName ) TranslationUnitAST* Driver::translationUnit( const TQString& fileName ) const { - TQMap<TQString, TranslationUnitAST*>::ConstIterator it = m_parsedUnits.find( fileName ); + TQMap<TQString, TranslationUnitAST*>::ConstIterator it = m_parsedUnits.tqfind( fileName ); return it != m_parsedUnits.end() ? *it : 0; } @@ -146,7 +146,7 @@ void Driver::addDependence( const TQString & fileName, const Dependence & dep ) TQString file = findIncludeFile( dep ); findOrInsertDependenceList( fileName ).insert( file, dep ); - if ( m_parsedUnits.find(file) != m_parsedUnits.end() ) + if ( m_parsedUnits.tqfind(file) != m_parsedUnits.end() ) return; if ( !TQFile::exists( file ) ) { @@ -176,7 +176,7 @@ void Driver::addProblem( const TQString & fileName, const Problem & problem ) TQMap< TQString, Dependence >& Driver::findOrInsertDependenceList( const TQString & fileName ) { - TQMap<TQString, TQMap<TQString, Dependence> >::Iterator it = m_dependences.find( fileName ); + TQMap<TQString, TQMap<TQString, Dependence> >::Iterator it = m_dependences.tqfind( fileName ); if( it != m_dependences.end() ) return it.data(); @@ -187,7 +187,7 @@ TQMap< TQString, Dependence >& Driver::findOrInsertDependenceList( const TQStrin TQValueList < Problem >& Driver::findOrInsertProblemList( const TQString & fileName ) { - TQMap<TQString, TQValueList<Problem> >::Iterator it = m_problems.find( fileName ); + TQMap<TQString, TQValueList<Problem> >::Iterator it = m_problems.tqfind( fileName ); if( it != m_problems.end() ) return it.data(); @@ -198,7 +198,7 @@ TQValueList < Problem >& Driver::findOrInsertProblemList( const TQString & fileN TQMap< TQString, Dependence > Driver::dependences( const TQString & fileName ) const { - TQMap<TQString, TQMap<TQString, Dependence> >::ConstIterator it = m_dependences.find( fileName ); + TQMap<TQString, TQMap<TQString, Dependence> >::ConstIterator it = m_dependences.tqfind( fileName ); if( it != m_dependences.end() ) return it.data(); return TQMap<TQString, Dependence>(); @@ -211,7 +211,7 @@ TQMap< TQString, Macro > Driver::macros() const TQValueList < Problem > Driver::problems( const TQString & fileName ) const { - TQMap<TQString, TQValueList<Problem> >::ConstIterator it = m_problems.find( fileName ); + TQMap<TQString, TQValueList<Problem> >::ConstIterator it = m_problems.tqfind( fileName ); if( it != m_problems.end() ) return it.data(); return TQValueList<Problem>(); @@ -222,7 +222,7 @@ void Driver::parseFile( const TQString& fileName, bool onlyPreProcess, bool forc TQFileInfo fileInfo( fileName ); TQString absFilePath = fileInfo.absFilePath(); - TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.find( absFilePath ); + TQMap<TQString, TranslationUnitAST*>::Iterator it = m_parsedUnits.tqfind( absFilePath ); if( force && it != m_parsedUnits.end() ){ takeTranslationUnit( absFilePath ); @@ -252,7 +252,7 @@ void Driver::parseFile( const TQString& fileName, bool onlyPreProcess, bool forc fileParsed( fileName ); } - m_currentFileName = TQString::null; + m_currentFileName = TQString(); lexer = 0; } @@ -325,26 +325,26 @@ void Driver::setupLexer( Lexer * lexer ) lexer->addSkipWord( "KDE_DEPRECATED" ); // qt - lexer->addSkipWord( "Q_OVERRIDE", SkipWordAndArguments ); + lexer->addSkipWord( "TQ_OVERRIDE", SkipWordAndArguments ); lexer->addSkipWord( "Q_ENUMS", SkipWordAndArguments ); - lexer->addSkipWord( "Q_PROPERTY", SkipWordAndArguments ); - lexer->addSkipWord( "Q_CLASSINFO", SkipWordAndArguments ); - lexer->addSkipWord( "Q_SETS", SkipWordAndArguments ); + lexer->addSkipWord( "TQ_PROPERTY", SkipWordAndArguments ); + lexer->addSkipWord( "TQ_CLASSINFO", SkipWordAndArguments ); + lexer->addSkipWord( "TQ_SETS", SkipWordAndArguments ); lexer->addSkipWord( "Q_UNUSED", SkipWordAndArguments ); - lexer->addSkipWord( "Q_CREATE_INSTANCE", SkipWordAndArguments ); - lexer->addSkipWord( "Q_DUMMY_COMPARISON_OPERATOR", SkipWordAndArguments ); + lexer->addSkipWord( "TQ_CREATE_INSTANCE", SkipWordAndArguments ); + lexer->addSkipWord( "TQ_DUMMY_COMPARISON_OPERATOR", SkipWordAndArguments ); lexer->addSkipWord( "ACTIVATE_SIGNAL_WITH_PARAM", SkipWordAndArguments ); - lexer->addSkipWord( "Q_INLINE_TEMPLATES" ); - lexer->addSkipWord( "Q_TEMPLATE_EXTERN" ); - lexer->addSkipWord( "Q_TYPENAME" ); - lexer->addSkipWord( "Q_REFCOUNT" ); - lexer->addSkipWord( "Q_EXPLICIT" ); - lexer->addSkipWord( "QMAC_PASCAL" ); + lexer->addSkipWord( "TQ_INLINE_TEMPLATES" ); + lexer->addSkipWord( "TQ_TEMPLATE_EXTERN" ); + lexer->addSkipWord( "TQ_TYPENAME" ); + lexer->addSkipWord( "TQ_REFCOUNT" ); + lexer->addSkipWord( "TQ_EXPLICIT" ); + lexer->addSkipWord( "TQMAC_PASCAL" ); lexer->addSkipWord( "QT_STATIC_CONST" ); lexer->addSkipWord( "QT_STATIC_CONST_IMPL" ); - lexer->addSkipWord( "QT_WIN_PAINTER_MEMBERS" ); - lexer->addSkipWord( "QT_NC_MSGBOX" ); - lexer->addSkipWord( "Q_VARIANT_AS", SkipWordAndArguments ); + lexer->addSkipWord( "TQT_WIN_PAINTER_MEMBERS" ); + lexer->addSkipWord( "TQT_NC_MSGBOX" ); + lexer->addSkipWord( "TQ_VARIANT_AS", SkipWordAndArguments ); lexer->addSkipWord( "CALLBACK_CALL_TYPE" ); // flex @@ -415,7 +415,7 @@ TQString Driver::findIncludeFile( const Dependence& dep ) const return fileInfo.absFilePath(); } - return TQString::null; + return TQString(); } void Driver::setResolveDependencesEnabled( bool enabled ) diff --git a/umbrello/umbrello/codeimport/kdevcppparser/driver.h b/umbrello/umbrello/codeimport/kdevcppparser/driver.h index 6c53a939..5a300745 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/driver.h +++ b/umbrello/umbrello/codeimport/kdevcppparser/driver.h @@ -81,7 +81,7 @@ enum Dep_Local }; -typedef QPair<TQString, int> Dependence; +typedef TQPair<TQString, int> Dependence; class Macro { @@ -185,7 +185,7 @@ public: TQMap<TQString, Macro> macros() const; TQValueList<Problem> problems( const TQString& fileName ) const; - bool hasMacro( const TQString& name ) const { return m_macros.contains( name ); } + bool hasMacro( const TQString& name ) const { return m_macros.tqcontains( name ); } const Macro& macro( const TQString& name ) const { return m_macros[ name ]; } Macro& macro( const TQString& name ) { return m_macros[ name ]; } diff --git a/umbrello/umbrello/codeimport/kdevcppparser/keywords.lut.h b/umbrello/umbrello/codeimport/kdevcppparser/keywords.lut.h index 5c276953..1969fdb7 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/keywords.lut.h +++ b/umbrello/umbrello/codeimport/kdevcppparser/keywords.lut.h @@ -15,7 +15,7 @@ static const struct HashEntry keywordEntries[] = { { "k_dcop_signals", Token_k_dcop_signals, 0, 0, &keywordEntries[104] }, { "auto", Token_auto, 0, 0, &keywordEntries[91] }, { 0, 0, 0, 0, 0 }, - { "Q_OBJECT", Token_Q_OBJECT, 0, 0, &keywordEntries[86] }, + { "TQ_OBJECT", Token_TQ_OBJECT, 0, 0, &keywordEntries[86] }, { "and_eq", Token_and_eq, 0, 0, 0 }, { 0, 0, 0, 0, 0 }, { "operator", Token_operator, 0, 0, 0 }, diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp b/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp index 11b326f6..270c3d87 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/lexer.cpp @@ -31,7 +31,7 @@ #if defined( KDEVELOP_BGPARSER ) #include <tqthread.h> -class KDevTread: public QThread +class KDevTread: public TQThread { public: static void yield() @@ -83,7 +83,7 @@ struct LexerData const Scope& scope = *it; ++it; - if( scope.contains(name) ) + if( scope.tqcontains(name) ) return true; } @@ -97,11 +97,11 @@ struct LexerData const Scope& scope = *it; ++it; - if( scope.contains(name) ) + if( scope.tqcontains(name) ) return scope[ name ]; } - return TQString::null; + return TQString(); } }; @@ -143,7 +143,7 @@ void Lexer::reset() m_index = 0; m_size = 0; m_tokens.clear(); - m_source = TQString::null; + m_source = TQString(); m_ptr = 0; m_endPtr = 0; m_startLine = false; @@ -175,7 +175,7 @@ int Lexer::toInt( const Token& token ) int i = s[0] == 'L' ? 2 : 1; // wide char ? if( s[i] == '\\' ){ // escaped char - int c = s[i+1].unicode(); + int c = s[i+1].tqunicode(); switch( c ) { case '0': return 0; @@ -186,7 +186,7 @@ int Lexer::toInt( const Token& token ) return c; } } else { - return s[i].unicode(); + return s[i].tqunicode(); } } else { return 0; @@ -273,7 +273,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline ) int start = currentPosition(); readIdentifier(); TQString ide = m_source.mid( start, currentPosition() - start ); - int k = Lookup::find( &keyword, ide ); + int k = Lookup::tqfind( &keyword, ide ); if( m_preprocessorEnabled && m_driver->hasMacro(ide) && (k == -1 || !m_driver->macro(ide).body().isEmpty()) ){ @@ -374,21 +374,21 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline ) TQString tokText = tok.text(); TQString str = (tok == Token_identifier && d->hasBind(tokText)) ? d->apply( tokText ) : tokText; if( str == ide ){ - //Problem p( i18n("unsafe use of macro '%1'").arg(ide), m_currentLine, m_currentColumn ); + //Problem p( i18n("unsafe use of macro '%1'").tqarg(ide), m_currentLine, m_currentColumn ); //m_driver->addProblem( m_driver->currentFileName(), p ); m_driver->removeMacro( ide ); - // str = TQString::null; + // str = TQString(); } if( stringify ) { - textToInsert.append( TQString::fromLatin1("\"") + str + TQString::fromLatin1("\" ") ); + textToInsert.append( TQString::tqfromLatin1("\"") + str + TQString::tqfromLatin1("\" ") ); } else if( merge ){ textToInsert.truncate( textToInsert.length() - 1 ); textToInsert.append( str ); } else if( tok == Token_ellipsis && d->hasBind("...") ){ textToInsert.append( ellipsisArg ); } else { - textToInsert.append( str + TQString::fromLatin1(" ") ); + textToInsert.append( str + TQString::tqfromLatin1(" ") ); } } @@ -408,7 +408,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline ) tk.setStartPosition( startLine, startColumn ); tk.setEndPosition( m_currentLine, m_currentColumn ); } else if( m_skipWordsEnabled ){ - TQMap< TQString, QPair<SkipType, TQString> >::Iterator pos = m_words.find( ide ); + TQMap< TQString, TQPair<SkipType, TQString> >::Iterator pos = m_words.tqfind( ide ); if( pos != m_words.end() ){ if( (*pos).first == SkipWordAndArguments ){ readWhiteSpaces(); @@ -424,9 +424,9 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline ) } } else if( /*qt_rx.exactMatch(ide) ||*/ ide.endsWith("EXPORT") || - (ide.startsWith("Q_EXPORT") && ide != "Q_EXPORT_INTERFACE") || - ide.startsWith("QM_EXPORT") || - ide.startsWith("QM_TEMPLATE")){ + (ide.startsWith("TQ_EXPORT") && ide != "TQ_EXPORT_INTERFACE") || + ide.startsWith("TQM_EXPORT") || + ide.startsWith("TQM_TEMPLATE")){ readWhiteSpaces(); if( currentChar() == '(' ) @@ -465,7 +465,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline ) tk.setStartPosition( startLine, startColumn ); tk.setEndPosition( m_currentLine, m_currentColumn ); } else { - tk = CREATE_TOKEN( ch.unicode(), currentPosition(), 1 ); + tk = CREATE_TOKEN( ch.tqunicode(), currentPosition(), 1 ); nextChar(); tk.setStartPosition( startLine, startColumn ); tk.setEndPosition( m_currentLine, m_currentColumn ); @@ -504,7 +504,7 @@ void Lexer::resetSkipWords() void Lexer::addSkipWord( const TQString& word, SkipType skipType, const TQString& str ) { - m_words[ word ] = qMakePair( skipType, str ); + m_words[ word ] = tqMakePair( skipType, str ); } void Lexer::skip( int l, int r ) @@ -808,7 +808,7 @@ int Lexer::macroPrimary() { readWhiteSpaces( false ); int result = 0; - switch( currentChar().unicode() ) { + switch( currentChar().tqunicode() ) { case '(': nextChar(); result = macroExpression(); @@ -996,7 +996,7 @@ int Lexer::macroExpression() } // *IMPORTANT* -// please, don't include lexer.moc here, because Lexer isn't a TQObject class!! +// please, don't include lexer.tqmoc here, because Lexer isn't a TQObject class!! // if you have problem while recompiling try to remove cppsupport/.deps, // cppsupport/Makefile.in and rerun automake/autoconf diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lexer.h b/umbrello/umbrello/codeimport/kdevcppparser/lexer.h index 4851c183..541626d4 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/lexer.h +++ b/umbrello/umbrello/codeimport/kdevcppparser/lexer.h @@ -56,7 +56,7 @@ enum Type { Token_k_dcop, Token_k_dcop_signals, - Token_Q_OBJECT, + Token_TQ_OBJECT, Token_signals, Token_slots, Token_emit, @@ -212,7 +212,7 @@ public: void setPreprocessorEnabled( bool enabled ); void resetSkipWords(); - void addSkipWord( const TQString& word, SkipType skipType=SkipWord, const TQString& str = TQString::null ); + void addSkipWord( const TQString& word, SkipType skipType=SkipWord, const TQString& str = TQString() ); TQString source() const; void setSource( const TQString& source ); @@ -296,7 +296,7 @@ private: bool m_recordComments; bool m_recordWhiteSpaces; bool m_startLine; - TQMap< TQString, QPair<SkipType, TQString> > m_words; + TQMap< TQString, TQPair<SkipType, TQString> > m_words; int m_currentLine; int m_currentColumn; @@ -485,12 +485,12 @@ inline const Token& Lexer::nextToken() inline const Token& Lexer::tokenAt( int n ) const { - return *m_tokens[ QMIN(n, m_size-1) ]; + return *m_tokens[ TQMIN(n, m_size-1) ]; } inline const Token& Lexer::lookAhead( int n ) const { - return *m_tokens[ QMIN(m_index + n, m_size-1) ]; + return *m_tokens[ TQMIN(m_index + n, m_size-1) ]; } inline int Lexer::tokenPosition( const Token& token ) const diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp b/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp index f46b9270..fad6627a 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/lookup.cpp @@ -71,10 +71,10 @@ const HashEntry* Lookup::findEntry( const struct HashTable *table, const HashEntry* Lookup::findEntry( const struct HashTable *table, const TQString &s ) { - return findEntry( table, s.unicode(), s.length() ); + return findEntry( table, s.tqunicode(), s.length() ); } -int Lookup::find(const struct HashTable *table, +int Lookup::tqfind(const struct HashTable *table, const TQChar *c, unsigned int len) { const HashEntry *entry = findEntry( table, c, len ); @@ -83,9 +83,9 @@ int Lookup::find(const struct HashTable *table, return -1; } -int Lookup::find(const struct HashTable *table, const TQString &s) +int Lookup::tqfind(const struct HashTable *table, const TQString &s) { - return find(table, s.unicode(), s.length()); + return tqfind(table, s.tqunicode(), s.length()); } unsigned int Lookup::hash(const TQChar *c, unsigned int len) @@ -100,7 +100,7 @@ unsigned int Lookup::hash(const TQChar *c, unsigned int len) unsigned int Lookup::hash(const TQString &key) { - return hash(key.unicode(), key.length()); + return hash(key.tqunicode(), key.length()); } unsigned int Lookup::hash(const char *s) diff --git a/umbrello/umbrello/codeimport/kdevcppparser/lookup.h b/umbrello/umbrello/codeimport/kdevcppparser/lookup.h index b2bad4de..c8a07dab 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/lookup.h +++ b/umbrello/umbrello/codeimport/kdevcppparser/lookup.h @@ -95,8 +95,8 @@ /** * Find an entry in the table, and return its value (i.e. the value field of HashEntry) */ - static int find(const struct HashTable *table, const TQString& s); - static int find(const struct HashTable *table, const TQChar *c, unsigned int len); + static int tqfind(const struct HashTable *table, const TQString& s); + static int tqfind(const struct HashTable *table, const TQChar *c, unsigned int len); /** * Find an entry in the table, and return the entry diff --git a/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp b/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp index 9b93384c..89b0852a 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/parser.cpp @@ -37,7 +37,7 @@ using namespace std; { \ const Token& token = lex->lookAhead( 0 ); \ if( token != tk ){ \ - reportError( i18n("'%1' expected found '%2'").arg(descr).arg(token.text()) ); \ + reportError( i18n("'%1' expected found '%2'").tqarg(descr).tqarg(token.text()) ); \ return false; \ } \ lex->nextToken(); \ @@ -47,7 +47,7 @@ using namespace std; { \ const Token& token = lex->lookAhead( 0 ); \ if( token != tk ){ \ - reportError( i18n("'%1' expected found '%2'").arg(descr).arg(token.text()) ); \ + reportError( i18n("'%1' expected found '%2'").tqarg(descr).tqarg(token.text()) ); \ } \ else \ lex->nextToken(); \ @@ -137,7 +137,7 @@ bool Parser::reportError( const Error& err ) if( s.isEmpty() ) s = i18n( "<eof>" ); - m_driver->addProblem( m_driver->currentFileName(), Problem(err.text.arg(s), line, col) ); + m_driver->addProblem( m_driver->currentFileName(), Problem(err.text.tqarg(s), line, col) ); } return true; @@ -213,8 +213,8 @@ bool Parser::skipUntilDeclaration() case Token_public: case Token_protected: case Token_private: - case Token_signals: // Qt - case Token_slots: // Qt + case Token_signals: // TQt + case Token_slots: // TQt return true; case '}': @@ -316,7 +316,7 @@ bool Parser::skipCommaExpression( AST::Node& node ) TQString comment; while( lex->lookAhead(0) == ',' ){ - comment = TQString::null; + comment = TQString(); advanceAndCheckTrailingComment( comment ); if( !skipExpression(expr) ){ @@ -832,7 +832,7 @@ bool Parser::parseTemplateArgumentList( TemplateArgumentListAST::Node& node, boo TQString comment; while( lex->lookAhead(0) == ',' ){ - comment = TQString::null; + comment = TQString(); advanceAndCheckTrailingComment( comment ); if( !parseTemplateArgument(templArg) ){ @@ -1474,7 +1474,7 @@ bool Parser::parseTemplateParameterList( TemplateParameterListAST::Node& node ) TQString comment; while( lex->lookAhead(0) == ',' ){ - comment = TQString::null; + comment = TQString(); advanceAndCheckTrailingComment( comment ); if( !parseTemplateParameter(param) ){ @@ -1779,7 +1779,7 @@ bool Parser::parseParameterDeclarationList( ParameterDeclarationListAST::Node& n TQString comment; while( lex->lookAhead(0) == ',' ){ - comment = TQString::null; + comment = TQString(); advanceAndCheckTrailingComment( comment ); if( lex->lookAhead(0) == Token_ellipsis ) @@ -1980,7 +1980,7 @@ bool Parser::parseMemberSpecification( DeclarationAST::Node& node ) if ( !comment.isEmpty() ) node->setComment( comment ); return true; - } else if( lex->lookAhead(0) == Token_Q_OBJECT || lex->lookAhead(0) == Token_K_DCOP ){ + } else if( lex->lookAhead(0) == Token_TQ_OBJECT || lex->lookAhead(0) == Token_K_DCOP ){ lex->nextToken(); return true; } else if( lex->lookAhead(0) == Token_signals || lex->lookAhead(0) == Token_k_dcop || lex->lookAhead(0) == Token_k_dcop_signals ){ @@ -2228,7 +2228,7 @@ bool Parser::parseBaseClause( BaseClauseAST::Node& node ) TQString comment; while( lex->lookAhead(0) == ',' ){ - comment = TQString::null; + comment = TQString(); advanceAndCheckTrailingComment( comment ); if( !parseBaseSpecifier(baseSpec) ){ @@ -2282,7 +2282,7 @@ bool Parser::parseMemInitializerList( AST::Node& /*node*/ ) TQString comment; while( lex->lookAhead(0) == ',' ){ - comment = TQString::null; + comment = TQString(); advanceAndCheckTrailingComment( comment ); if( parseMemInitializer(init) ){ @@ -2327,7 +2327,7 @@ bool Parser::parseTypeIdList( GroupAST::Node& node ) TQString comment; while( lex->lookAhead(0) == ',' ){ - comment = TQString::null; + comment = TQString(); advanceAndCheckTrailingComment( comment ); if( parseTypeId(typeId) ){ if (!comment.isEmpty()) @@ -3904,7 +3904,7 @@ bool Parser::parseCommaExpression( AST::Node& node ) TQString comment; while( lex->lookAhead(0) == ',' ){ - comment = TQString::null; + comment = TQString(); advanceAndCheckTrailingComment( comment ); if( !parseAssignmentExpression(expr) ) @@ -4110,7 +4110,7 @@ bool Parser::parseIdentifierList( GroupAST::Node & node ) TQString comment; while( lex->lookAhead(0) == ',' ){ - comment = TQString::null; + comment = TQString(); advanceAndCheckTrailingComment( comment ); if( lex->lookAhead(0) == Token_identifier ){ AST_FROM_TOKEN( tk, lex->index() ); diff --git a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp index 5235bc3c..5cd28356 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp +++ b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.cpp @@ -40,42 +40,42 @@ /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::filename(const TQString & name) { - int slashPos = name.findRev("/"); + int slashPos = name.tqfindRev("/"); return slashPos<0 ? name : name.mid(slashPos+1); } /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::directory(const TQString & name) { - int slashPos = name.findRev("/"); + int slashPos = name.tqfindRev("/"); return slashPos<0 ? TQString("") : name.left(slashPos); } /////////////////////////////////////////////////////////////////////////////// -TQString URLUtil::relativePath(const KURL & parent, const KURL & child, uint slashPolicy) { +TQString URLUtil::relativePath(const KURL & tqparent, const KURL & child, uint slashPolicy) { bool slashPrefix = slashPolicy & SLASH_PREFIX; bool slashSuffix = slashPolicy & SLASH_SUFFIX; - if (parent == child) + if (tqparent == child) return slashPrefix ? TQString("/") : TQString(""); - if (!parent.isParentOf(child)) return TQString(); + if (!tqparent.isParentOf(child)) return TQString(); int a=slashPrefix ? -1 : 1; int b=slashSuffix ? 1 : -1; - return child.path(b).mid(parent.path(a).length()); + return child.path(b).mid(tqparent.path(a).length()); } /////////////////////////////////////////////////////////////////////////////// -TQString URLUtil::relativePath(const TQString & parent, const TQString & child, uint slashPolicy) { - return relativePath(KURL(parent), KURL(child), slashPolicy); +TQString URLUtil::relativePath(const TQString & tqparent, const TQString & child, uint slashPolicy) { + return relativePath(KURL(tqparent), KURL(child), slashPolicy); } /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::upDir(const TQString & path, bool slashSuffix) { - int slashPos = path.findRev("/"); - if (slashPos<1) return TQString::null; + int slashPos = path.tqfindRev("/"); + if (slashPos<1) return TQString(); return path.mid(0,slashPos+ (slashSuffix ? 1 : 0) ); } @@ -103,7 +103,7 @@ KURL URLUtil::mergeURL(const KURL & source, const KURL & dest, const KURL & chil /////////////////////////////////////////////////////////////////////////////// TQString URLUtil::getExtension(const TQString & path) { - int dotPos = path.findRev('.'); + int dotPos = path.tqfindRev('.'); if (dotPos<0) return TQString(""); return path.mid(dotPos+1); } @@ -114,7 +114,7 @@ TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &ur { TQString absBase = extractPathNameAbsolute( baseDirUrl ), absRef = extractPathNameAbsolute( url ); - int i = absRef.find( absBase, 0, true ); + int i = absRef.tqfind( absBase, 0, true ); if (i == -1) return TQString(); @@ -122,7 +122,7 @@ TQString URLUtil::extractPathNameRelative(const KURL &baseDirUrl, const KURL &ur if (absRef == absBase) return TQString( "." ); else - return absRef.replace( 0, absBase.length(), TQString() ); + return absRef.tqreplace( 0, absBase.length(), TQString() ); } /////////////////////////////////////////////////////////////////////////////// @@ -289,12 +289,12 @@ TQString URLUtil::envExpand ( const TQString& str ) if (len > 1 && str[0] == '$') { - int pos = str.find ('/'); + int pos = str.tqfind ('/'); if (pos < 0) pos = len; - char* ret = getenv( TQConstString(str.unicode()+1, pos-1).string().local8Bit().data() ); + char* ret = getenv( TQConstString(str.tqunicode()+1, pos-1).string().local8Bit().data() ); if (ret) { diff --git a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h index 75486983..d243ddbd 100644 --- a/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h +++ b/umbrello/umbrello/codeimport/kdevcppparser/urlutil.h @@ -38,13 +38,13 @@ namespace URLUtil */ TQString directory(const TQString & pathName); /** - * Returns the relative path between a parent and child URL, or blank if the specified child is not a child of parent + * Returns the relative path between a tqparent and child URL, or blank if the specified child is not a child of tqparent */ - TQString relativePath(const KURL & parent, const KURL & child, uint slashPolicy = SLASH_PREFIX); + TQString relativePath(const KURL & tqparent, const KURL & child, uint slashPolicy = SLASH_PREFIX); /** - * Returns the relative path between a parent and child URL, or blank if the specified child is not a child of parent + * Returns the relative path between a tqparent and child URL, or blank if the specified child is not a child of tqparent */ - TQString relativePath(const TQString & parent, const TQString & child, uint slashPolicy = SLASH_PREFIX); + TQString relativePath(const TQString & tqparent, const TQString & child, uint slashPolicy = SLASH_PREFIX); /** * Returns the relative path between a directory and file. Should never return empty path. * Example: @@ -110,7 +110,7 @@ namespace URLUtil * Will dump the list of KURL @p urls on standard output, eventually printing @ aMessage if it * is not null. */ - void dump( const KURL::List &urls, const TQString &aMessage = TQString::null ); + void dump( const KURL::List &urls, const TQString &aMessage = TQString() ); /** * Same as TQDir::canonicalPath in later versions of QT. Earlier versions of QT |