diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 (patch) | |
tree | 629d3942958745660e36c30b0d6139af9459c0f8 /klinkstatus | |
parent | 929d7ae4f69d62b8f1f6d3506adf75f017753935 (diff) | |
download | tdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.tar.gz tdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klinkstatus')
-rw-r--r-- | klinkstatus/src/engine/linkchecker.cpp | 2 | ||||
-rw-r--r-- | klinkstatus/src/engine/linkfilter.cpp | 6 | ||||
-rw-r--r-- | klinkstatus/src/engine/searchmanager.cpp | 6 | ||||
-rw-r--r-- | klinkstatus/src/engine/searchmanager_impl.h | 2 | ||||
-rw-r--r-- | klinkstatus/src/parser/htmlparser.cpp | 8 | ||||
-rw-r--r-- | klinkstatus/src/parser/http.cpp | 8 | ||||
-rw-r--r-- | klinkstatus/src/parser/mstring.cpp | 8 | ||||
-rw-r--r-- | klinkstatus/src/parser/node.cpp | 16 | ||||
-rw-r--r-- | klinkstatus/src/parser/node_impl.h | 4 | ||||
-rw-r--r-- | klinkstatus/src/parser/url.cpp | 2 | ||||
-rw-r--r-- | klinkstatus/src/ui/klshistorycombo.cpp | 4 | ||||
-rw-r--r-- | klinkstatus/src/ui/tablelinkstatus.cpp | 6 | ||||
-rw-r--r-- | klinkstatus/src/utils/utils.cpp | 12 | ||||
-rw-r--r-- | klinkstatus/src/utils/xsl.cpp | 4 |
14 files changed, 44 insertions, 44 deletions
diff --git a/klinkstatus/src/engine/linkchecker.cpp b/klinkstatus/src/engine/linkchecker.cpp index 32e17329..7efe5a45 100644 --- a/klinkstatus/src/engine/linkchecker.cpp +++ b/klinkstatus/src/engine/linkchecker.cpp @@ -554,7 +554,7 @@ void LinkChecker::checkRef() else { - i_ref = url.url().tqfind("#"); + i_ref = url.url().find("#"); url_base = url.url().left(i_ref); //kdDebug(23100) << "url_base: " << url_base << endl; diff --git a/klinkstatus/src/engine/linkfilter.cpp b/klinkstatus/src/engine/linkfilter.cpp index 92dee430..fe4020fe 100644 --- a/klinkstatus/src/engine/linkfilter.cpp +++ b/klinkstatus/src/engine/linkfilter.cpp @@ -35,10 +35,10 @@ bool LinkMatcher::matches(LinktqStatus const& link ) const { /* kdDebug() << link.absoluteUrl().url() << endl; kdDebug() << link.label() << endl; - kdDebug() << link.absoluteUrl().url().tqcontains(m_text) << endl; - kdDebug() << link.label().tqcontains(m_text) << endl; + kdDebug() << link.absoluteUrl().url().contains(m_text) << endl; + kdDebug() << link.label().contains(m_text) << endl; */ - return (link.absoluteUrl().url().tqcontains(m_text, false) || link.label().tqcontains(m_text, false)) && + return (link.absoluteUrl().url().contains(m_text, false) || link.label().contains(m_text, false)) && ResultView::displayableWithtqStatus(&link, m_status); } diff --git a/klinkstatus/src/engine/searchmanager.cpp b/klinkstatus/src/engine/searchmanager.cpp index 02d85853..82c7350a 100644 --- a/klinkstatus/src/engine/searchmanager.cpp +++ b/klinkstatus/src/engine/searchmanager.cpp @@ -497,7 +497,7 @@ void SearchManager::checkLinksSimultaneously(vector<LinktqStatus*> const& links) slotLinkChecked(ls, 0); } - else if(ls->absoluteUrl().prettyURL().tqcontains("javascript:", false)) + else if(ls->absoluteUrl().prettyURL().contains("javascript:", false)) { ++ignored_links_; ls->setIgnored(true); @@ -749,7 +749,7 @@ bool SearchManager::generalDomain() const if(!check_parent_dirs_) return false; - int barra = domain_.tqfind('/'); + int barra = domain_.find('/'); if(barra != -1 && (uint)barra != domain_.length() - 1) { kdDebug(23100) << "Domain nao vago" << endl; @@ -813,7 +813,7 @@ void SearchManager::slotLinkCheckerFinnished(LinkChecker * checker) KHTMLPart* SearchManager::htmlPart(TQString const& key_url) const { - if(!html_parts_.tqcontains(key_url)) + if(!html_parts_.contains(key_url)) return 0; return html_parts_[key_url]; diff --git a/klinkstatus/src/engine/searchmanager_impl.h b/klinkstatus/src/engine/searchmanager_impl.h index 0342428a..20000390 100644 --- a/klinkstatus/src/engine/searchmanager_impl.h +++ b/klinkstatus/src/engine/searchmanager_impl.h @@ -67,7 +67,7 @@ inline void SearchManager::setExternalDomainDepth(int depth) inline void SearchManager::setDomain(TQString const& domain) { - Q_ASSERT(domain.tqfind("http://") == -1); + Q_ASSERT(domain.find("http://") == -1); domain_ = domain; general_domain_ = generalDomain(); checked_general_domain_ = true; diff --git a/klinkstatus/src/parser/htmlparser.cpp b/klinkstatus/src/parser/htmlparser.cpp index ebe8e362..759553e1 100644 --- a/klinkstatus/src/parser/htmlparser.cpp +++ b/klinkstatus/src/parser/htmlparser.cpp @@ -131,11 +131,11 @@ int HtmlParser::endOfTag(TQString const& s, int index, TQChar end_of_tag) if( (uint)index >= s.length() ) return -1; - int _end_of_tag = s.tqfind(end_of_tag, index); + int _end_of_tag = s.find(end_of_tag, index); if(_end_of_tag == -1) return _end_of_tag; - int open_aspas = s.tqfind('"', index); + int open_aspas = s.find('"', index); if(open_aspas == -1) return _end_of_tag + 1; @@ -147,7 +147,7 @@ int HtmlParser::endOfTag(TQString const& s, int index, TQChar end_of_tag) else { - int close_aspas = s.tqfind('"', open_aspas + 1); + int close_aspas = s.find('"', open_aspas + 1); if(close_aspas != -1) return endOfTag(s, close_aspas + 1, end_of_tag); else @@ -259,7 +259,7 @@ void HtmlParser::parseNodesOfTypeBASE() if(inicio == -1 || !doc[inicio].isSpace()) return; - fim = doc.tqfind(">", inicio); + fim = doc.find(">", inicio); if(fim == -1) return; diff --git a/klinkstatus/src/parser/http.cpp b/klinkstatus/src/parser/http.cpp index 0a62a9a2..6e086739 100644 --- a/klinkstatus/src/parser/http.cpp +++ b/klinkstatus/src/parser/http.cpp @@ -34,8 +34,8 @@ void HttpResponseHeader::parseLocation() int location = findWord(cabecalho, "Location: "); Q_ASSERT(location != -1); - int fim_de_linha_1 = cabecalho.tqfind('\n', location); - int fim_de_linha_2 = cabecalho.tqfind('\r', location); + int fim_de_linha_1 = cabecalho.find('\n', location); + int fim_de_linha_2 = cabecalho.find('\r', location); Q_ASSERT(fim_de_linha_1 != -1 || fim_de_linha_2 != -1); @@ -67,11 +67,11 @@ TQString HttpResponseHeader::charset(TQString const& contentTypeHttpHeaderLine) if(contentTypeHttpHeaderLine.isEmpty()) return _charset; - int index = contentTypeHttpHeaderLine.tqfind("charset="); + int index = contentTypeHttpHeaderLine.find("charset="); if(index != -1) index += TQString("charset=").length(); else { - index = contentTypeHttpHeaderLine.tqfind("charset:"); + index = contentTypeHttpHeaderLine.find("charset:"); if(index != -1) index += TQString("charset:").length(); } diff --git a/klinkstatus/src/parser/mstring.cpp b/klinkstatus/src/parser/mstring.cpp index f84c5809..aa2cdec7 100644 --- a/klinkstatus/src/parser/mstring.cpp +++ b/klinkstatus/src/parser/mstring.cpp @@ -28,7 +28,7 @@ using namespace std; int findWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice) { - int indice = s.tqfind(palavra, a_partir_do_indice, false); + int indice = s.find(palavra, a_partir_do_indice, false); if(indice == -1) return indice; @@ -38,7 +38,7 @@ int findWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice int findChar(TQString const& s, TQChar letra, uint a_partir_do_indice) { - int index = s.tqfind(letra, a_partir_do_indice, false); + int index = s.find(letra, a_partir_do_indice, false); if(index == -1) return index; else @@ -173,7 +173,7 @@ vector<TQString> tokenizeWordsSeparatedByDots(TQString s) if(inicio == -1) return v; - int fim = s.tqfind('.', inicio); + int fim = s.find('.', inicio); if(fim == -1) { v.push_back(s.mid(inicio)); @@ -200,7 +200,7 @@ vector<TQString> tokenizeWordsSeparatedBy(TQString s, TQChar criteria) if(inicio == -1) return v; - int fim = s.tqfind(criteria, inicio); + int fim = s.find(criteria, inicio); if(fim == -1) { v.push_back(s.mid(inicio)); diff --git a/klinkstatus/src/parser/node.cpp b/klinkstatus/src/parser/node.cpp index ad5ce064..f83031c8 100644 --- a/klinkstatus/src/parser/node.cpp +++ b/klinkstatus/src/parser/node.cpp @@ -39,19 +39,19 @@ TQString Node::getAttribute(TQString const& atributo) { if(content_[inicio] == '"') { - fim = content_.tqfind("\"", inicio + 1); + fim = content_.find("\"", inicio + 1); tem_aspas_ou_plicas = true; } else if(content_[inicio] == '\'') { - fim = content_.tqfind("'", inicio + 1); + fim = content_.find("'", inicio + 1); tem_aspas_ou_plicas = true; } else { int fim_bloco = nextSpaceChar(content_, inicio + 1); - int fim_tag = content_.tqfind(">", inicio + 1); - int fim_aspas = content_.tqfind("\"", inicio + 1); + int fim_tag = content_.find(">", inicio + 1); + int fim_aspas = content_.find("\"", inicio + 1); if(fim_bloco == -1 && fim_tag == -1 && fim_aspas == -1) { @@ -137,7 +137,7 @@ void NodeLink::parseLinkLabel() do { - fim_tag = content_.tqfind(">", fim_tag); + fim_tag = content_.find(">", fim_tag); if(fim_tag != -1) proximo_caractere = TQChar(content_[++fim_tag]); @@ -147,7 +147,7 @@ void NodeLink::parseLinkLabel() if(fim_tag != -1) { - int fim_label = content_.tqfind("<", fim_tag); + int fim_label = content_.find("<", fim_tag); if(fim_label != -1) { @@ -183,7 +183,7 @@ void NodeMETA::parseAttributeURL() int aspas = -1; do { - aspas = attribute_url_.tqfind("\""); + aspas = attribute_url_.find("\""); if(aspas != -1) attribute_url_.remove(aspas, 1); } @@ -206,7 +206,7 @@ TQString NodeMETA::charset() const if(content.isEmpty()) return charset; - int index = content.tqfind("charset="); + int index = content.find("charset="); if(index != -1) { index += TQString("charset=").length(); diff --git a/klinkstatus/src/parser/node_impl.h b/klinkstatus/src/parser/node_impl.h index f1ebed13..bd62104b 100644 --- a/klinkstatus/src/parser/node_impl.h +++ b/klinkstatus/src/parser/node_impl.h @@ -404,8 +404,8 @@ inline TQString const& NodeTITLE::attributeTITLE() const inline void NodeTITLE::parseAttributeTITLE() { attribute_title_ = content_; - attribute_title_.tqreplace("<TITLE>", "", false); - attribute_title_.tqreplace("</TITLE>", "", false); + attribute_title_.replace("<TITLE>", "", false); + attribute_title_.replace("</TITLE>", "", false); attribute_title_.stripWhiteSpace(); //kdDebug(23100) << "TITLE: " << attribute_title_ << endl; diff --git a/klinkstatus/src/parser/url.cpp b/klinkstatus/src/parser/url.cpp index 173c734b..90a6e4e6 100644 --- a/klinkstatus/src/parser/url.cpp +++ b/klinkstatus/src/parser/url.cpp @@ -39,7 +39,7 @@ Node::LinkType Url::resolveLinkType(TQString const& url) return Node::file_href; else if(findWord(KCharsets::resolveEntities(url), "MAILTO:") != -1) return Node::mailto; - else if( (int)url.tqfind(":/") != -1) + else if( (int)url.find(":/") != -1) return Node::href; else return Node::relative; diff --git a/klinkstatus/src/ui/klshistorycombo.cpp b/klinkstatus/src/ui/klshistorycombo.cpp index bcfef44c..f342faa7 100644 --- a/klinkstatus/src/ui/klshistorycombo.cpp +++ b/klinkstatus/src/ui/klshistorycombo.cpp @@ -143,7 +143,7 @@ void KLSHistoryCombo::selectWord(TQKeyEvent *e) if( allow_space_break && text[pos].isSpace() && count > 1 ) break; } - while( pos >= 0 && (chars.tqfindIndex(text[pos]) == -1 || count <= 1) ); + while( pos >= 0 && (chars.findIndex(text[pos]) == -1 || count <= 1) ); if( e->state() & ShiftButton ) { @@ -172,7 +172,7 @@ void KLSHistoryCombo::selectWord(TQKeyEvent *e) if( allow_space_break && text[pos].isSpace() ) break; } - while( pos < (int) text.length() && chars.tqfindIndex(text[pos]) == -1 ); + while( pos < (int) text.length() && chars.findIndex(text[pos]) == -1 ); if( e->state() & ShiftButton ) { diff --git a/klinkstatus/src/ui/tablelinkstatus.cpp b/klinkstatus/src/ui/tablelinkstatus.cpp index d7bca792..9fbd3b31 100644 --- a/klinkstatus/src/ui/tablelinkstatus.cpp +++ b/klinkstatus/src/ui/tablelinkstatus.cpp @@ -587,9 +587,9 @@ TQColor const& TableItemURL::textStatusColor() const if(linktqStatus()->errorOccurred()) { - if(linktqStatus()->error().tqcontains(i18n( "Timeout" ))) + if(linktqStatus()->error().contains(i18n( "Timeout" ))) return darkMagenta; - else if(linktqStatus()->error().tqcontains(i18n( "not supported" ))) + else if(linktqStatus()->error().contains(i18n( "not supported" ))) return lightGray; else return red; @@ -652,7 +652,7 @@ void TableItemtqStatus::setPixmap() if(linktqStatus()->errorOccurred()) { - if(linktqStatus()->error().tqcontains(i18n( "Timeout" ))) + if(linktqStatus()->error().contains(i18n( "Timeout" ))) { TQTableItem::setPixmap(SmallIcon("kalarm")); } diff --git a/klinkstatus/src/utils/utils.cpp b/klinkstatus/src/utils/utils.cpp index 83956dee..25384b4b 100644 --- a/klinkstatus/src/utils/utils.cpp +++ b/klinkstatus/src/utils/utils.cpp @@ -131,14 +131,14 @@ TQString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = { void decode(TQString& url) { - if( (int)url.tqfind('&') != -1) + if( (int)url.find('&') != -1) { for(int i = 0; i != NUMBER_OF_HTML_CODES; ++i) { - int index = url.tqfind(htmlDocCharset[i][0]); + int index = url.find(htmlDocCharset[i][0]); if(index != - 1) { - url.tqreplace(htmlDocCharset[i][0], htmlDocCharset[i][1]); + url.replace(htmlDocCharset[i][0], htmlDocCharset[i][1]); } } } @@ -146,15 +146,15 @@ void decode(TQString& url) /* void decode(string& url) { - if( (int)url.tqfind('&') != -1) + if( (int)url.find('&') != -1) { for(int i = 0; i != NUMBER_OF_HTML_CODES; ++i) { - int index = url.tqfind(htmlDocCharset[i][0].latin1()); + int index = url.find(htmlDocCharset[i][0].latin1()); if(index != - 1) { int length = htmlDocCharset[i][0].length(); - url.tqreplace(index, length, htmlDocCharset[i][1].latin1()); + url.replace(index, length, htmlDocCharset[i][1].latin1()); } } } diff --git a/klinkstatus/src/utils/xsl.cpp b/klinkstatus/src/utils/xsl.cpp index 320f14cd..541c0498 100644 --- a/klinkstatus/src/utils/xsl.cpp +++ b/klinkstatus/src/utils/xsl.cpp @@ -349,7 +349,7 @@ void XSLT::setXSLT( const TQString &_document ) } //kdDebug( 14010 ) << k_funcinfo << "Translated text: " << trans << endl; // Add "<kopete-i18n>" and "</kopete-i18n>" to length, hence the '+ 27' - document.tqreplace( uint( pos ), orig.length() + 27, trans ); + document.replace( uint( pos ), orig.length() + 27, trans ); } #ifdef RAWXSL @@ -379,7 +379,7 @@ void XSLT::setXSLT( const TQString &_document ) //We have a flag. Enable it; TQCString flagData( (const char*)child->content ); - if( flagData.tqcontains( "Flag:" ) ) + if( flagData.contains( "Flag:" ) ) { flags += flagData.mid(5); } |