From 48d4a26399959121f33d2bc3bfe51c7827b654fc Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 14 Jun 2011 16:45:05 +0000 Subject: 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 --- lib/cppparser/ast.cpp | 18 +++++++++--------- lib/cppparser/ast.h | 16 ++++++++-------- lib/cppparser/driver.cpp | 44 ++++++++++++++++++++++---------------------- lib/cppparser/driver.h | 10 +++++----- lib/cppparser/keywords.h | 4 ++-- lib/cppparser/lexer.cpp | 36 ++++++++++++++++++------------------ lib/cppparser/lexer.h | 16 ++++++++-------- lib/cppparser/lexercache.cpp | 6 +++--- lib/cppparser/lexercache.h | 2 +- lib/cppparser/macro.h | 20 ++++++++++---------- lib/cppparser/parser.cpp | 12 ++++++------ 11 files changed, 92 insertions(+), 92 deletions(-) (limited to 'lib/cppparser') diff --git a/lib/cppparser/ast.cpp b/lib/cppparser/ast.cpp index 209a8a99..8fe6b82f 100644 --- a/lib/cppparser/ast.cpp +++ b/lib/cppparser/ast.cpp @@ -125,7 +125,7 @@ TQString nodeTypeToString( int type ) return "Custom"; } - return TQString::null; + return TQString(); } @@ -136,7 +136,7 @@ AST::AST() m_endLine( 0 ), m_endColumn( 0 ) { #ifndef CPPPARSER_NO_CHILDREN - m_children.setAutoDelete( false ); + m_tqchildren.setAutoDelete( false ); #endif } @@ -178,14 +178,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 ) @@ -196,12 +196,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 @@ -235,7 +235,7 @@ void NameAST::addClassOrNamespaceName( ClassOrNamespaceNameAST::Node& classOrNam TQString NameAST::text() const { if( !m_unqualifiedName.get() ) - return TQString::null; + return TQString(); TQString str; @@ -470,11 +470,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/lib/cppparser/ast.h b/lib/cppparser/ast.h index c9750faf..58704df9 100644 --- a/lib/cppparser/ast.h +++ b/lib/cppparser/ast.h @@ -26,7 +26,7 @@ #include #include -#if defined( Q_OS_WIN32 ) || defined( Q_CC_SUN ) +#if defined( Q_OS_WIN32 ) || defined( TQ_CC_SUN ) #ifndef _THROW0 # define _THROW0() @@ -183,9 +183,9 @@ enum NodeType TQString nodeTypeToString( int type ); -#if defined(CPPPARSER_QUICK_ALLOCATOR) +#if defined(CPPPARSER_TQUICK_ALLOCATOR) -#include +#include #define DECLARE_ALLOC(tp) \ void * operator new(std::size_t) \ @@ -253,8 +253,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; @@ -263,7 +263,7 @@ public: void getEndPosition( int* line, int* col ) const; #ifndef CPPPARSER_NO_CHILDREN - TQPtrList children() { return m_children; } + TQPtrList tqchildren() { return m_tqchildren; } void appendChild( AST* child ); void removeChild( AST* child ); #endif @@ -292,7 +292,7 @@ private: int m_endLine, m_endColumn; Slice m_slice; #ifndef CPPPARSER_NO_CHILDREN - TQPtrList m_children; + TQPtrList m_tqchildren; #endif private: @@ -854,7 +854,7 @@ public: class ParameterDeclarationClauseAST* parameterDeclarationClause() { return m_parameterDeclarationClause.get(); } void setParameterDeclarationClause( AUTO_PTR& parameterDeclarationClause ); - // ### replace 'constant' with cvQualify + // ### tqreplace 'constant' with cvQualify AST* constant() { return m_constant.get(); } void setConstant( AST::Node& constant ); diff --git a/lib/cppparser/driver.cpp b/lib/cppparser/driver.cpp index 80667a9e..52b196e5 100644 --- a/lib/cppparser/driver.cpp +++ b/lib/cppparser/driver.cpp @@ -383,7 +383,7 @@ void Driver::addDependence( const TQString & fileName, const Dependence & dep ) m_currentParsedFile->addIncludeFile( file, 0, dep.second == Dep_Local ); if ( !TQFile::exists( file ) ) { - Problem p( i18n( "Could not find include file %1" ).arg( dep.first ), + Problem p( i18n( "Could not find include file %1" ).tqarg( dep.first ), lexer ? lexer->currentLine() : -1, lexer ? lexer->currentColumn() : -1, Problem::Level_Warning ); addProblem( fileName, p ); @@ -520,7 +520,7 @@ void Driver::parseFile( const TQString& fileName, bool onlyPreProcess, bool forc if( macrosGlobal ) { for( MacroMap::iterator it = m_macros.begin(); it != m_macros.end(); ++it) { if( (*it).second.fileName() == fileName ) { - (*it).second.setFileName( TQString::null ); + (*it).second.setFileName( TQString() ); } } } @@ -597,32 +597,32 @@ void Driver::setupLexer( Lexer * lexer ) { lexer->addSkipWord( "KDE_DEPRECATED" ); // qt - lexer->addSkipWord( "Q_OBJECT" ); - lexer->addSkipWord( "Q_OVERRIDE", SkipWordAndArguments ); + lexer->addSkipWord( "TQ_OBJECT" ); + 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" ); // qt4 [erbsland] - lexer->addSkipWord( "Q_DECLARE_FLAGS", SkipWordAndArguments ); - lexer->addSkipWord( "Q_DECLARE_OPERATORS_FOR_FLAGS", SkipWordAndArguments ); + lexer->addSkipWord( "TQ_DECLARE_FLAGS", SkipWordAndArguments ); + lexer->addSkipWord( "TQ_DECLARE_OPERATORS_FOR_FLAGS", SkipWordAndArguments ); // flex lexer->addSkipWord( "yyconst" ); @@ -688,7 +688,7 @@ TQString Driver::findIncludeFile( const Dependence& dep, const TQString& fromFil return fileInfo.absFilePath(); } - return TQString::null; + return TQString(); } TQString Driver::findIncludeFile( const Dependence& dep ) const { @@ -707,7 +707,7 @@ TQString Driver::findIncludeFile( const Dependence& dep ) const { return fileInfo.absFilePath(); } - return TQString::null; + return TQString(); } void Driver::setResolveDependencesEnabled( bool enabled ) { diff --git a/lib/cppparser/driver.h b/lib/cppparser/driver.h index 3c12d34c..078c420f 100644 --- a/lib/cppparser/driver.h +++ b/lib/cppparser/driver.h @@ -49,7 +49,7 @@ enum Dep_Local }; -typedef QPair Dependence; +typedef TQPair Dependence; class ParsedFile; typedef KSharedPtr< ParsedFile > ParsedFilePointer; @@ -129,7 +129,7 @@ class ParsedFile : public AbstractParseResult { m_directIncludeFiles.clear(); for( int a = 0; a < directIncludeFilesCount; a++ ) { IncludeDesc i; - Q_INT8 in; + TQ_INT8 in; stream >> in; i.local = in; stream >> i.includePath; @@ -149,7 +149,7 @@ class ParsedFile : public AbstractParseResult { int i = m_directIncludeFiles.size(); stream << i; for( TQValueList::const_iterator it = m_directIncludeFiles.begin(); it != m_directIncludeFiles.end(); ++it ) { - Q_INT8 i = (*it).local; + TQ_INT8 i = (*it).local; stream << i; stream << (*it).includePath; } @@ -297,7 +297,7 @@ class Driver { */ TQMap dependences( const TQString& fileName ) const; /** - * Get all the macros the driver contains + * Get all the macros the driver tqcontains * @return The macros */ const MacroMap& macros() const; @@ -306,7 +306,7 @@ class Driver { * Take all macros from the given map(forgetting own macros) */ void insertMacros( const MacroSet& macros ); /** - * Get the list of problem areas the driver contains + * Get the list of problem areas the driver tqcontains * @param fileName The filename to get problems for * @return The list of problems for @p fileName */ diff --git a/lib/cppparser/keywords.h b/lib/cppparser/keywords.h index e649a5a9..e48107e0 100644 --- a/lib/cppparser/keywords.h +++ b/lib/cppparser/keywords.h @@ -8,8 +8,8 @@ INSERT( "K_DCOP", Token_K_DCOP ); INSERT( "k_dcop", Token_k_dcop ); INSERT( "k_dcop_signals", Token_k_dcop_signals ); -// Qt Keywords -INSERT( "Q_OBJECT", Token_Q_OBJECT ); +// TQt Keywords +INSERT( "TQ_OBJECT", Token_TQ_OBJECT ); INSERT( "signals", Token_signals ); INSERT( "slots", Token_slots ); INSERT( "emit", Token_emit ); diff --git a/lib/cppparser/lexer.cpp b/lib/cppparser/lexer.cpp index 97fe0dc0..b62cce32 100644 --- a/lib/cppparser/lexer.cpp +++ b/lib/cppparser/lexer.cpp @@ -30,7 +30,7 @@ #if defined( KDEVELOP_BGPARSER ) #include -class KDevTread: public QThread +class KDevTread: public TQThread { public: static void yield() @@ -82,7 +82,7 @@ struct LexerData const Scope& scope = *it; ++it; - if( scope.contains(name) ) + if( scope.tqcontains(name) ) return true; } @@ -96,11 +96,11 @@ struct LexerData const Scope& scope = *it; ++it; - if( scope.contains(name) ) + if( scope.tqcontains(name) ) return scope[ name ]; } - return TQString::null; + return TQString(); } }; @@ -152,7 +152,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; @@ -184,7 +184,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; @@ -195,7 +195,7 @@ int Lexer::toInt( const Token& token ) return c; } } else { - return s[i].unicode(); + return s[i].tqunicode(); } } else { return 0; @@ -386,21 +386,21 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline ) TQString tokText = tok.text(); HashedString str = (tok == Token_identifier && d->hasBind(tokText)) ? d->apply( tokText ) : tokText; if( str == ide ){ - //Problem p( i18n("unsafe use of macro '%1', macro is ignored").arg(ide.str()), m_currentLine, m_currentColumn, Problem::Level_Warning ); + //Problem p( i18n("unsafe use of macro '%1', macro is ignored").tqarg(ide.str()), m_currentLine, m_currentColumn, Problem::Level_Warning ); //m_driver->addProblem( m_driver->currentFileName(), p ); m_driver->removeMacro( ide ); - // str = TQString::null; + // str = TQString(); } if( stringify ) { - textToInsert.append( TQString::fromLatin1("\"") + str.str() + TQString::fromLatin1("\" ") ); + textToInsert.append( TQString::tqfromLatin1("\"") + str.str() + TQString::tqfromLatin1("\" ") ); } else if( merge ){ textToInsert.truncate( textToInsert.length() - 1 ); - textToInsert.append( str.str() + TQString::fromLatin1(" ") ); + textToInsert.append( str.str() + TQString::tqfromLatin1(" ") ); } else if( tok == Token_ellipsis && d->hasBind("...") ){ textToInsert.append( ellipsisArg ); } else { - textToInsert.append( str.str() + TQString::fromLatin1(" ") ); + textToInsert.append( str.str() + TQString::tqfromLatin1(" ") ); } } @@ -419,7 +419,7 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline ) tk.setStartPosition( startLine, startColumn ); tk.setEndPosition( m_currentLine, m_currentColumn ); } else if( m_skipWordsEnabled ){ - __gnu_cxx::hash_map< HashedString, QPair >::iterator pos = m_words.find( ide ); + __gnu_cxx::hash_map< HashedString, TQPair >::iterator pos = m_words.find( ide ); if( pos != m_words.end() ){ if( (*pos).second.first == SkipWordAndArguments ){ readWhiteSpaces(); @@ -434,9 +434,9 @@ void Lexer::nextToken( Token& tk, bool stopOnNewline ) } } else if( /*qt_rx.exactMatch(ide) ||*/ ide.str().endsWith("EXPORT") || - (ide.str().startsWith("Q_EXPORT") && ide.str() != "Q_EXPORT_INTERFACE") || - ide.str().startsWith("QM_EXPORT") || - ide.str().startsWith("QM_TEMPLATE")){ + (ide.str().startsWith("TQ_EXPORT") && ide.str() != "TQ_EXPORT_INTERFACE") || + ide.str().startsWith("TQM_EXPORT") || + ide.str().startsWith("TQM_TEMPLATE")){ readWhiteSpaces(); if( currentChar() == '(' ) @@ -514,7 +514,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 ) @@ -1026,7 +1026,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/lib/cppparser/lexer.h b/lib/cppparser/lexer.h index a94e5c5e..cbaed1be 100644 --- a/lib/cppparser/lexer.h +++ b/lib/cppparser/lexer.h @@ -30,7 +30,7 @@ #include #include -#define CHARTYPE QChar +#define CHARTYPE TQChar enum Type { Token_eof = 0, @@ -60,7 +60,7 @@ enum Type { Token_k_dcop, Token_k_dcop_signals, - Token_Q_OBJECT, + Token_TQ_OBJECT, Token_signals, Token_slots, Token_emit, @@ -217,7 +217,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 ); @@ -243,11 +243,11 @@ public: int currentColumn() const { return m_currentColumn; } inline const CHARTYPE* offset( int offset ) const { - return m_source.unicode() + offset; + return m_source.tqunicode() + offset; } inline int getOffset( const TQChar* p ) const { - return int(p - (m_source.unicode())); + return int(p - (m_source.tqunicode())); } private: @@ -322,7 +322,7 @@ private: bool m_recordComments; bool m_recordWhiteSpaces; bool m_startLine; - __gnu_cxx::hash_map< HashedString, QPair > m_words; + __gnu_cxx::hash_map< HashedString, TQPair > m_words; int m_skippedLines; @@ -513,12 +513,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/lib/cppparser/lexercache.cpp b/lib/cppparser/lexercache.cpp index 230a7de1..2d28e27d 100644 --- a/lib/cppparser/lexercache.cpp +++ b/lib/cppparser/lexercache.cpp @@ -112,13 +112,13 @@ TQDateTime LexerCache::fileModificationTimeCached( const HashedString& fileName FileModificationMap::const_iterator it = m_fileModificationCache.find( fileName ); if( it != m_fileModificationCache.end() ) { ///Use the cache for 10 seconds - if( (*it).second.m_readTime.secsTo( m_currentDateTime ) < 10 ) { + if( (*it).second.m_readTime.secsTo( m_tqcurrentDateTime ) < 10 ) { return (*it).second.m_modificationTime; } } TQFileInfo fileInfo( fileName.str() ); - m_fileModificationCache[fileName].m_readTime = TQDateTime::currentDateTime(); + m_fileModificationCache[fileName].m_readTime = TQDateTime::tqcurrentDateTime(); m_fileModificationCache[fileName].m_modificationTime = fileInfo.lastModified(); return fileInfo.lastModified(); @@ -239,7 +239,7 @@ size_t CachedLexedFile::hash() const { } void LexerCache::initFileModificationCache() { - m_currentDateTime = TQDateTime::currentDateTime(); + m_tqcurrentDateTime = TQDateTime::tqcurrentDateTime(); } void LexerCache::saveMemory() { diff --git a/lib/cppparser/lexercache.h b/lib/cppparser/lexercache.h index 662e0270..a68c4a6b 100644 --- a/lib/cppparser/lexercache.h +++ b/lib/cppparser/lexercache.h @@ -155,7 +155,7 @@ class LexerCache : public CacheManager { typedef __gnu_cxx::hash_map FileModificationMap; FileModificationMap m_fileModificationCache; Driver* m_driver; - TQDateTime m_currentDateTime; + TQDateTime m_tqcurrentDateTime; }; diff --git a/lib/cppparser/macro.h b/lib/cppparser/macro.h index e8fe0b9c..c4912bb3 100644 --- a/lib/cppparser/macro.h +++ b/lib/cppparser/macro.h @@ -228,7 +228,7 @@ class Macro { } void read( TQDataStream& stream ) { - Q_INT8 i; + TQ_INT8 i; stream >> i; m_idHashValid = i; stream >> i; m_valueHashValid = i; stream >> i; m_hasArguments = i; @@ -244,7 +244,7 @@ class Macro { } void write( TQDataStream& stream ) const { - Q_INT8 i; + TQ_INT8 i; i = m_idHashValid; stream << i; i = m_valueHashValid; stream << i; i = m_hasArguments; stream << i; @@ -266,7 +266,7 @@ class Macro { /** Set the name for this macro */ void setName( const TQString& name ) { m_name = name; - invalidateHash(); + tqinvalidateHash(); } /** Get the file name that contains this macro */ @@ -276,7 +276,7 @@ class Macro { /** Set the file name that contains this macro */ void setFileName( const TQString& fileName ) { m_fileName = fileName; - invalidateHash(); + tqinvalidateHash(); } /** Get the line the macro is defined on */ @@ -304,7 +304,7 @@ class Macro { /** Set the body of the macro */ void setBody( const TQString& body ) { m_body = body; - invalidateHash(); + tqinvalidateHash(); } /** This is used so the lexer does not have to remove macros that should really stay(they are just temporarily shadowed by an isUndef-macro */ @@ -314,7 +314,7 @@ class Macro { void setUndef() { m_isUndefMacro = true; - invalidateHash(); + tqinvalidateHash(); }; /** Check whether the macro has arguments that are passed to it */ @@ -323,7 +323,7 @@ class Macro { } void setHasArguments( bool hasArguments ) { m_hasArguments = hasArguments; - invalidateHash(); + tqinvalidateHash(); } /** Get a list of arguments passed to this macro */ TQValueList argumentList() const { @@ -334,7 +334,7 @@ class Macro { void clearArgumentList() { m_argumentList.clear(); m_hasArguments = false; - invalidateHash(); + tqinvalidateHash(); } /** Add an argument to this macro */ void addArgument( const Argument& argument ) { @@ -343,7 +343,7 @@ class Macro { /** Add a list of arguments to this macro */ void addArgumentList( const TQValueList& arguments ) { m_argumentList += arguments; - invalidateHash(); + tqinvalidateHash(); } ///This hash respects macro-name and argument-count @@ -359,7 +359,7 @@ class Macro { } private: - inline void invalidateHash() const { + inline void tqinvalidateHash() const { m_idHashValid = m_valueHashValid = false; } diff --git a/lib/cppparser/parser.cpp b/lib/cppparser/parser.cpp index 31c14385..77265ce6 100644 --- a/lib/cppparser/parser.cpp +++ b/lib/cppparser/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; \ } \ 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 \ nextToken(); \ @@ -139,7 +139,7 @@ bool Parser::reportError( const Error& err ) if( s.isEmpty() ) s = i18n( "" ); - 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; @@ -216,8 +216,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; default: @@ -2005,7 +2005,7 @@ bool Parser::parseMemberSpecification( DeclarationAST::Node& node ) if( lex->lookAhead(0) == ';' ){ nextToken(); 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 ){ nextToken(); return true; } else if( lex->lookAhead(0) == Token_signals || lex->lookAhead(0) == Token_k_dcop || lex->lookAhead(0) == Token_k_dcop_signals ){ -- cgit v1.2.3