diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 10:00:36 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 10:00:36 -0600 |
commit | 1fffbdafa12271a1a635caf46777fb8acfb6f31b (patch) | |
tree | 707785bd058e254fd865ca30ed35f37f206aebbc /klinkstatus/src/engine/searchmanager.cpp | |
parent | 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076 (diff) | |
download | tdewebdev-1fffbdafa12271a1a635caf46777fb8acfb6f31b.tar.gz tdewebdev-1fffbdafa12271a1a635caf46777fb8acfb6f31b.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076.
Diffstat (limited to 'klinkstatus/src/engine/searchmanager.cpp')
-rw-r--r-- | klinkstatus/src/engine/searchmanager.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/klinkstatus/src/engine/searchmanager.cpp b/klinkstatus/src/engine/searchmanager.cpp index 591b3acd..6ca04b3a 100644 --- a/klinkstatus/src/engine/searchmanager.cpp +++ b/klinkstatus/src/engine/searchmanager.cpp @@ -191,8 +191,8 @@ void SearchManager::checkRoot() LinkChecker* checker = new LinkChecker(&root_, time_out_, this, "link_checker"); checker->setSearchManager(this); - connect(checker, TQT_SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)), - this, TQT_SLOT(slotRootChecked(const LinkStatus *, LinkChecker *))); + connect(checker, TQT_SIGNAL(transactionFinished(const LinktqStatus *, LinkChecker *)), + this, TQT_SLOT(slotRootChecked(const LinktqStatus *, LinkChecker *))); /* connect(checker, TQT_SIGNAL(jobFinnished(LinkChecker *)), this, TQT_SLOT(slotLinkCheckerFinnished(LinkChecker *))); @@ -200,11 +200,11 @@ void SearchManager::checkRoot() checker->check(); } -void SearchManager::slotRootChecked(const LinkStatus * link, LinkChecker * checker) +void SearchManager::slotRootChecked(const LinktqStatus * link, LinkChecker * checker) { kdDebug(23100) << "SearchManager::slotRootChecked:" << endl; kdDebug(23100) << link->absoluteUrl().url() << " -> " << - LinkStatus::lastRedirection(&root_)->absoluteUrl().url() << endl; + LinktqStatus::lastRedirection(&root_)->absoluteUrl().url() << endl; Q_ASSERT(checked_links_ == 0); Q_ASSERT(search_results_.size() == 0); @@ -217,11 +217,11 @@ void SearchManager::slotRootChecked(const LinkStatus * link, LinkChecker * check { current_depth_ = 1; - vector<LinkStatus*> no = children(LinkStatus::lastRedirection(&root_)); + vector<LinktqStatus*> no = tqchildren(LinktqStatus::lastRedirection(&root_)); emit signalLinksToCheckTotalSteps(no.size()); - vector< vector<LinkStatus*> > nivel; + vector< vector<LinktqStatus*> > nivel; nivel.push_back(no); search_results_.push_back(nivel); @@ -255,14 +255,14 @@ void SearchManager::slotRootChecked(const LinkStatus * link, LinkChecker * check checker = 0; } -vector<LinkStatus*> SearchManager::children(LinkStatus* link) +vector<LinktqStatus*> SearchManager::tqchildren(LinktqStatus* link) { - vector<LinkStatus*> children; + vector<LinktqStatus*> tqchildren; if(!link || link->absoluteUrl().hasRef()) - return children; + return tqchildren; - vector<Node*> const& nodes = link->childrenNodes(); + vector<Node*> const& nodes = link->tqchildrenNodes(); int count = 0; for(uint i = 0; i != nodes.size(); ++i) @@ -278,12 +278,12 @@ vector<LinkStatus*> SearchManager::children(LinkStatus* link) if( (node->isLink() && checkable(url, *link) && - !Url::existUrl(url, children) && + !Url::existUrl(url, tqchildren) && !node->url().isEmpty()) || node->malformed() ) { - LinkStatus* ls = new LinkStatus(node, link); + LinktqStatus* ls = new LinktqStatus(node, link); ls->setAbsoluteUrl(url); if(localDomain(ls->absoluteUrl())) @@ -310,7 +310,7 @@ vector<LinkStatus*> SearchManager::children(LinkStatus* link) } Q_ASSERT(link->externalDomainDepth() <= external_domain_depth_); - children.push_back(ls); + tqchildren.push_back(ls); } if(count == 50) { @@ -319,7 +319,7 @@ vector<LinkStatus*> SearchManager::children(LinkStatus* link) } } - return children; + return tqchildren; } bool SearchManager::existUrl(KURL const& url, KURL const& url_parent) const @@ -331,7 +331,7 @@ bool SearchManager::existUrl(KURL const& url, KURL const& url_parent) const for(uint j = 0; j != search_results_[i].size(); ++j) for(uint l = 0; l != (search_results_[i])[j].size(); ++l) { - LinkStatus* tmp = search_results_[i][j][l]; + LinktqStatus* tmp = search_results_[i][j][l]; Q_ASSERT(tmp); if(tmp->absoluteUrl() == url) { // URL exists @@ -352,7 +352,7 @@ bool SearchManager::existUrl(KURL const& url, KURL const& url_parent) const return false; } -LinkStatus const* SearchManager::linkStatus(TQString const& s_url) const +LinktqStatus const* SearchManager::linktqStatus(TQString const& s_url) const { Q_ASSERT(!s_url.isEmpty()); @@ -366,7 +366,7 @@ LinkStatus const* SearchManager::linkStatus(TQString const& s_url) const { ++count; - LinkStatus* ls = search_results_[i][j][l]; + LinktqStatus* ls = search_results_[i][j][l]; Q_ASSERT(ls); if(ls->absoluteUrl().url() == s_url && ls->checked()) return ls; @@ -402,7 +402,7 @@ void SearchManager::continueSearch() { Q_ASSERT(!links_being_checked_); - vector<LinkStatus*> const& no = nodeToAnalize(); + vector<LinktqStatus*> const& no = nodeToAnalize(); if((uint)current_index_ < no.size()) checkVectorLinks(no); @@ -442,7 +442,7 @@ void SearchManager::continueSearch() } } -vector<LinkStatus*> const& SearchManager::nodeToAnalize() const +vector<LinktqStatus*> const& SearchManager::nodeToAnalize() const { Q_ASSERT( (uint)current_depth_ == search_results_.size() ); Q_ASSERT( (uint)current_node_ < (search_results_[current_depth_ - 1]).size() ); @@ -450,14 +450,14 @@ vector<LinkStatus*> const& SearchManager::nodeToAnalize() const return (search_results_[current_depth_ - 1])[current_node_]; } -void SearchManager::checkVectorLinks(vector<LinkStatus*> const& links) +void SearchManager::checkVectorLinks(vector<LinktqStatus*> const& links) { checkLinksSimultaneously(chooseLinks(links)); } -vector<LinkStatus*> SearchManager::chooseLinks(vector<LinkStatus*> const& links) +vector<LinktqStatus*> SearchManager::chooseLinks(vector<LinktqStatus*> const& links) { - vector<LinkStatus*> escolha; + vector<LinktqStatus*> escolha; for(int i = 0; i != max_simultaneous_connections_; ++i) { if((uint)current_index_ < links.size()) @@ -466,7 +466,7 @@ vector<LinkStatus*> SearchManager::chooseLinks(vector<LinkStatus*> const& links) return escolha; } -void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) +void SearchManager::checkLinksSimultaneously(vector<LinktqStatus*> const& links) { Q_ASSERT(finished_connections_ <= max_simultaneous_connections_); finished_connections_ = 0; @@ -480,7 +480,7 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) for(uint i = 0; i != links.size(); ++i) { - LinkStatus* ls(links[i]); + LinktqStatus* ls(links[i]); Q_ASSERT(ls); TQString protocol = ls->absoluteUrl().protocol(); @@ -491,7 +491,7 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) if(ls->malformed()) { Q_ASSERT(ls->errorOccurred()); - Q_ASSERT(ls->status() == LinkStatus::MALFORMED); + Q_ASSERT(ls->status() == LinktqStatus::MALFORMED); ls->setChecked(true); slotLinkChecked(ls, 0); @@ -503,7 +503,7 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) ls->setIgnored(true); ls->setErrorOccurred(true); ls->setError(i18n( "Javascript not supported" )); - ls->setStatus(LinkStatus::NOT_SUPPORTED); + ls->settqStatus(LinktqStatus::NOT_SUPPORTED); ls->setChecked(true); slotLinkChecked(ls, 0); } @@ -513,8 +513,8 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) ++ignored_links_; ls->setIgnored(true); ls->setErrorOccurred(true); - ls->setError(i18n("Protocol %1 not supported").arg(protocol)); - ls->setStatus(LinkStatus::MALFORMED); + ls->setError(i18n("Protocol %1 not supported").tqarg(protocol)); + ls->settqStatus(LinktqStatus::MALFORMED); ls->setChecked(true); slotLinkChecked(ls, 0); } @@ -524,8 +524,8 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) LinkChecker* checker = new LinkChecker(ls, time_out_, this, "link_checker"); checker->setSearchManager(this); - connect(checker, TQT_SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)), - this, TQT_SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *))); + connect(checker, TQT_SIGNAL(transactionFinished(const LinktqStatus *, LinkChecker *)), + this, TQT_SLOT(slotLinkChecked(const LinktqStatus *, LinkChecker *))); /* connect(checker, TQT_SIGNAL(jobFinnished(LinkChecker *)), this, TQT_SLOT(slotLinkCheckerFinnished(LinkChecker *))); @@ -535,11 +535,11 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) } } -void SearchManager::slotLinkChecked(const LinkStatus * link, LinkChecker * checker) +void SearchManager::slotLinkChecked(const LinktqStatus * link, LinkChecker * checker) { kdDebug(23100) << "SearchManager::slotLinkChecked:" << endl; // kdDebug(23100) << link->absoluteUrl().url() << " -> " << -// LinkStatus::lastRedirection((const_cast<LinkStatus*> (link)))->absoluteUrl().url() << endl; +// LinktqStatus::lastRedirection((const_cast<LinktqStatus*> (link)))->absoluteUrl().url() << endl; Q_ASSERT(link); emit signalLinkChecked(link, checker); @@ -569,8 +569,8 @@ void SearchManager::slotLinkChecked(const LinkStatus * link, LinkChecker * check void SearchManager::addLevel() { - search_results_.push_back(vector< vector <LinkStatus*> >()); - vector< vector <LinkStatus*> >& ultimo_nivel(search_results_[search_results_.size() - 2]); + search_results_.push_back(vector< vector <LinktqStatus*> >()); + vector< vector <LinktqStatus*> >& ultimo_nivel(search_results_[search_results_.size() - 2]); number_of_level_links_ = 0; number_of_links_to_check_ = 0; @@ -591,7 +591,7 @@ void SearchManager::addLevel() uint end_sub1 = ultimo_nivel[i].size(); for(uint j = 0; j != end_sub1; ++j) // links { - vector <LinkStatus*> f(children( LinkStatus::lastRedirection(((ultimo_nivel[i])[j])) )); + vector <LinktqStatus*> f(tqchildren( LinktqStatus::lastRedirection(((ultimo_nivel[i])[j])) )); if(f.size() != 0) { search_results_[search_results_.size() - 1].push_back(f); @@ -608,7 +608,7 @@ void SearchManager::addLevel() emit signalLinksToCheckTotalSteps(number_of_links_to_check_); } -bool SearchManager::checkable(KURL const& url, LinkStatus const& link_parent) const +bool SearchManager::checkable(KURL const& url, LinktqStatus const& link_parent) const { if(existUrl(url, link_parent.absoluteUrl())) return false; @@ -638,7 +638,7 @@ bool SearchManager::checkable(KURL const& url, LinkStatus const& link_parent) co return true; } -bool SearchManager::checkableByDomain(KURL const& url, LinkStatus const& link_parent) const +bool SearchManager::checkableByDomain(KURL const& url, LinktqStatus const& link_parent) const { bool result = false; if(localDomain(url)) @@ -781,7 +781,7 @@ bool SearchManager::generalDomain() const } } -bool SearchManager::onlyCheckHeader(LinkStatus* ls) const +bool SearchManager::onlyCheckHeader(LinktqStatus* ls) const { if(search_mode_ == depth) return current_depth_ == depth_; @@ -805,7 +805,7 @@ void SearchManager::slotLinkCheckerFinnished(LinkChecker * checker) kdDebug(23100) << "deleting linkchecker" << endl; Q_ASSERT(checker); - //Q_ASSERT(checker->linkStatus()->checked()); + //Q_ASSERT(checker->linktqStatus()->checked()); delete checker; checker = 0; @@ -891,7 +891,7 @@ void SearchManager::save(TQDomElement& element) const { for(uint l = 0; l != (search_results_[i])[j].size(); ++l) { - LinkStatus* ls = ((search_results_[i])[j])[l]; + LinktqStatus* ls = ((search_results_[i])[j])[l]; if(ls->checked()) ls->save(child_element); } |