From b6ba5d642f3fc7d320e3d6f4650eb259a3a52b04 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:51:21 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- lib/cppparser/ast.cpp | 8 ++++---- lib/cppparser/ast.h | 4 ++-- lib/cppparser/driver.cpp | 2 +- lib/cppparser/lexer.cpp | 12 ++++++------ lib/cppparser/lexer.h | 4 ++-- lib/cppparser/lexercache.cpp | 6 +++--- lib/cppparser/lexercache.h | 2 +- lib/cppparser/parser.cpp | 6 +++--- 8 files changed, 22 insertions(+), 22 deletions(-) (limited to 'lib/cppparser') diff --git a/lib/cppparser/ast.cpp b/lib/cppparser/ast.cpp index e4e3cf5d..8f2f2ad7 100644 --- a/lib/cppparser/ast.cpp +++ b/lib/cppparser/ast.cpp @@ -136,7 +136,7 @@ AST::AST() m_endLine( 0 ), m_endColumn( 0 ) { #ifndef CPPPARSER_NO_CHILDREN - m_tqchildren.setAutoDelete( false ); + m_children.setAutoDelete( false ); #endif } @@ -196,12 +196,12 @@ void AST::setParent( AST* parent ) #ifndef CPPPARSER_NO_CHILDREN void AST::appendChild( AST* child ) { - m_tqchildren.append( child ); + m_children.append( child ); } void AST::removeChild( AST* child ) { - m_tqchildren.remove( child ); + m_children.remove( child ); } #endif @@ -474,7 +474,7 @@ TQString ClassOrNamespaceNameAST::text() const TQString str = m_name->text(); if( m_templateArgumentList.get() ) - str += TQString::tqfromLatin1("< ") + m_templateArgumentList->text() + TQString::tqfromLatin1(" >"); + str += TQString::fromLatin1("< ") + m_templateArgumentList->text() + TQString::fromLatin1(" >"); return str; } diff --git a/lib/cppparser/ast.h b/lib/cppparser/ast.h index c98c2fe7..5db231fd 100644 --- a/lib/cppparser/ast.h +++ b/lib/cppparser/ast.h @@ -263,7 +263,7 @@ public: void getEndPosition( int* line, int* col ) const; #ifndef CPPPARSER_NO_CHILDREN - TQPtrList tqchildren() { return m_tqchildren; } + TQPtrList children() { return m_children; } 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_tqchildren; + TQPtrList m_children; #endif private: diff --git a/lib/cppparser/driver.cpp b/lib/cppparser/driver.cpp index bcaea218..91945e53 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" ).tqarg( dep.first ), + Problem p( i18n( "Could not find include file %1" ).arg( dep.first ), lexer ? lexer->currentLine() : -1, lexer ? lexer->currentColumn() : -1, Problem::Level_Warning ); addProblem( fileName, p ); diff --git a/lib/cppparser/lexer.cpp b/lib/cppparser/lexer.cpp index 1ed9fca7..167c88c4 100644 --- a/lib/cppparser/lexer.cpp +++ b/lib/cppparser/lexer.cpp @@ -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].tqunicode(); + int c = s[i+1].unicode(); switch( c ) { case '0': return 0; @@ -195,7 +195,7 @@ int Lexer::toInt( const Token& token ) return c; } } else { - return s[i].tqunicode(); + return s[i].unicode(); } } 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").tqarg(ide.str()), m_currentLine, m_currentColumn, Problem::Level_Warning ); + //Problem p( i18n("unsafe use of macro '%1', macro is ignored").arg(ide.str()), m_currentLine, m_currentColumn, Problem::Level_Warning ); //m_driver->addProblem( m_driver->currentFileName(), p ); m_driver->removeMacro( ide ); // str = TQString(); } if( stringify ) { - textToInsert.append( TQString::tqfromLatin1("\"") + str.str() + TQString::tqfromLatin1("\" ") ); + textToInsert.append( TQString::fromLatin1("\"") + str.str() + TQString::fromLatin1("\" ") ); } else if( merge ){ textToInsert.truncate( textToInsert.length() - 1 ); - textToInsert.append( str.str() + TQString::tqfromLatin1(" ") ); + textToInsert.append( str.str() + TQString::fromLatin1(" ") ); } else if( tok == Token_ellipsis && d->hasBind("...") ){ textToInsert.append( ellipsisArg ); } else { - textToInsert.append( str.str() + TQString::tqfromLatin1(" ") ); + textToInsert.append( str.str() + TQString::fromLatin1(" ") ); } } diff --git a/lib/cppparser/lexer.h b/lib/cppparser/lexer.h index 2630edf7..12f16696 100644 --- a/lib/cppparser/lexer.h +++ b/lib/cppparser/lexer.h @@ -244,11 +244,11 @@ public: int currentColumn() const { return m_currentColumn; } inline const CHARTYPE* offset( int offset ) const { - return m_source.tqunicode() + offset; + return m_source.unicode() + offset; } inline int getOffset( const TQChar* p ) const { - return int(p - (m_source.tqunicode())); + return int(p - (m_source.unicode())); } private: diff --git a/lib/cppparser/lexercache.cpp b/lib/cppparser/lexercache.cpp index 7f420cac..cbe8640d 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_tqcurrentDateTime ) < 10 ) { + if( (*it).second.m_readTime.secsTo( m_currentDateTime ) < 10 ) { return (*it).second.m_modificationTime; } } TQFileInfo fileInfo( fileName.str() ); - m_fileModificationCache[fileName].m_readTime = TQDateTime::tqcurrentDateTime(); + m_fileModificationCache[fileName].m_readTime = TQDateTime::currentDateTime(); m_fileModificationCache[fileName].m_modificationTime = fileInfo.lastModified(); return fileInfo.lastModified(); @@ -239,7 +239,7 @@ size_t CachedLexedFile::hash() const { } void LexerCache::initFileModificationCache() { - m_tqcurrentDateTime = TQDateTime::tqcurrentDateTime(); + m_currentDateTime = TQDateTime::currentDateTime(); } void LexerCache::saveMemory() { diff --git a/lib/cppparser/lexercache.h b/lib/cppparser/lexercache.h index 535768bc..c1aac432 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_tqcurrentDateTime; + TQDateTime m_currentDateTime; }; diff --git a/lib/cppparser/parser.cpp b/lib/cppparser/parser.cpp index 9b0a0c1f..08b4e6bb 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'").tqarg(descr).tqarg(token.text()) ); \ + reportError( i18n("'%1' expected found '%2'").arg(descr).arg(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'").tqarg(descr).tqarg(token.text()) ); \ + reportError( i18n("'%1' expected found '%2'").arg(descr).arg(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.tqarg(s), line, col) ); + m_driver->addProblem( m_driver->currentFileName(), Problem(err.text.arg(s), line, col) ); } return true; -- cgit v1.2.1