From 6335dc55802871b5a43492f217b6edbb420204c4 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ark/arch.cpp | 2 +- ark/archiveformatdlg.cpp | 2 +- ark/archiveformatinfo.cpp | 14 +++++++------- ark/archiveformatinfo.h | 2 +- ark/arkapp.cpp | 6 +++--- ark/arkutils.cpp | 2 +- ark/arkwidget.cpp | 10 +++++----- ark/compressedfile.cpp | 2 +- ark/filelistview.cpp | 8 ++++---- ark/lha.cpp | 6 +++--- ark/mainwindow.cpp | 2 +- ark/rar.cpp | 2 +- ark/sevenzip.cpp | 4 ++-- ark/tar.cpp | 4 ++-- ark/zip.cpp | 2 +- ark/zoo.cpp | 2 +- 16 files changed, 35 insertions(+), 35 deletions(-) (limited to 'ark') diff --git a/ark/arch.cpp b/ark/arch.cpp index 336fe59..9b9aa00 100644 --- a/ark/arch.cpp +++ b/ark/arch.cpp @@ -297,7 +297,7 @@ void Arch::slotReceivedTOC( KProcess*, char* data, int length ) { processLine( m_buffer ); } - else if ( m_buffer.tqfind( m_headerString.data() ) == -1 ) + else if ( m_buffer.find( m_headerString.data() ) == -1 ) { if ( m_header_removed && !m_finished ) { diff --git a/ark/archiveformatdlg.cpp b/ark/archiveformatdlg.cpp index f9ac931..68c0d3f 100644 --- a/ark/archiveformatdlg.cpp +++ b/ark/archiveformatdlg.cpp @@ -56,7 +56,7 @@ ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * tqparent, const TQString & defaul TQStringList list = ArchiveFormatInfo::self()->allDescriptions(); list.sort(); m_combo->insertStringList( list ); - m_combo->setCurrentItem( list.tqfindIndex( defaultDescription ) ); + m_combo->setCurrentItem( list.findIndex( defaultDescription ) ); } TQString ArchiveFormatDlg::mimeType() diff --git a/ark/archiveformatinfo.cpp b/ark/archiveformatinfo.cpp index ea07d6a..2dcbabb 100644 --- a/ark/archiveformatinfo.cpp +++ b/ark/archiveformatinfo.cpp @@ -72,7 +72,7 @@ void ArchiveFormatInfo::buildFormatInfos() addFormatInfo( COMPRESSED_FORMAT, "application/x-xz", ".xz" ); addFormatInfo( COMPRESSED_FORMAT, "application/x-lzop", ".lzo" ); addFormatInfo( COMPRESSED_FORMAT, "application/x-compress", ".Z" ); - tqfind( COMPRESSED_FORMAT ).description = i18n( "Compressed File" ); + find( COMPRESSED_FORMAT ).description = i18n( "Compressed File" ); addFormatInfo( ZOO_FORMAT, "application/x-zoo", ".zoo" ); @@ -90,7 +90,7 @@ void ArchiveFormatInfo::buildFormatInfos() void ArchiveFormatInfo::addFormatInfo( ArchType type, TQString mime, TQString stdExt ) { - FormatInfo & info = tqfind( type ); + FormatInfo & info = find( type ); KDesktopFile * desktopFile = new KDesktopFile( mime + ".desktop", true, "mime" ); if( !desktopFile ) @@ -146,7 +146,7 @@ TQStringList ArchiveFormatInfo::allDescriptions() return descriptions; } -ArchiveFormatInfo::FormatInfo & ArchiveFormatInfo::tqfind( ArchType type ) +ArchiveFormatInfo::FormatInfo & ArchiveFormatInfo::find( ArchType type ) { InfoList::Iterator it = m_formatInfos.begin(); for( ; it != m_formatInfos.end(); ++it ) @@ -177,7 +177,7 @@ ArchType ArchiveFormatInfo::archTypeForMimeType( const TQString & mimeType ) InfoList::Iterator it = m_formatInfos.begin(); for( ; it != m_formatInfos.end(); ++it ) { - int index = (*it).mimeTypes.tqfindIndex( mimeType ); + int index = (*it).mimeTypes.findIndex( mimeType ); if( index != -1 ) return (*it).type; } @@ -243,7 +243,7 @@ TQString ArchiveFormatInfo::mimeTypeForDescription( const TQString & description int index; for( ; it != m_formatInfos.end(); ++it ) { - index = (*it).allDescriptions.tqfindIndex( description ); + index = (*it).allDescriptions.findIndex( description ); if ( index != -1 ) return (* (*it).mimeTypes.at( index ) ); } @@ -256,7 +256,7 @@ TQString ArchiveFormatInfo::descriptionForMimeType( const TQString & mimeType ) int index; for( ; it != m_formatInfos.end(); ++it ) { - index = (*it).mimeTypes.tqfindIndex( mimeType ); + index = (*it).mimeTypes.findIndex( mimeType ); if ( index != -1 ) return (* (*it).allDescriptions.at( index ) ); } @@ -269,7 +269,7 @@ TQString ArchiveFormatInfo::defaultExtension( const TQString & mimeType ) int index; for( ; it != m_formatInfos.end(); ++it ) { - index = (*it).mimeTypes.tqfindIndex( mimeType ); + index = (*it).mimeTypes.findIndex( mimeType ); if ( index != -1 ) return (* (*it).defaultExtensions.at( index ) ); } diff --git a/ark/archiveformatinfo.h b/ark/archiveformatinfo.h index e1c987d..5ba5ef3 100644 --- a/ark/archiveformatinfo.h +++ b/ark/archiveformatinfo.h @@ -59,7 +59,7 @@ private: enum ArchType type; }; - FormatInfo & tqfind ( ArchType type ); + FormatInfo & find ( ArchType type ); typedef TQValueList InfoList; InfoList m_formatInfos; diff --git a/ark/arkapp.cpp b/ark/arkapp.cpp index 3085399..c4604e6 100644 --- a/ark/arkapp.cpp +++ b/ark/arkapp.cpp @@ -85,7 +85,7 @@ static TQString resolveFilename(const TQString & _arkname) if (name.at(0) != '/') { // copy the path from _arkname - int index = _arkname.tqfindRev('/'); + int index = _arkname.findRev('/'); name = _arkname.left(index + 1) + name; } kdDebug(1601) << "Now resolve " << name << endl; @@ -243,7 +243,7 @@ ArkApplication::addOpenArk(const KURL & _arkname, MainWindow *_ptr) else realName = _arkname.prettyURL(); openArksList.append(realName); - m_windowsHash.tqreplace(realName, _ptr); + m_windowsHash.replace(realName, _ptr); kdDebug(1601) << "Saved ptr " << _ptr << " added open ark: " << realName << endl; } @@ -287,7 +287,7 @@ ArkApplication::isArkOpenAlready(const KURL & _arkname) realName = resolveFilename(_arkname.path()); // follow symlink else realName = _arkname.prettyURL(); - return ( openArksList.tqfindIndex(realName) != -1 ); + return ( openArksList.findIndex(realName) != -1 ); } #include "arkapp.moc" diff --git a/ark/arkutils.cpp b/ark/arkutils.cpp index 94b5bc1..210f9bb 100644 --- a/ark/arkutils.cpp +++ b/ark/arkutils.cpp @@ -101,7 +101,7 @@ TQString ArkUtils::getTimeStamp(const TQString &_month, TQString year, timestamp; - if (_yearOrTime.tqcontains(":")) + if (_yearOrTime.contains(":")) // it has a timestamp so we have to figure out the year { year.sprintf("%d", ArkUtils::getYear(nMonth, thisYear, thisMonth)); diff --git a/ark/arkwidget.cpp b/ark/arkwidget.cpp index 2eb922b..f070d4d 100644 --- a/ark/arkwidget.cpp +++ b/ark/arkwidget.cpp @@ -453,7 +453,7 @@ ArkWidget::guessName( const KURL &archive ) ext = (*it).remove( '*' ); if ( fileName.endsWith( ext ) ) { - fileName = fileName.left( fileName.tqfindRev( ext ) ); + fileName = fileName.left( fileName.findRev( ext ) ); break; } } @@ -1204,7 +1204,7 @@ ArkWidget::toLocalFile( const KURL& url ) TQString strURL = url.prettyURL(); TQString tempfile = tmpDir(); - tempfile += strURL.right(strURL.length() - strURL.tqfindRev("/") - 1); + tempfile += strURL.right(strURL.length() - strURL.findRev("/") - 1); deleteAfterUse(tempfile); // remember for deletion KURL tempurl; tempurl.setPath( tempfile ); if( !KIO::NetAccess::dircopy(url, tempurl, this) ) @@ -1643,10 +1643,10 @@ ArkWidget::slotEditFinished(KProcess *kp) TQStringList::Iterator it = list.begin(); TQString filename = *it; TQString path; - if (filename.tqcontains('/') > 3) + if (filename.contains('/') > 3) { kdDebug(1601) << "Filename is originally: " << filename << endl; - int i = filename.tqfind('/', 5); + int i = filename.find('/', 5); path = filename.left(1+i); kdDebug(1601) << "Changing to dir: " << path << endl; TQDir::setCurrent(path); @@ -1734,7 +1734,7 @@ ArkWidget::showCurrentFile() TQString fullname = tmpDir(); fullname += name; - if(fullname.tqcontains("../")) + if(fullname.contains("../")) fullname.remove("../"); //Convert the TQString filename to KURL to escape the bad characters diff --git a/ark/compressedfile.cpp b/ark/compressedfile.cpp index 17df279..f935eac 100644 --- a/ark/compressedfile.cpp +++ b/ark/compressedfile.cpp @@ -289,7 +289,7 @@ void CompressedFile::addFile( const TQStringList &urls ) proc.start(KProcess::Block); m_tmpfile = file.right(file.length() - - file.tqfindRev("/")-1); + - file.findRev("/")-1); m_tmpfile = m_tmpdir + '/' + m_tmpfile; kdDebug(1601) << "Temp file name is " << m_tmpfile << endl; diff --git a/ark/filelistview.cpp b/ark/filelistview.cpp index 82a0c21..a4e2f02 100644 --- a/ark/filelistview.cpp +++ b/ark/filelistview.cpp @@ -129,7 +129,7 @@ void FileLVI::setText( int column, const TQString &text ) name = name.left( name.length() - 1 ); if ( name.startsWith( "/" ) ) name = name.mid( 1 ); - int pos = name.tqfindRev( '/' ); + int pos = name.findRev( '/' ); if ( pos != -1 ) name = name.right( name.length() - pos - 1 ); TQListViewItem::setText( column, name ); @@ -242,7 +242,7 @@ void FileListView::removeColumn( int index ) { for ( unsigned int i = index; i < m_columnMap.count() - 2; i++ ) { - m_columnMap.tqreplace( i, m_columnMap[ i + 1 ] ); + m_columnMap.replace( i, m_columnMap[ i + 1 ] ); } m_columnMap.remove( m_columnMap[ m_columnMap.count() - 1 ] ); @@ -509,11 +509,11 @@ FileLVI* FileListView::findParent( const TQString& fullname ) if ( name.startsWith( "/" ) ) name = name.mid( 1 ); // Checks if this entry needs a tqparent - if ( !name.tqcontains( '/' ) ) + if ( !name.contains( '/' ) ) return static_cast< FileLVI* >( 0 ); // Get a list of ancestors - TQString parentFullname = name.left( name.tqfindRev( '/' ) ); + TQString parentFullname = name.left( name.findRev( '/' ) ); TQStringList ancestorList = TQStringList::split( '/', parentFullname ); // Checks if the listview contains the first item in the list of ancestors diff --git a/ark/lha.cpp b/ark/lha.cpp index d34fd51..f83e809 100644 --- a/ark/lha.cpp +++ b/ark/lha.cpp @@ -67,7 +67,7 @@ bool LhaArch::processLine( const TQCString &line ) char columns[13][80]; char filename[4096]; - if ( line.tqcontains( "[generic]" ) ) + if ( line.contains( "[generic]" ) ) { sscanf( _line, " %79[]\\[generic] %79[0-9] %79[0-9] %79[0-9.%*] %10[-a-z0-9 ] %3[A-Za-z]%1[ ]%2[0-9 ]%1[ ]%5[ 0-9:]%1[ ]%4095[^\n]", @@ -76,7 +76,7 @@ bool LhaArch::processLine( const TQCString &line ) columns[9], filename ); strcpy( columns[1], " " ); } - else if ( line.tqcontains( "[MS-DOS]" ) ) + else if ( line.contains( "[MS-DOS]" ) ) { sscanf( _line, " %79[]\\[MS-DOS] %79[0-9] %79[0-9] %79[0-9.%*] %10[-a-z0-9 ] %3[A-Za-z]%1[ ]%2[0-9 ]%1[ ]%5[ 0-9:]%1[ ]%4095[^\n]", @@ -103,7 +103,7 @@ bool LhaArch::processLine( const TQCString &line ) TQString file = filename; TQString name, link; bool bLink = false; - int pos = file.tqfind( " -> " ); + int pos = file.find( " -> " ); if ( pos != -1 ) { bLink = true; diff --git a/ark/mainwindow.cpp b/ark/mainwindow.cpp index 045ce1a..6434bca 100644 --- a/ark/mainwindow.cpp +++ b/ark/mainwindow.cpp @@ -263,7 +263,7 @@ MainWindow::getOpenURL( bool addOnly, const TQString & caption, if ( !suggestedName.isEmpty() ) { filter = TQString(); - combo->setCurrentItem( list.tqfindIndex( ArchiveFormatInfo::self()->descriptionForMimeType( + combo->setCurrentItem( list.findIndex( ArchiveFormatInfo::self()->descriptionForMimeType( KMimeType::findByPath( suggestedName, 0, true )->name() ) ) ); } diff --git a/ark/rar.cpp b/ark/rar.cpp index 056e6c4..1cebe05 100644 --- a/ark/rar.cpp +++ b/ark/rar.cpp @@ -291,7 +291,7 @@ void RarArch::unarchFileInternal() bool RarArch::passwordRequired() { - return m_lastShellOutput.tqfindRev("password incorrect ?)")+1; + return m_lastShellOutput.findRev("password incorrect ?)")+1; } void RarArch::remove( TQStringList *list ) diff --git a/ark/sevenzip.cpp b/ark/sevenzip.cpp index 2292214..0673f6c 100644 --- a/ark/sevenzip.cpp +++ b/ark/sevenzip.cpp @@ -330,11 +330,11 @@ void SevenZipArch::slotReceivedTOC( KProcess*, char* data, int length ) startChar = lfChar + 1; // Check if the header was found - if ( m_buffer.tqfind( m_headerString.data() ) != -1 ) + if ( m_buffer.find( m_headerString.data() ) != -1 ) { if ( !m_header_removed ) { - m_nameColumnPos = m_buffer.tqfindRev( ' ' ) + 1; + m_nameColumnPos = m_buffer.findRev( ' ' ) + 1; m_header_removed = true; } else diff --git a/ark/tar.cpp b/ark/tar.cpp index 4bc6c0a..e91f5ca 100644 --- a/ark/tar.cpp +++ b/ark/tar.cpp @@ -322,14 +322,14 @@ void TarArch::slotListingDone(KProcess *_kp) if (flv!=NULL && flv->totalFiles()>0) { const TQString firstfile = ((FileLVI *) flv->firstChild())->fileName(); - if (list.tqfind(TQRegExp(TQString("\\s\\./%1[/\\n]").tqarg(firstfile)))>=0) + if (list.find(TQRegExp(TQString("\\s\\./%1[/\\n]").tqarg(firstfile)))>=0) { m_dotslash = true; kdDebug(1601) << k_funcinfo << "archive has dot-slash" << endl; } else { - if (list.tqfind(TQRegExp(TQString("\\s%1[/\\n]").tqarg(firstfile)))>=0) + if (list.find(TQRegExp(TQString("\\s%1[/\\n]").tqarg(firstfile)))>=0) { // archive doesn't have dot-slash m_dotslash = false; diff --git a/ark/zip.cpp b/ark/zip.cpp index 59db0c9..4a647b5 100644 --- a/ark/zip.cpp +++ b/ark/zip.cpp @@ -240,7 +240,7 @@ void ZipArch::unarchFileInternal() bool ZipArch::passwordRequired() { - return m_lastShellOutput.tqfindRev("unable to get password\n")!=-1 || m_lastShellOutput.endsWith("password inflating\n") || m_lastShellOutput.tqfindRev("password incorrect--reenter:")!=-1 || m_lastShellOutput.endsWith("incorrect password\n"); + return m_lastShellOutput.findRev("unable to get password\n")!=-1 || m_lastShellOutput.endsWith("password inflating\n") || m_lastShellOutput.findRev("password incorrect--reenter:")!=-1 || m_lastShellOutput.endsWith("incorrect password\n"); } void ZipArch::remove( TQStringList *list ) diff --git a/ark/zoo.cpp b/ark/zoo.cpp index 6f9a53e..32b161b 100644 --- a/ark/zoo.cpp +++ b/ark/zoo.cpp @@ -287,7 +287,7 @@ TQString fixTime( const TQString &_strTime ) // +3 or -3 etc. TQString strTime = _strTime; - if ( strTime.tqcontains("+") || strTime.tqcontains("-") ) + if ( strTime.contains("+") || strTime.contains("-") ) { TQCharRef c = strTime.tqat( 8 ); int offset = strTime.right( strTime.length() - 9 ).toInt(); -- cgit v1.2.1