summaryrefslogtreecommitdiffstats
path: root/languages/cpp/cppcodecompletion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/cppcodecompletion.cpp')
-rw-r--r--languages/cpp/cppcodecompletion.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/languages/cpp/cppcodecompletion.cpp b/languages/cpp/cppcodecompletion.cpp
index 3d9fcb73..846aec77 100644
--- a/languages/cpp/cppcodecompletion.cpp
+++ b/languages/cpp/cppcodecompletion.cpp
@@ -134,7 +134,7 @@ CppCodeCompletion* cppCompletionInstance = 0;
//file global functions, must be before any "using namespace"
TQString cleanForMenu( TQString txt ) {
- return txt.tqreplace( "&", "&&" ).tqreplace( " ", " " );
+ return txt.replace( "&", "&&" ).replace( " ", " " );
}
TQString buildSignature( TypePointer currType ) {
@@ -254,7 +254,7 @@ static TQValueList<ItemType> unique( const TQValueList<ItemType>& entryList ) {
e.prefix + " " +
e.text + " " +
e.postfix + " " ).simplifyWhiteSpace().stripWhiteSpace();
- if ( map.tqfind( key ) == map.end() ) {
+ if ( map.find( key ) == map.end() ) {
map[ key ] = TRUE;
l << e;
}
@@ -269,7 +269,7 @@ static TQStringList unique( const TQStringList& entryList ) {
TQStringList::ConstIterator it = entryList.begin();
while ( it != entryList.end() ) {
TQString e = *it++;
- if ( map.tqfind( e ) == map.end() ) {
+ if ( map.find( e ) == map.end() ) {
map[ e ] = TRUE;
l << e;
}
@@ -285,7 +285,7 @@ static TQStringList unique( const TQValueList<TQStringList>& entryList ) {
while ( it != entryList.end() ) {
TQStringList li = ( *it++ );
TQString e = li.join( "\n" );
- if ( map.tqfind( e ) == map.end() ) {
+ if ( map.find( e ) == map.end() ) {
map[ e ] = TRUE;
l += li;
}
@@ -376,7 +376,7 @@ struct PopupFillerHelpStruct {
if ( cm && cm->item() ) {
TQPopupMenu * m = PopupTracker::createPopup( tqparent );
TQString scope = cm->scope().join("::");
- TQMap< TQString, TQPopupMenu* >::iterator it = m_namespacePopupCache.tqfind( scope );
+ TQMap< TQString, TQPopupMenu* >::iterator it = m_namespacePopupCache.find( scope );
if( it != m_namespacePopupCache.end() ) {
tqparent->insertItem( "Imported Namespace " + scope, *it );
delete m;
@@ -1121,7 +1121,7 @@ void CppCodeCompletion::slotTextChanged() {
// !!WARNING!! This is very hackish, but KTE doesn't offer a way
// to tell the completion box to _go_away_
if ( ch.simplifyWhiteSpace().isEmpty() &&
- !strCurLine.simplifyWhiteSpace().tqcontains( "virtual" ) &&
+ !strCurLine.simplifyWhiteSpace().contains( "virtual" ) &&
m_bCompletionBoxShow ) {
TQValueList<KTextEditor::CompletionEntry> entryList;
m_bCompletionBoxShow = true;
@@ -1139,7 +1139,7 @@ void CppCodeCompletion::slotTextChanged() {
// m_codeCompleteCh2Rx completes on "->" and "::"
if ( ( argsHint && ch == "(" ) ||
- ( codeComplete && strCurLine.simplifyWhiteSpace().tqcontains( "virtual" ) ) ||
+ ( codeComplete && strCurLine.simplifyWhiteSpace().contains( "virtual" ) ) ||
( codeComplete && ( m_codeCompleteChRx.search( ch ) != -1 ||
m_codeCompleteCh2Rx.search( ch2 ) != -1 ) ) ||
( headComplete && ( ch == "\"" || ch == "<" ) && m_includeRx.search( strCurLine ) != -1 ) ) {
@@ -1238,7 +1238,7 @@ TQString CppCodeCompletion::replaceCppComments( const TQString& contents ) {
after.fill( ' ', before.length() - 5 );
after.prepend( "/*" );
after.append( "*/" );
- text.tqreplace( pos, before.length() - 1, after );
+ text.replace( pos, before.length() - 1, after );
pos += after.length();
} else {
pos += m_cppCodeCommentsRx.matchedLength();
@@ -1444,7 +1444,7 @@ EvaluationResult CppCodeCompletion::evaluateExpressionAt( int line, int column ,
}
void CppCodeCompletion::popupAction( int number ) {
- PopupActions::iterator it = m_popupActions.tqfind( number );
+ PopupActions::iterator it = m_popupActions.find( number );
if ( it != m_popupActions.end() ) {
TQString fileName = ( *it ).file == "current_file" ? m_activeFileName : ( *it ).file.operator TQString();
if( (*it).startLine == -1 ) {
@@ -1459,7 +1459,7 @@ void CppCodeCompletion::popupAction( int number ) {
}
void CppCodeCompletion::popupDefinitionAction( int number ) {
- PopupActions::iterator it = m_popupDefinitionActions.tqfind( number );
+ PopupActions::iterator it = m_popupDefinitionActions.find( number );
if ( it != m_popupDefinitionActions.end() ) {
TQString fileName = ( *it ).file == "current_file" ? m_activeFileName : ( *it ).file.operator TQString();
if ( !m_pSupport->switchHeaderImpl( fileName, ( *it ).startLine, ( *it ).startCol ) )
@@ -1481,7 +1481,7 @@ void CppCodeCompletion::selectItem( ItemDom item ) {
}
void CppCodeCompletion::popupClassViewAction( int number ) {
- PopupClassViewActions::iterator it = m_popupClassViewActions.tqfind( number );
+ PopupClassViewActions::iterator it = m_popupClassViewActions.find( number );
if ( it != m_popupClassViewActions.end() ) {
if ( ( *it ) )
selectItem( *it );
@@ -1744,7 +1744,7 @@ bool CppCodeCompletion::isTypeExpression( const TQString& expr ) {
bool CppCodeCompletion::mayBeTypeTail( int line, int column, TQString& append, bool inFunction ) {
TQString tail = clearComments( m_activeEditor->text( line, column + 1, line + 10 > ( int ) m_activeEditor->numLines() ? ( int ) m_activeEditor->numLines() : line + 10, 0 ) );
- tail.tqreplace( "\n", " " );
+ tail.replace( "\n", " " );
SafetyCounter s ( 100 );
bool hadSpace = false;
while ( !tail.isEmpty() && s ) {
@@ -1830,7 +1830,7 @@ ExpressionInfo CppCodeCompletion::findExpressionAt( int line, int column, int st
//make this a regexp
TQString e = ret.expr();
- if ( e.tqcontains( "." ) || e.tqcontains( "->" ) || e.tqcontains( "(" ) || e.tqcontains( ")" ) || e.tqcontains( "=" ) || e.tqcontains( "-" ) )
+ if ( e.contains( "." ) || e.contains( "->" ) || e.contains( "(" ) || e.contains( ")" ) || e.contains( "=" ) || e.contains( "-" ) )
mayBeType = false;
if ( mayBeType ) {
@@ -1988,8 +1988,8 @@ bool CppCodeCompletion::functionContains( FunctionDom f , int line, int col ) {
if ( t.isEmpty() )
return false;
- //int i = t.tqfind( '{' );
- int i = t.tqfind( '(' ); //This now includes the argument-list
+ //int i = t.find( '{' );
+ int i = t.find( '(' ); //This now includes the argument-list
if ( i == -1 )
return false;
int lineCols = 0;
@@ -2017,7 +2017,7 @@ void CppCodeCompletion::getFunctionBody( FunctionDom f , int& line, int& col ) {
if ( t.isEmpty() )
return;
- int i = t.tqfind( '{' );
+ int i = t.find( '{' );
if ( i == -1 )
return;
i++;
@@ -2673,7 +2673,7 @@ void CppCodeCompletion::completeText( bool invokedOnDemand /*= false*/ ) {
kdDebug(9007) << "------> found virtual keyword for class specifier '"
<< clazz->text() << "'" << endl;
}*/
- } else if ( TQString( "virtual" ).tqfind( keyword ) != -1 )
+ } else if ( TQString( "virtual" ).find( keyword ) != -1 )
m_blockForKeyword = true;
else
m_blockForKeyword = false;
@@ -2756,7 +2756,7 @@ void CppCodeCompletion::completeText( bool invokedOnDemand /*= false*/ ) {
if ( ch2 == "::" ) {
TQString str = clearComments( expr );
- if ( !str.tqcontains( '.' ) && !str.tqcontains( "->" ) ) ///Necessary, because the expression may also be like user->BaseUser::
+ if ( !str.contains( '.' ) && !str.contains( "->" ) ) ///Necessary, because the expression may also be like user->BaseUser::
isInstance = false;
}
@@ -4417,7 +4417,7 @@ TQString CppCodeCompletion::createTypeInfoString( int line, int column )
if ( type->resolved() )
{
TQString scope = type->resolved()->scope().join("::");
- int pos = scope.tqfindRev("::");
+ int pos = scope.findRev("::");
if ( scope.isEmpty() || pos == -1 )
{
scope = "::";