diff options
Diffstat (limited to 'languages/cpp/cppsupportpart.cpp')
-rw-r--r-- | languages/cpp/cppsupportpart.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/languages/cpp/cppsupportpart.cpp b/languages/cpp/cppsupportpart.cpp index 384ba03e..204195aa 100644 --- a/languages/cpp/cppsupportpart.cpp +++ b/languages/cpp/cppsupportpart.cpp @@ -753,7 +753,7 @@ void CppSupportPart::contextMenu( TQPopupMenu *popup, const Context *context ) text += "::"; } text += formatModelItem( *it, true ); - text = text.tqreplace( TQString::tqfromLatin1( "&" ), TQString::tqfromLatin1( "&&" ) ); + text = text.replace( TQString::tqfromLatin1( "&" ), TQString::tqfromLatin1( "&&" ) ); int id = m2->insertItem( text, this, TQT_SLOT( gotoDeclarationLine( int ) ) ); int line, column; ( *it ) ->getStartPosition( &line, &column ); @@ -794,7 +794,7 @@ void CppSupportPart::contextMenu( TQPopupMenu *popup, const Context *context ) text += "::"; } text += formatModelItem( *it, true ); - text = text.tqreplace( TQString::tqfromLatin1( "&" ), TQString::tqfromLatin1( "&&" ) ); + text = text.replace( TQString::tqfromLatin1( "&" ), TQString::tqfromLatin1( "&&" ) ); int id = m->insertItem( text, this, TQT_SLOT( gotoLine( int ) ) ); int line, column; ( *it ) ->getStartPosition( &line, &column ); @@ -850,7 +850,7 @@ TQStringList makeListUnique( const TQStringList& rhs ) { TQMap<TQString, bool> map; TQStringList ret; for( TQStringList::const_iterator it = rhs.begin(); it != rhs.end(); ++it ) { - if( map.tqfind( *it ) == map.end() ) { + if( map.find( *it ) == map.end() ) { ret << *it; map.insert( *it, true ); } @@ -878,7 +878,7 @@ TQStringList CppSupportPart::reorder( const TQStringList &list ) filePath = projectPath + "/" + filePath; } if( !isValidSource( filePath ) ) continue; - if ( headerExtensions.tqcontains( TQFileInfo( filePath ).extension() ) ) + if ( headerExtensions.contains( TQFileInfo( filePath ).extension() ) ) headers << ( filePath ); else others << ( filePath ); @@ -945,7 +945,7 @@ void CppSupportPart::savedFile( const KURL &file ) kdDebug( 9007 ) << "savedFile(): " << fileName.mid ( m_projectDirectory.length() + 1 ) << endl; - if ( m_projectFileList.tqcontains( fileName.mid ( m_projectDirectory.length() + 1 ) ) ) + if ( m_projectFileList.contains( fileName.mid ( m_projectDirectory.length() + 1 ) ) ) { maybeParse( fileName ); emit addedSourceInfo( fileName ); @@ -962,7 +962,7 @@ TQString CppSupportPart::findSourceFile() // extract the base path (full path without '.' and extension) TQString base = path.left( path.length() - ext.length() - 1 ); TQStringList candidates; - if ( TQStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).tqcontains( ext ) ) + if ( TQStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).contains( ext ) ) { candidates << ( base + ".c" ); candidates << ( base + ".cc" ); @@ -1017,7 +1017,7 @@ TQString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) // just the filename without the extension TQString fileNameWoExt = fi.fileName(); if ( !ext.isEmpty() ) - fileNameWoExt.tqreplace( "." + ext, "" ); + fileNameWoExt.replace( "." + ext, "" ); TQString possibleExts; // depending on the current extension assemble a list of // candidate files to look for @@ -1026,13 +1026,13 @@ TQString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) if ( path.endsWith( "_impl.h" ) ) { TQString headerpath = path; - headerpath.tqreplace( "_impl.h", ".h" ); + headerpath.replace( "_impl.h", ".h" ); candidates << headerpath; - fileNameWoExt.tqreplace( "_impl", "" ); + fileNameWoExt.replace( "_impl", "" ); possibleExts = "h"; } // if file is a header file search for implementation file - else if ( TQStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).tqcontains( ext ) ) + else if ( TQStringList::split( ',', "h,H,hh,hxx,hpp,tlh" ).contains( ext ) ) { candidates << ( base + ".c" ); candidates << ( base + ".cc" ); @@ -1048,7 +1048,7 @@ TQString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) possibleExts = "c,cc,cpp,c++,cxx,C,m,mm,M,inl,_impl.h"; } // if file is an implementation file, search for header file - else if ( TQStringList::split( ',', "c,cc,cpp,c++,cxx,C,m,mm,M,inl" ).tqcontains( ext ) ) + else if ( TQStringList::split( ',', "c,cc,cpp,c++,cxx,C,m,mm,M,inl" ).contains( ext ) ) { candidates << ( base + ".h" ); candidates << ( base + ".H" ); @@ -1081,10 +1081,10 @@ TQString CppSupportPart::sourceOrHeaderCandidate( const KURL &url ) candidateFileWoExt.setFile(*fileIt); //kdDebug( 9007 ) << "candidate file: " << *fileIt << endl; if( !candidateFileWoExt.extension().isEmpty() ) - candidateFileWoExtString = candidateFileWoExt.fileName().tqreplace( "." + candidateFileWoExt.extension(), "" ); + candidateFileWoExtString = candidateFileWoExt.fileName().replace( "." + candidateFileWoExt.extension(), "" ); if ( candidateFileWoExtString == fileNameWoExt ) { - if ( possibleExtsList.tqcontains( candidateFileWoExt.extension() ) || candidateFileWoExt.extension().isEmpty() ) + if ( possibleExtsList.contains( candidateFileWoExt.extension() ) || candidateFileWoExt.extension().isEmpty() ) { //kdDebug( 9007 ) << "checking if " << *fileIt << " exists" << endl; if ( TQFileInfo( *fileIt ).exists() ) @@ -1354,13 +1354,13 @@ KDevLanguageSupport::Features CppSupportPart::features() TQString CppSupportPart::formatClassName( const TQString &name ) { TQString n = name; - return n.tqreplace( ".", "::" ); + return n.replace( ".", "::" ); } TQString CppSupportPart::unformatClassName( const TQString &name ) { TQString n = name; - return n.tqreplace( "::", "." ); + return n.replace( "::", "." ); } bool CppSupportPart::shouldSplitDocument(const KURL &url) @@ -1554,9 +1554,9 @@ void CppSupportPart::slotParseFiles() { TQDateTime t = fileInfo.lastModified(); - if ( ! ( m_timestamp.tqcontains( absFilePath ) && m_timestamp[ absFilePath ] == t ) ) + if ( ! ( m_timestamp.contains( absFilePath ) && m_timestamp[ absFilePath ] == t ) ) { - if ( _jd->pcs.tqcontains( absFilePath ) ) + if ( _jd->pcs.contains( absFilePath ) ) { _jd->stream.tqdevice() ->at( _jd->pcs[ absFilePath ].second ); FileDom file = codeModel() ->create<FileModel>(); @@ -1678,7 +1678,7 @@ void CppSupportPart::maybeParse( const TQString& fn, bool background ) if ( !fileInfo.exists() ) return; - TQMap<TQString, TQDateTime>::Iterator it = m_timestamp.tqfind( path ); + TQMap<TQString, TQDateTime>::Iterator it = m_timestamp.find( path ); if ( codeModel()->hasFile( fn ) && it != m_timestamp.end() && *it == t ) return; @@ -1751,7 +1751,7 @@ void CppSupportPart::MakeMemberHelper( TQString& text, int& atLine, int& atColum } SimpleDeclarationAST* decl = currentNode ? ( SimpleDeclarationAST* ) currentNode : 0; - if ( decl && decl->storageSpecifier() && decl->storageSpecifier()->text().tqcontains("friend") ) + if ( decl && decl->storageSpecifier() && decl->storageSpecifier()->text().contains("friend") ) { kdDebug(9007) << "this is a friend declaration, don't create any definition" << endl; fail = true; @@ -1903,7 +1903,7 @@ TQStringList CppSupportPart::modifiedFileList() TQDateTime t = fileInfo.lastModified(); - TQMap<TQString, TQDateTime>::Iterator dictIt = m_timestamp.tqfind( path ); + TQMap<TQString, TQDateTime>::Iterator dictIt = m_timestamp.find( path ); if ( fileInfo.exists() && dictIt != m_timestamp.end() && *dictIt == t ) continue; @@ -1983,7 +1983,7 @@ void CppSupportPart::setupCatalog( ) kdDebug( 9007 ) << "CppSupportPart::setupCatalog()2 " << *it << endl; Catalog * catalog = new Catalog(); catalog->open( *it ); - catalog->setEnabled( enabledPCSs.tqcontains( TQFileInfo( *it ).baseName(true) ) ); + catalog->setEnabled( enabledPCSs.contains( TQFileInfo( *it ).baseName(true) ) ); ++it; for ( TQStringList::Iterator idxIt = indexList.begin(); idxIt != indexList.end(); ++idxIt ) @@ -2179,7 +2179,7 @@ void CppSupportPart::saveProjectSourceInfo() { const FileDom dom = ( *it ); stream << dom->name() << m_timestamp[ dom->name() ].toTime_t(); - if( m_timestamp.tqfind( dom->name() ) == m_timestamp.end() ) { + if( m_timestamp.find( dom->name() ) == m_timestamp.end() ) { kdDebug( 9007 ) << dom->name() << ": timestamp is missing " << endl; } offsets.insert( dom->name(), stream.tqdevice() ->at() ); @@ -2323,7 +2323,7 @@ int CppSupportPart::parseFilesAndDependencies( TQStringList files, bool backgrou int cgroup = nextGroup; nextGroup++; - if( fileGroups.tqfind( *it ) != fileGroups.end() ) + if( fileGroups.find( *it ) != fileGroups.end() ) cgroup = fileGroups[*it]; for( TQStringList::iterator lit = lst.begin(); lit != lst.end(); ++lit ) @@ -2575,19 +2575,19 @@ void CppSupportPart::emitFileParsed( TQStringList l ) bool CppSupportPart::isHeader( const TQString& fileName ) const { /*KMimeType::Ptr ptr = KMimeType::findByPath( fileName ); - if ( ptr && m_headerMimeTypes.tqcontains( ptr->name() ) ) + if ( ptr && m_headerMimeTypes.contains( ptr->name() ) ) return true;*/ - return ( m_headerExtensions.tqfindIndex( TQFileInfo( fileName ).extension() ) != -1 ); + return ( m_headerExtensions.findIndex( TQFileInfo( fileName ).extension() ) != -1 ); } bool CppSupportPart::isSource( const TQString& fileName ) const { /*KMimeType::Ptr ptr = KMimeType::findByPath( fileName ); - if ( ptr && m_sourceMimeTypes.tqcontains( ptr->name() ) ) + if ( ptr && m_sourceMimeTypes.contains( ptr->name() ) ) return true;*/ - return ( m_sourceExtensions.tqfindIndex( TQFileInfo( fileName ).extension() ) != -1 ); + return ( m_sourceExtensions.findIndex( TQFileInfo( fileName ).extension() ) != -1 ); } void CppSupportPart::gotoDeclarationLine( int line ) @@ -2825,7 +2825,7 @@ void CppSupportPart::addMethod( ClassDom aClass, const TQString& name, const TQS indentString = sourceFormatter->indentString(); editIface->insertText( findInsertionLineMethod( aClass, accessType ), 0, - finalDeclaration.tqreplace( "\n", "\n\t" ) + "\n" ); + finalDeclaration.replace( "\n", "\n\t" ) + "\n" ); backgroundParser() ->addFile( aClass->fileName() ); if ( isInline || isPureVirtual ) |