diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:54:04 +0000 |
commit | dc6b8e72fed2586239e3514819238c520636c9d9 (patch) | |
tree | 88b200df0a0b7fab9d6f147596173556f1ed9a13 /klinkstatus/src/engine/searchmanager.cpp | |
parent | 6927d4436e54551917f600b706a8d6109e49de1c (diff) | |
download | tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klinkstatus/src/engine/searchmanager.cpp')
-rw-r--r-- | klinkstatus/src/engine/searchmanager.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/klinkstatus/src/engine/searchmanager.cpp b/klinkstatus/src/engine/searchmanager.cpp index 81562a7a..c64c3a89 100644 --- a/klinkstatus/src/engine/searchmanager.cpp +++ b/klinkstatus/src/engine/searchmanager.cpp @@ -24,9 +24,9 @@ #include <khtml_part.h> #include <kprotocolmanager.h> -#include <qstring.h> -#include <qvaluevector.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqvaluevector.h> +#include <tqdom.h> #include <iostream> #include <unistd.h> @@ -37,8 +37,8 @@ SearchManager::SearchManager(int max_simultaneous_connections, int time_out, - QObject *parent, const char *name) - : QObject(parent, name), + TQObject *parent, const char *name) + : TQObject(parent, name), max_simultaneous_connections_(max_simultaneous_connections), has_document_root_(false), depth_(-1), current_depth_(0), external_domain_depth_(0), current_node_(0), current_index_(0), links_being_checked_(0), @@ -148,7 +148,7 @@ void SearchManager::startSearch(KURL const& root, SearchMode const& modo) searching_ = true; - //Q_ASSERT(domain_ != QString::null); + //Q_ASSERT(domain_ != TQString::null); checkRoot(); } @@ -191,11 +191,11 @@ void SearchManager::checkRoot() LinkChecker* checker = new LinkChecker(&root_, time_out_, this, "link_checker"); checker->setSearchManager(this); - connect(checker, SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)), - this, SLOT(slotRootChecked(const LinkStatus *, LinkChecker *))); + connect(checker, TQT_SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)), + this, TQT_SLOT(slotRootChecked(const LinkStatus *, LinkChecker *))); /* - connect(checker, SIGNAL(jobFinnished(LinkChecker *)), - this, SLOT(slotLinkCheckerFinnished(LinkChecker *))); + connect(checker, TQT_SIGNAL(jobFinnished(LinkChecker *)), + this, TQT_SLOT(slotLinkCheckerFinnished(LinkChecker *))); */ checker->check(); } @@ -335,7 +335,7 @@ bool SearchManager::existUrl(KURL const& url, KURL const& url_parent) const Q_ASSERT(tmp); if(tmp->absoluteUrl() == url) { // URL exists - QValueVector<KURL> referrers(tmp->referrers()); + TQValueVector<KURL> referrers(tmp->referrers()); // Add new referrer for(uint i = 0; i != referrers.size(); ++i) @@ -352,7 +352,7 @@ bool SearchManager::existUrl(KURL const& url, KURL const& url_parent) const return false; } -LinkStatus const* SearchManager::linkStatus(QString const& s_url) const +LinkStatus const* SearchManager::linkStatus(TQString const& s_url) const { Q_ASSERT(!s_url.isEmpty()); @@ -483,7 +483,7 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) LinkStatus* ls(links[i]); Q_ASSERT(ls); - QString protocol = ls->absoluteUrl().protocol(); + TQString protocol = ls->absoluteUrl().protocol(); ++links_being_checked_; Q_ASSERT(links_being_checked_ <= max_simultaneous_connections_); @@ -524,11 +524,11 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) LinkChecker* checker = new LinkChecker(ls, time_out_, this, "link_checker"); checker->setSearchManager(this); - connect(checker, SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)), - this, SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *))); + connect(checker, TQT_SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)), + this, TQT_SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *))); /* - connect(checker, SIGNAL(jobFinnished(LinkChecker *)), - this, SLOT(slotLinkCheckerFinnished(LinkChecker *))); + connect(checker, TQT_SIGNAL(jobFinnished(LinkChecker *)), + this, TQT_SLOT(slotLinkCheckerFinnished(LinkChecker *))); */ checker->check(); } @@ -669,8 +669,8 @@ bool SearchManager::localDomain(KURL const& url) const } else { - vector<QString> referencia = tokenizeWordsSeparatedBy(domain_, QChar('/')); - vector<QString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), QChar('/')); + vector<TQString> referencia = tokenizeWordsSeparatedBy(domain_, TQChar('/')); + vector<TQString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), TQChar('/')); if(a_comparar.size() < referencia.size()) return false; @@ -713,8 +713,8 @@ bool SearchManager::isLocalRestrict(KURL const& url) const if(url_root.hasHost()) { - vector<QString> referencia = tokenizeWordsSeparatedBy(domain_, QChar('/')); - vector<QString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), QChar('/')); + vector<TQString> referencia = tokenizeWordsSeparatedBy(domain_, TQChar('/')); + vector<TQString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), TQChar('/')); if(a_comparar.size() < referencia.size()) return false; @@ -757,10 +757,10 @@ bool SearchManager::generalDomain() const } else { - vector<QString> palavras = tokenizeWordsSeparatedByDots(domain_); + vector<TQString> palavras = tokenizeWordsSeparatedByDots(domain_); Q_ASSERT(palavras.size() >= 1); // host might be localhost - QString primeira_palavra = palavras[0]; + TQString primeira_palavra = palavras[0]; if(primeira_palavra == "www") { Q_ASSERT(palavras.size() >= 3); @@ -811,7 +811,7 @@ void SearchManager::slotLinkCheckerFinnished(LinkChecker * checker) checker = 0; } -KHTMLPart* SearchManager::htmlPart(QString const& key_url) const +KHTMLPart* SearchManager::htmlPart(TQString const& key_url) const { if(!html_parts_.contains(key_url)) return 0; @@ -819,7 +819,7 @@ KHTMLPart* SearchManager::htmlPart(QString const& key_url) const return html_parts_[key_url]; } -void SearchManager::addHtmlPart(QString const& key_url, KHTMLPart* html_part) +void SearchManager::addHtmlPart(TQString const& key_url, KHTMLPart* html_part) { Q_ASSERT(!key_url.isEmpty()); Q_ASSERT(html_part); @@ -843,10 +843,10 @@ void SearchManager::removeHtmlParts() html_parts_.clear(); } -void SearchManager::save(QDomElement& element) const +void SearchManager::save(TQDomElement& element) const { // <url> - QDomElement child_element = element.ownerDocument().createElement("url"); + TQDomElement child_element = element.ownerDocument().createElement("url"); child_element.appendChild(element.ownerDocument().createTextNode(root_.absoluteUrl().prettyURL())); element.appendChild(child_element); @@ -859,7 +859,7 @@ void SearchManager::save(QDomElement& element) const // <depth> child_element = element.ownerDocument().createElement("depth"); child_element.appendChild(element.ownerDocument(). - createTextNode(searchMode() == domain ? QString("Unlimited") : QString::number(depth_))); + createTextNode(searchMode() == domain ? TQString("Unlimited") : TQString::number(depth_))); element.appendChild(child_element); // <check_parent_folders> @@ -899,13 +899,13 @@ void SearchManager::save(QDomElement& element) const } } -QString SearchManager::toXML() const +TQString SearchManager::toXML() const { - QDomDocument doc; + TQDomDocument doc; doc.appendChild(doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"")); - QDomElement root = doc.createElement("klinkstatus"); + TQDomElement root = doc.createElement("klinkstatus"); doc.appendChild(root); save(root); |