diff options
Diffstat (limited to 'klinkstatus/src/engine/linkstatus.cpp')
-rw-r--r-- | klinkstatus/src/engine/linkstatus.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/klinkstatus/src/engine/linkstatus.cpp b/klinkstatus/src/engine/linkstatus.cpp index e41bba75..bf5986f5 100644 --- a/klinkstatus/src/engine/linkstatus.cpp +++ b/klinkstatus/src/engine/linkstatus.cpp @@ -28,20 +28,20 @@ #include <tqdom.h> -LinktqStatus::~LinktqStatus() +LinkStatus::~LinkStatus() { //kdDebug(23100) << "|"; - for(uint i = 0; i != tqchildren_nodes_.size(); ++i) + for(uint i = 0; i != children_nodes_.size(); ++i) { - if(tqchildren_nodes_[i]) + if(children_nodes_[i]) { - delete tqchildren_nodes_[i]; - tqchildren_nodes_[i] = 0; + delete children_nodes_[i]; + children_nodes_[i] = 0; } } - tqchildren_nodes_.clear(); + children_nodes_.clear(); if(isRedirection()) { @@ -53,7 +53,7 @@ LinktqStatus::~LinktqStatus() } } -void LinktqStatus::reset() +void LinkStatus::reset() { depth_ = -1; external_domain_depth_ = -1; @@ -71,16 +71,16 @@ void LinktqStatus::reset() http_header_ = HttpResponseHeader(); error_ = ""; - for(uint i = 0; i != tqchildren_nodes_.size(); ++i) + for(uint i = 0; i != children_nodes_.size(); ++i) { - if(tqchildren_nodes_[i]) + if(children_nodes_[i]) { - delete tqchildren_nodes_[i]; - tqchildren_nodes_[i] = 0; + delete children_nodes_[i]; + children_nodes_[i] = 0; } } - tqchildren_nodes_.clear(); + children_nodes_.clear(); if(isRedirection()) { @@ -94,27 +94,27 @@ void LinktqStatus::reset() base_URI_ = ""; } -TQString const LinktqStatus::toString() const +TQString const LinkStatus::toString() const { TQString aux; if(!is_root_) { Q_ASSERT(parent_); - aux += i18n( "Parent: %1" ).tqarg( parent()->absoluteUrl().prettyURL() ) + "\n"; + aux += i18n( "Parent: %1" ).arg( parent()->absoluteUrl().prettyURL() ) + "\n"; } Q_ASSERT(!original_url_.isNull()); - aux += i18n( "URL: %1" ).tqarg( absoluteUrl().prettyURL() ) + "\n"; - aux += i18n( "Original URL: %1" ).tqarg( originalUrl() ) + "\n"; + aux += i18n( "URL: %1" ).arg( absoluteUrl().prettyURL() ) + "\n"; + aux += i18n( "Original URL: %1" ).arg( originalUrl() ) + "\n"; if(node()) - aux += i18n( "Node: %1" ).tqarg( node()->content() ) + "\n"; + aux += i18n( "Node: %1" ).arg( node()->content() ) + "\n"; return aux; } -LinktqStatus* LinktqStatus::lastRedirection(LinktqStatus* ls) +LinkStatus* LinkStatus::lastRedirection(LinkStatus* ls) { if(ls->isRedirection()) if(ls->redirection()) @@ -125,7 +125,7 @@ LinktqStatus* LinktqStatus::lastRedirection(LinktqStatus* ls) return ls; } -void LinktqStatus::loadNode() +void LinkStatus::loadNode() { Q_ASSERT(node_); @@ -136,32 +136,32 @@ void LinktqStatus::loadNode() { setErrorOccurred(true); setError(i18n( "Malformed" )); - settqStatus(LinktqStatus::MALFORMED); + setStatus(LinkStatus::MALFORMED); kdDebug(23100) << "Malformed:" << endl; kdDebug(23100) << "Node: " << node()->content() << endl; //kdDebug(23100) << toString() << endl; // probable segfault } } -bool LinktqStatus::malformed() const // don't inline please (#include "node.h") +bool LinkStatus::malformed() const // don't inline please (#include "node.h") { return (malformed_ || node_->malformed()); } -void LinktqStatus::setChildrenNodes(vector<Node*> const& nodes) // don't inline please (#include "node.h") +void LinkStatus::setChildrenNodes(vector<Node*> const& nodes) // don't inline please (#include "node.h") { - tqchildren_nodes_.reserve(nodes.size()); - tqchildren_nodes_ = nodes; + children_nodes_.reserve(nodes.size()); + children_nodes_ = nodes; } -void LinktqStatus::setMalformed(bool flag) +void LinkStatus::setMalformed(bool flag) { malformed_ = flag; if(flag) { setErrorOccurred(true); setError(i18n( "Malformed" )); - settqStatus(LinktqStatus::MALFORMED); + setStatus(LinkStatus::MALFORMED); kdDebug(23100) << "Malformed!" << endl; kdDebug(23100) << node()->content() << endl; //kdDebug(23100) << toString() << endl; // probable segfault @@ -170,11 +170,11 @@ void LinktqStatus::setMalformed(bool flag) { setErrorOccurred(false); setError(""); - settqStatus(LinktqStatus::UNDETERMINED); + setStatus(LinkStatus::UNDETERMINED); } } -void LinktqStatus::save(TQDomElement& element) const +void LinkStatus::save(TQDomElement& element) const { TQDomElement child_element = element.ownerDocument().createElement("link"); @@ -186,7 +186,7 @@ void LinktqStatus::save(TQDomElement& element) const // <status> tmp_1 = element.ownerDocument().createElement("status"); tmp_1.setAttribute("broken", - ResultView::displayableWithtqStatus(this, ResultView::bad) ? + ResultView::displayableWithStatus(this, ResultView::bad) ? "true" : "false"); tmp_1.appendChild(element.ownerDocument().createTextNode(statusText())); child_element.appendChild(tmp_1); |