summaryrefslogtreecommitdiffstats
path: root/klinkstatus/src/engine/searchmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'klinkstatus/src/engine/searchmanager.cpp')
-rw-r--r--klinkstatus/src/engine/searchmanager.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/klinkstatus/src/engine/searchmanager.cpp b/klinkstatus/src/engine/searchmanager.cpp
index 6ca04b3a..591b3acd 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 LinktqStatus *, LinkChecker *)),
- this, TQT_SLOT(slotRootChecked(const LinktqStatus *, LinkChecker *)));
+ connect(checker, TQT_SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)),
+ this, TQT_SLOT(slotRootChecked(const LinkStatus *, 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 LinktqStatus * link, LinkChecker * checker)
+void SearchManager::slotRootChecked(const LinkStatus * link, LinkChecker * checker)
{
kdDebug(23100) << "SearchManager::slotRootChecked:" << endl;
kdDebug(23100) << link->absoluteUrl().url() << " -> " <<
- LinktqStatus::lastRedirection(&root_)->absoluteUrl().url() << endl;
+ LinkStatus::lastRedirection(&root_)->absoluteUrl().url() << endl;
Q_ASSERT(checked_links_ == 0);
Q_ASSERT(search_results_.size() == 0);
@@ -217,11 +217,11 @@ void SearchManager::slotRootChecked(const LinktqStatus * link, LinkChecker * che
{
current_depth_ = 1;
- vector<LinktqStatus*> no = tqchildren(LinktqStatus::lastRedirection(&root_));
+ vector<LinkStatus*> no = children(LinkStatus::lastRedirection(&root_));
emit signalLinksToCheckTotalSteps(no.size());
- vector< vector<LinktqStatus*> > nivel;
+ vector< vector<LinkStatus*> > nivel;
nivel.push_back(no);
search_results_.push_back(nivel);
@@ -255,14 +255,14 @@ void SearchManager::slotRootChecked(const LinktqStatus * link, LinkChecker * che
checker = 0;
}
-vector<LinktqStatus*> SearchManager::tqchildren(LinktqStatus* link)
+vector<LinkStatus*> SearchManager::children(LinkStatus* link)
{
- vector<LinktqStatus*> tqchildren;
+ vector<LinkStatus*> children;
if(!link || link->absoluteUrl().hasRef())
- return tqchildren;
+ return children;
- vector<Node*> const& nodes = link->tqchildrenNodes();
+ vector<Node*> const& nodes = link->childrenNodes();
int count = 0;
for(uint i = 0; i != nodes.size(); ++i)
@@ -278,12 +278,12 @@ vector<LinktqStatus*> SearchManager::tqchildren(LinktqStatus* link)
if( (node->isLink() &&
checkable(url, *link) &&
- !Url::existUrl(url, tqchildren) &&
+ !Url::existUrl(url, children) &&
!node->url().isEmpty())
||
node->malformed() )
{
- LinktqStatus* ls = new LinktqStatus(node, link);
+ LinkStatus* ls = new LinkStatus(node, link);
ls->setAbsoluteUrl(url);
if(localDomain(ls->absoluteUrl()))
@@ -310,7 +310,7 @@ vector<LinktqStatus*> SearchManager::tqchildren(LinktqStatus* link)
}
Q_ASSERT(link->externalDomainDepth() <= external_domain_depth_);
- tqchildren.push_back(ls);
+ children.push_back(ls);
}
if(count == 50)
{
@@ -319,7 +319,7 @@ vector<LinktqStatus*> SearchManager::tqchildren(LinktqStatus* link)
}
}
- return tqchildren;
+ return children;
}
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)
{
- LinktqStatus* tmp = search_results_[i][j][l];
+ LinkStatus* 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;
}
-LinktqStatus const* SearchManager::linktqStatus(TQString const& s_url) const
+LinkStatus const* SearchManager::linkStatus(TQString const& s_url) const
{
Q_ASSERT(!s_url.isEmpty());
@@ -366,7 +366,7 @@ LinktqStatus const* SearchManager::linktqStatus(TQString const& s_url) const
{
++count;
- LinktqStatus* ls = search_results_[i][j][l];
+ LinkStatus* 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<LinktqStatus*> const& no = nodeToAnalize();
+ vector<LinkStatus*> const& no = nodeToAnalize();
if((uint)current_index_ < no.size())
checkVectorLinks(no);
@@ -442,7 +442,7 @@ void SearchManager::continueSearch()
}
}
-vector<LinktqStatus*> const& SearchManager::nodeToAnalize() const
+vector<LinkStatus*> 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<LinktqStatus*> const& SearchManager::nodeToAnalize() const
return (search_results_[current_depth_ - 1])[current_node_];
}
-void SearchManager::checkVectorLinks(vector<LinktqStatus*> const& links)
+void SearchManager::checkVectorLinks(vector<LinkStatus*> const& links)
{
checkLinksSimultaneously(chooseLinks(links));
}
-vector<LinktqStatus*> SearchManager::chooseLinks(vector<LinktqStatus*> const& links)
+vector<LinkStatus*> SearchManager::chooseLinks(vector<LinkStatus*> const& links)
{
- vector<LinktqStatus*> escolha;
+ vector<LinkStatus*> escolha;
for(int i = 0; i != max_simultaneous_connections_; ++i)
{
if((uint)current_index_ < links.size())
@@ -466,7 +466,7 @@ vector<LinktqStatus*> SearchManager::chooseLinks(vector<LinktqStatus*> const& li
return escolha;
}
-void SearchManager::checkLinksSimultaneously(vector<LinktqStatus*> const& links)
+void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links)
{
Q_ASSERT(finished_connections_ <= max_simultaneous_connections_);
finished_connections_ = 0;
@@ -480,7 +480,7 @@ void SearchManager::checkLinksSimultaneously(vector<LinktqStatus*> const& links)
for(uint i = 0; i != links.size(); ++i)
{
- LinktqStatus* ls(links[i]);
+ LinkStatus* ls(links[i]);
Q_ASSERT(ls);
TQString protocol = ls->absoluteUrl().protocol();
@@ -491,7 +491,7 @@ void SearchManager::checkLinksSimultaneously(vector<LinktqStatus*> const& links)
if(ls->malformed())
{
Q_ASSERT(ls->errorOccurred());
- Q_ASSERT(ls->status() == LinktqStatus::MALFORMED);
+ Q_ASSERT(ls->status() == LinkStatus::MALFORMED);
ls->setChecked(true);
slotLinkChecked(ls, 0);
@@ -503,7 +503,7 @@ void SearchManager::checkLinksSimultaneously(vector<LinktqStatus*> const& links)
ls->setIgnored(true);
ls->setErrorOccurred(true);
ls->setError(i18n( "Javascript not supported" ));
- ls->settqStatus(LinktqStatus::NOT_SUPPORTED);
+ ls->setStatus(LinkStatus::NOT_SUPPORTED);
ls->setChecked(true);
slotLinkChecked(ls, 0);
}
@@ -513,8 +513,8 @@ void SearchManager::checkLinksSimultaneously(vector<LinktqStatus*> const& links)
++ignored_links_;
ls->setIgnored(true);
ls->setErrorOccurred(true);
- ls->setError(i18n("Protocol %1 not supported").tqarg(protocol));
- ls->settqStatus(LinktqStatus::MALFORMED);
+ ls->setError(i18n("Protocol %1 not supported").arg(protocol));
+ ls->setStatus(LinkStatus::MALFORMED);
ls->setChecked(true);
slotLinkChecked(ls, 0);
}
@@ -524,8 +524,8 @@ void SearchManager::checkLinksSimultaneously(vector<LinktqStatus*> const& links)
LinkChecker* checker = new LinkChecker(ls, time_out_, this, "link_checker");
checker->setSearchManager(this);
- connect(checker, TQT_SIGNAL(transactionFinished(const LinktqStatus *, LinkChecker *)),
- this, TQT_SLOT(slotLinkChecked(const LinktqStatus *, LinkChecker *)));
+ connect(checker, TQT_SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)),
+ this, TQT_SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *)));
/*
connect(checker, TQT_SIGNAL(jobFinnished(LinkChecker *)),
this, TQT_SLOT(slotLinkCheckerFinnished(LinkChecker *)));
@@ -535,11 +535,11 @@ void SearchManager::checkLinksSimultaneously(vector<LinktqStatus*> const& links)
}
}
-void SearchManager::slotLinkChecked(const LinktqStatus * link, LinkChecker * checker)
+void SearchManager::slotLinkChecked(const LinkStatus * link, LinkChecker * checker)
{
kdDebug(23100) << "SearchManager::slotLinkChecked:" << endl;
// kdDebug(23100) << link->absoluteUrl().url() << " -> " <<
-// LinktqStatus::lastRedirection((const_cast<LinktqStatus*> (link)))->absoluteUrl().url() << endl;
+// LinkStatus::lastRedirection((const_cast<LinkStatus*> (link)))->absoluteUrl().url() << endl;
Q_ASSERT(link);
emit signalLinkChecked(link, checker);
@@ -569,8 +569,8 @@ void SearchManager::slotLinkChecked(const LinktqStatus * link, LinkChecker * che
void SearchManager::addLevel()
{
- search_results_.push_back(vector< vector <LinktqStatus*> >());
- vector< vector <LinktqStatus*> >& ultimo_nivel(search_results_[search_results_.size() - 2]);
+ search_results_.push_back(vector< vector <LinkStatus*> >());
+ vector< vector <LinkStatus*> >& 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 <LinktqStatus*> f(tqchildren( LinktqStatus::lastRedirection(((ultimo_nivel[i])[j])) ));
+ vector <LinkStatus*> f(children( LinkStatus::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, LinktqStatus const& link_parent) const
+bool SearchManager::checkable(KURL const& url, LinkStatus const& link_parent) const
{
if(existUrl(url, link_parent.absoluteUrl()))
return false;
@@ -638,7 +638,7 @@ bool SearchManager::checkable(KURL const& url, LinktqStatus const& link_parent)
return true;
}
-bool SearchManager::checkableByDomain(KURL const& url, LinktqStatus const& link_parent) const
+bool SearchManager::checkableByDomain(KURL const& url, LinkStatus const& link_parent) const
{
bool result = false;
if(localDomain(url))
@@ -781,7 +781,7 @@ bool SearchManager::generalDomain() const
}
}
-bool SearchManager::onlyCheckHeader(LinktqStatus* ls) const
+bool SearchManager::onlyCheckHeader(LinkStatus* 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->linktqStatus()->checked());
+ //Q_ASSERT(checker->linkStatus()->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)
{
- LinktqStatus* ls = ((search_results_[i])[j])[l];
+ LinkStatus* ls = ((search_results_[i])[j])[l];
if(ls->checked())
ls->save(child_element);
}