From 8cbd3f41229fc385698bfd9a5524ba2610777543 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/applications/kchmviewer@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- lib/kio-msits/msits.cpp | 2 +- lib/libchmfile/libchmfileimpl.cpp | 28 ++++++++++++++-------------- lib/libchmfile/qt34.cpp | 24 ++++++++++++------------ lib/libchmfile/qt34.h | 12 ++++++------ 4 files changed, 33 insertions(+), 33 deletions(-) (limited to 'lib') diff --git a/lib/kio-msits/msits.cpp b/lib/kio-msits/msits.cpp index bea4d79..0be488f 100755 --- a/lib/kio-msits/msits.cpp +++ b/lib/kio-msits/msits.cpp @@ -141,7 +141,7 @@ bool ProtocolMSITS::parseLoadAndLookup ( const KURL& url, TQString& abspath ) { kdDebug() << "ProtocolMSITS::parseLoadAndLookup (const KURL&) " << url.path() << endl; - int pos = url.path().tqfind ("::"); + int pos = url.path().find ("::"); if ( pos == -1 ) { diff --git a/lib/libchmfile/libchmfileimpl.cpp b/lib/libchmfile/libchmfileimpl.cpp index 71907c5..9ea1d21 100644 --- a/lib/libchmfile/libchmfileimpl.cpp +++ b/lib/libchmfile/libchmfileimpl.cpp @@ -318,7 +318,7 @@ TQString LCHMFileImpl::decodeEntity( const TQString & entity ) } else { - TQMap::const_iterator it = m_entityDecodeMap.tqfind( entity ); + TQMap::const_iterator it = m_entityDecodeMap.find( entity ); if ( it == m_entityDecodeMap.end() ) { @@ -333,12 +333,12 @@ TQString LCHMFileImpl::decodeEntity( const TQString & entity ) inline int LCHMFileImpl::findStringInQuotes (const TQString& tag, int offset, TQString& value, bool firstquote, bool decodeentities) { - int qbegin = tag.tqfind ('"', offset); + int qbegin = tag.find ('"', offset); if ( qbegin == -1 ) qFatal ("LCHMFileImpl::findStringInQuotes: cannot find first quote in tag: '%s'", tag.ascii()); - int qend = firstquote ? tag.tqfind ('"', qbegin + 1) : tag.tqfindRev ('"'); + int qend = firstquote ? tag.find ('"', qbegin + 1) : tag.findRev ('"'); if ( qend == -1 || qend <= qbegin ) qFatal ("LCHMFileImpl::findStringInQuotes: cannot find last quote in tag: '%s'", tag.ascii()); @@ -875,7 +875,7 @@ TQCString LCHMFileImpl::convertSearchWord( const TQString & src ) { int index = dest[i] & 0x7F; if ( searchwordtable[index] ) - dest.tqreplace (i, 1, searchwordtable[index]); + dest.replace (i, 1, searchwordtable[index]); else dest.remove (i, 1); } @@ -895,7 +895,7 @@ void LCHMFileImpl::getSearchResults( const LCHMSearchProgressResults& tempres, for ( unsigned int i = 0; i < tempres.size(); i++ ) { - if ( urlsmap.tqfind (tempres[i].urloff) != urlsmap.end() ) + if ( urlsmap.find (tempres[i].urloff) != urlsmap.end() ) continue; urlsmap[tempres[i].urloff] = 1; @@ -914,7 +914,7 @@ void LCHMFileImpl::getSearchResults( const LCHMSearchProgressResults& tempres, TQString LCHMFileImpl::normalizeUrl( const TQString & path ) const { - int pos = path.tqfind ('#'); + int pos = path.find ('#'); TQString fixedpath = pos == -1 ? path : path.left (pos); return LCHMUrlFactory::makeURLabsoluteIfNeeded( fixedpath ); @@ -957,7 +957,7 @@ bool LCHMFileImpl::parseFileAndFillArray( const TQString & file, QT34VECTOR< LCH // Split the HHC file by HTML tags int stringlen = src.length(); - while ( pos < stringlen && (pos = src.tqfind ('<', pos)) != -1 ) + while ( pos < stringlen && (pos = src.find ('<', pos)) != -1 ) { int i, word_end = 0; @@ -967,8 +967,8 @@ bool LCHMFileImpl::parseFileAndFillArray( const TQString & file, QT34VECTOR< LCH if ( (src[i] == '"' || src[i] == '\'') ) { // find where quote ends, either by another quote, or by '>' symbol (some people don't know HTML) - int nextpos = src.tqfind (src[i], i+1); - if ( nextpos == -1 && (nextpos = src.tqfind ('>', i+1)) == -1 ) + int nextpos = src.find (src[i], i+1); + if ( nextpos == -1 && (nextpos = src.find ('>', i+1)) == -1 ) { qWarning ("LCHMFileImpl::ParseHhcAndFillTree: corrupted TOC: %s", src.mid(i).ascii()); return false; @@ -992,7 +992,7 @@ bool LCHMFileImpl::parseFileAndFillArray( const TQString & file, QT34VECTOR< LCH //qDebug ("tag: '%s', tagword: '%s'\n", tag.ascii(), tagword.ascii()); // - a topic entry - if ( tagword == "object" && tag.tqfind ("text/sitemap", 0, false) != -1 ) + if ( tagword == "object" && tag.find ("text/sitemap", 0, false) != -1 ) in_object = true; else if ( tagword == "/object" && in_object ) { @@ -1033,14 +1033,14 @@ bool LCHMFileImpl::parseFileAndFillArray( const TQString & file, QT34VECTOR< LCH TQString name_pattern = "name=", value_pattern = "value="; TQString pname, pvalue; - if ( (offset = tag.tqfind (name_pattern, 0, FALSE)) == -1 ) + if ( (offset = tag.find (name_pattern, 0, FALSE)) == -1 ) qFatal ("LCHMFileImpl::ParseAndFillTopicsTree: bad tag '%s': no name=\n", tag.ascii()); // offset+5 skips 'name=' offset = findStringInQuotes (tag, offset + name_pattern.length(), pname, TRUE, FALSE); pname = pname.lower(); - if ( (offset = tag.tqfind (value_pattern, offset, FALSE)) == -1 ) + if ( (offset = tag.find (value_pattern, offset, FALSE)) == -1 ) qFatal ("LCHMFileImpl::ParseAndFillTopicsTree: bad tag '%s': no value=\n", tag.ascii()); // offset+6 skips 'value=' @@ -1059,7 +1059,7 @@ bool LCHMFileImpl::parseFileAndFillArray( const TQString & file, QT34VECTOR< LCH // Check for URL duplication TQString url = LCHMUrlFactory::makeURLabsoluteIfNeeded( pvalue ); - if ( entry.urls.tqfind( url ) == entry.urls.end() ) + if ( entry.urls.find( url ) == entry.urls.end() ) entry.urls.push_back( url ); } else if ( pname == "see also" && asIndex && entry.name != pvalue ) @@ -1137,7 +1137,7 @@ bool LCHMFileImpl::getFileContentAsString( TQString * str, const TQString & url, TQString LCHMFileImpl::getTopicByUrl( const TQString & url ) const { - TQMap< TQString, TQString >::const_iterator it = m_url2topics.tqfind( url ); + TQMap< TQString, TQString >::const_iterator it = m_url2topics.find( url ); if ( it == m_url2topics.end() ) return TQString(); diff --git a/lib/libchmfile/qt34.cpp b/lib/libchmfile/qt34.cpp index e1194f9..cb2f3d8 100644 --- a/lib/libchmfile/qt34.cpp +++ b/lib/libchmfile/qt34.cpp @@ -77,9 +77,9 @@ char LIBCHMCString::at(uint i) const return cs.at(i); } -void LIBCHMCString::tqreplace(uint index, uint len, const char *str) +void LIBCHMCString::replace(uint index, uint len, const char *str) { - cs.tqreplace(index, len, str); + cs.replace(index, len, str); } void LIBCHMCString::remove(uint index, uint len) @@ -162,25 +162,25 @@ const char *LIBCHMString::ascii() const #endif } -int LIBCHMString::tqfind(char c, int index) const +int LIBCHMString::find(char c, int index) const { #if defined (USE_TQT_4) return s.indexOf(c, index); #else - return s.tqfind(c, index); + return s.find(c, index); #endif } -int LIBCHMString::tqfind(const TQChar &c, int index) const +int LIBCHMString::find(const TQChar &c, int index) const { #if defined (USE_TQT_4) return s.indexOf(c, index); #else - return s.tqfind(c, index); + return s.find(c, index); #endif } -int LIBCHMString::tqfind(const TQString &string, int index, bool cs) const +int LIBCHMString::find(const TQString &string, int index, bool cs) const { #if defined (USE_TQT_4) TQt::CaseSensitivity cse; @@ -188,16 +188,16 @@ int LIBCHMString::tqfind(const TQString &string, int index, bool cs) const else cse = TQt::CaseInsensitive; return s.indexOf(string, index, cse); #else - return s.tqfind(string, index, cs); + return s.find(string, index, cs); #endif } -int LIBCHMString::tqfindRev(char c) const +int LIBCHMString::findRev(char c) const { #if defined (USE_TQT_4) return s.lastIndexOf(c); #else - return s.tqfindRev(c); + return s.findRev(c); #endif } @@ -244,9 +244,9 @@ TQString LIBCHMDir::cleanDirPath(const TQString &dir) -bool LIBCHMStringList::tqcontains(const TQStringList &list, const TQString &string) +bool LIBCHMStringList::contains(const TQStringList &list, const TQString &string) { - return list.tqcontains(string); + return list.contains(string); } TQStringList LIBCHMStringList::split(const TQRegExp ®exp, const TQString &string) diff --git a/lib/libchmfile/qt34.h b/lib/libchmfile/qt34.h index 6181c8b..d37c3a2 100644 --- a/lib/libchmfile/qt34.h +++ b/lib/libchmfile/qt34.h @@ -55,7 +55,7 @@ class LIBCHMCString bool isEmpty() const; void prepend(char c); char at(uint i) const; - void tqreplace(uint index, uint len, const char *str); + void replace(uint index, uint len, const char *str); void remove(uint index, uint len); LIBCHMCString lower(); @@ -90,10 +90,10 @@ class LIBCHMString TQString lower() const; const char *ascii() const; - int tqfind(char c, int index = -1) const; - int tqfind(const TQChar &c, int index) const; - int tqfind(const TQString &string, int index, bool cs) const; - int tqfindRev(char c) const; + int find(char c, int index = -1) const; + int find(const TQChar &c, int index) const; + int find(const TQString &string, int index, bool cs) const; + int findRev(char c) const; TQChar at(uint i) const; TQString left(uint len) const; LIBCHMString mid(uint index, uint len = 0xffffffff) const; @@ -116,7 +116,7 @@ class LIBCHMDir class LIBCHMStringList { public: - static bool tqcontains(const TQStringList &list, const TQString &string); + static bool contains(const TQStringList &list, const TQString &string); static TQStringList split(const TQRegExp ®exp, const TQString &string); }; -- cgit v1.2.3