summaryrefslogtreecommitdiffstats
path: root/klinkstatus/src/engine
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /klinkstatus/src/engine
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-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')
-rw-r--r--klinkstatus/src/engine/linkchecker.cpp60
-rw-r--r--klinkstatus/src/engine/linkchecker.h20
-rw-r--r--klinkstatus/src/engine/linkfilter.cpp2
-rw-r--r--klinkstatus/src/engine/linkfilter.h8
-rw-r--r--klinkstatus/src/engine/linkstatus.cpp16
-rw-r--r--klinkstatus/src/engine/linkstatus.h56
-rw-r--r--klinkstatus/src/engine/linkstatus_impl.h32
-rw-r--r--klinkstatus/src/engine/searchmanager.cpp62
-rw-r--r--klinkstatus/src/engine/searchmanager.h40
-rw-r--r--klinkstatus/src/engine/searchmanager_impl.h10
10 files changed, 153 insertions, 153 deletions
diff --git a/klinkstatus/src/engine/linkchecker.cpp b/klinkstatus/src/engine/linkchecker.cpp
index bcc503ad..8186bda8 100644
--- a/klinkstatus/src/engine/linkchecker.cpp
+++ b/klinkstatus/src/engine/linkchecker.cpp
@@ -22,10 +22,10 @@
#include "../utils/utils.h"
#include "../parser/htmlparser.h"
-#include <qstring.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
+#include <tqcstring.h>
#include <kio/netaccess.h>
#include <kio/global.h>
@@ -44,8 +44,8 @@
int LinkChecker::count_ = 0;
LinkChecker::LinkChecker(LinkStatus* linkstatus, int time_out,
- QObject *parent, const char *name)
- : QObject(parent, name), search_manager_(0),
+ TQObject *parent, const char *name)
+ : TQObject(parent, name), search_manager_(0),
linkstatus_(linkstatus), t_job_(0), time_out_(time_out), checker_(0), document_charset_(),
redirection_(false), header_checked_(false), finnished_(false),
parsing_(false), is_charset_checked_(false), has_defined_charset_(false)
@@ -97,16 +97,16 @@ void LinkChecker::check()
t_job_->addMetaData("SendUserAgent", "false");
- QObject::connect(t_job_, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotData(KIO::Job *, const QByteArray &)));
- QObject::connect(t_job_, SIGNAL(mimetype(KIO::Job *, const QString &)),
- this, SLOT(slotMimetype(KIO::Job *, const QString &)));
- QObject::connect(t_job_, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotResult(KIO::Job *)));
- QObject::connect(t_job_, SIGNAL(redirection(KIO::Job *, const KURL &)),
- this, SLOT(slotRedirection(KIO::Job *, const KURL &)));
+ TQObject::connect(t_job_, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ TQObject::connect(t_job_, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)),
+ this, TQT_SLOT(slotMimetype(KIO::Job *, const TQString &)));
+ TQObject::connect(t_job_, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotResult(KIO::Job *)));
+ TQObject::connect(t_job_, TQT_SIGNAL(redirection(KIO::Job *, const KURL &)),
+ this, TQT_SLOT(slotRedirection(KIO::Job *, const KURL &)));
- QTimer::singleShot( time_out_ * 1000, this, SLOT(slotTimeOut()) );
+ TQTimer::singleShot( time_out_ * 1000, this, TQT_SLOT(slotTimeOut()) );
t_job_->setInteractive(false);
}
@@ -136,7 +136,7 @@ void LinkChecker::slotTimeOut()
}
}
-void LinkChecker::slotMimetype (KIO::Job* /*job*/, const QString &type)
+void LinkChecker::slotMimetype (KIO::Job* /*job*/, const TQString &type)
{
if(finnished_)
return;
@@ -196,7 +196,7 @@ void LinkChecker::slotMimetype (KIO::Job* /*job*/, const QString &type)
}
}
-void LinkChecker::slotData(KIO::Job* /*job*/, const QByteArray& data)
+void LinkChecker::slotData(KIO::Job* /*job*/, const TQByteArray& data)
{
if(finnished_)
return;
@@ -275,18 +275,18 @@ void LinkChecker::slotData(KIO::Job* /*job*/, const QByteArray& data)
if(!is_charset_checked_)
findDocumentCharset(data);
- QTextCodec* codec = 0;
+ TQTextCodec* codec = 0;
if(has_defined_charset_)
- codec = QTextCodec::codecForName(document_charset_);
+ codec = TQTextCodec::codecForName(document_charset_);
if(!codec)
- codec = QTextCodec::codecForName("iso8859-1"); // default
+ codec = TQTextCodec::codecForName("iso8859-1"); // default
doc_html_ += codec->toUnicode(data);
}
}
}
-void LinkChecker::findDocumentCharset(QString const& doc)
+void LinkChecker::findDocumentCharset(TQString const& doc)
{
Q_ASSERT(!is_charset_checked_);
@@ -513,7 +513,7 @@ HttpResponseHeader LinkChecker::getHttpHeader(KIO::Job* /*job*/, bool remember_c
Q_ASSERT(!finnished_);
Q_ASSERT(t_job_);
- QString header_string = t_job_->queryMetaData("HTTP-Headers");
+ TQString header_string = t_job_->queryMetaData("HTTP-Headers");
// Q_ASSERT(!header_string.isNull() && !header_string.isEmpty());
// kdDebug(23100) << "HTTP header: " << endl << header_string << endl;
// kdDebug(23100) << "Keys: " << HttpResponseHeader(header_string).keys() << endl;
@@ -537,7 +537,7 @@ void LinkChecker::checkRef()
KURL url(linkStatus()->absoluteUrl());
Q_ASSERT(url.hasRef());
- QString ref = url.ref();
+ TQString ref = url.ref();
if(ref == "" || ref == "top") {
linkstatus_->setStatusText("OK");
linkstatus_->setStatus(LinkStatus::SUCCESSFULL);
@@ -545,7 +545,7 @@ void LinkChecker::checkRef()
return;
}
- QString url_base;
+ TQString url_base;
LinkStatus const* ls_parent = 0;
int i_ref = -1;
@@ -576,7 +576,7 @@ void LinkChecker::checkRef(KURL const& url)
{
Q_ASSERT(search_manager_);
- QString url_string = url.url();
+ TQString url_string = url.url();
KHTMLPart* html_part = search_manager_->htmlPart(url_string);
if(!html_part)
{
@@ -585,10 +585,10 @@ void LinkChecker::checkRef(KURL const& url)
html_part = new KHTMLPart();
html_part->setOnlyLocalReferences(true);
- QString tmpFile;
+ TQString tmpFile;
if(KIO::NetAccess::download(url, tmpFile, 0))
{
- QString doc_html = FileManager::read(tmpFile);
+ TQString doc_html = FileManager::read(tmpFile);
html_part->begin();
html_part->write(doc_html);
html_part->end();
@@ -622,7 +622,7 @@ void LinkChecker::checkRef(LinkStatus const* linkstatus_parent)
{
Q_ASSERT(search_manager_);
- QString url_string = linkstatus_parent->absoluteUrl().url();
+ TQString url_string = linkstatus_parent->absoluteUrl().url();
KHTMLPart* html_part = search_manager_->htmlPart(url_string);
if(!html_part)
{
@@ -653,7 +653,7 @@ void LinkChecker::checkRef(LinkStatus const* linkstatus_parent)
finnish();
}
-bool LinkChecker::hasAnchor(KHTMLPart* html_part, QString const& anchor)
+bool LinkChecker::hasAnchor(KHTMLPart* html_part, TQString const& anchor)
{
DOM::HTMLDocument htmlDocument = html_part->htmlDocument();
DOM::HTMLCollection anchors = htmlDocument.anchors();
@@ -686,7 +686,7 @@ void LinkChecker::killJob()
LinkStatus::Status LinkChecker::getHttpStatus() const
{
- QString status_code = QString::number(linkstatus_->httpHeader().statusCode());
+ TQString status_code = TQString::number(linkstatus_->httpHeader().statusCode());
if(status_code[0] == '2')
return LinkStatus::SUCCESSFULL;
diff --git a/klinkstatus/src/engine/linkchecker.h b/klinkstatus/src/engine/linkchecker.h
index a992e5fd..168776d9 100644
--- a/klinkstatus/src/engine/linkchecker.h
+++ b/klinkstatus/src/engine/linkchecker.h
@@ -20,9 +20,9 @@
#ifndef LINKCHECKER_H
#define LINKCHECKER_H
-#include <qobject.h>
-#include <qthread.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqthread.h>
+#include <tqstring.h>
#include <kio/jobclasses.h>
class KHTMLPart;
@@ -42,7 +42,7 @@ class LinkChecker : public QObject
Q_OBJECT
public:
LinkChecker(LinkStatus* linkstatus, int time_out = 50,
- QObject *parent = 0, const char *name = 0);
+ TQObject *parent = 0, const char *name = 0);
~LinkChecker();
//virtual void run();
@@ -51,7 +51,7 @@ public:
LinkStatus const* linkStatus() const;
- static bool hasAnchor(KHTMLPart* html_part, QString const& anchor);
+ static bool hasAnchor(KHTMLPart* html_part, TQString const& anchor);
signals:
@@ -61,9 +61,9 @@ signals:
protected slots:
- void slotData(KIO::Job *, const QByteArray &data);
+ void slotData(KIO::Job *, const TQByteArray &data);
void slotRedirection (KIO::Job *, const KURL &url);
- void slotMimetype(KIO::Job *, const QString &type);
+ void slotMimetype(KIO::Job *, const TQString &type);
void slotResult(KIO::Job* job);
void slotTimeOut();
@@ -85,7 +85,7 @@ private:
*/
bool processRedirection(KURL const& url);
- void findDocumentCharset(QString const& data);
+ void findDocumentCharset(TQString const& data);
private:
@@ -94,12 +94,12 @@ private:
KIO::TransferJob* t_job_;
int time_out_;
LinkChecker* checker_;
- QString document_charset_;
+ TQString document_charset_;
/* A redirection has appened, with the current URL. Several redirections
can happen until the final URL is reached.*/
bool redirection_;
KURL redirection_url_;
- QString doc_html_;
+ TQString doc_html_;
bool header_checked_;
bool finnished_;
bool parsing_;
diff --git a/klinkstatus/src/engine/linkfilter.cpp b/klinkstatus/src/engine/linkfilter.cpp
index 4d15f2e6..1c7a3844 100644
--- a/klinkstatus/src/engine/linkfilter.cpp
+++ b/klinkstatus/src/engine/linkfilter.cpp
@@ -22,7 +22,7 @@
#include "linkstatus.h"
-LinkMatcher::LinkMatcher(QString const& text, ResultView::Status status)
+LinkMatcher::LinkMatcher(TQString const& text, ResultView::Status status)
: m_text(text), m_status(status)
{
}
diff --git a/klinkstatus/src/engine/linkfilter.h b/klinkstatus/src/engine/linkfilter.h
index 84da16cb..6d211aa6 100644
--- a/klinkstatus/src/engine/linkfilter.h
+++ b/klinkstatus/src/engine/linkfilter.h
@@ -28,13 +28,13 @@
class LinkMatcher
{
public:
- LinkMatcher(QString const& text, ResultView::Status status);
+ LinkMatcher(TQString const& text, ResultView::Status status);
~LinkMatcher();
bool matches(LinkStatus const& link) const;
- void setText(const QString& text) { m_text = text; }
- QString text() const { return m_text; }
+ void setText(const TQString& text) { m_text = text; }
+ TQString text() const { return m_text; }
void setStatus(ResultView::Status status) { m_status = status; }
ResultView::Status status() const { return m_status; }
@@ -42,7 +42,7 @@ public:
bool nullFilter() const { return m_text.isEmpty() && m_status == ResultView::none; }
private:
- QString m_text;
+ TQString m_text;
ResultView::Status m_status;
};
diff --git a/klinkstatus/src/engine/linkstatus.cpp b/klinkstatus/src/engine/linkstatus.cpp
index c8b359ed..58841a63 100644
--- a/klinkstatus/src/engine/linkstatus.cpp
+++ b/klinkstatus/src/engine/linkstatus.cpp
@@ -25,7 +25,7 @@
#include <klocale.h>
#include <kcharsets.h>
-#include <qdom.h>
+#include <tqdom.h>
LinkStatus::~LinkStatus()
@@ -94,9 +94,9 @@ void LinkStatus::reset()
base_URI_ = "";
}
-QString const LinkStatus::toString() const
+TQString const LinkStatus::toString() const
{
- QString aux;
+ TQString aux;
if(!is_root_)
{
@@ -174,12 +174,12 @@ void LinkStatus::setMalformed(bool flag)
}
}
-void LinkStatus::save(QDomElement& element) const
+void LinkStatus::save(TQDomElement& element) const
{
- QDomElement child_element = element.ownerDocument().createElement("link");
+ TQDomElement child_element = element.ownerDocument().createElement("link");
// <url>
- QDomElement tmp_1 = element.ownerDocument().createElement("url");
+ TQDomElement tmp_1 = element.ownerDocument().createElement("url");
tmp_1.appendChild(element.ownerDocument().createTextNode(absoluteUrl().prettyURL()));
child_element.appendChild(tmp_1);
@@ -199,9 +199,9 @@ void LinkStatus::save(QDomElement& element) const
// <referers>
tmp_1 = element.ownerDocument().createElement("referrers");
- for(QValueVector<KURL>::const_iterator it = referrers_.begin(); it != referrers_.end(); ++it)
+ for(TQValueVector<KURL>::const_iterator it = referrers_.begin(); it != referrers_.end(); ++it)
{
- QDomElement tmp_2 = element.ownerDocument().createElement("url");
+ TQDomElement tmp_2 = element.ownerDocument().createElement("url");
tmp_2.appendChild(element.ownerDocument().createTextNode(it->prettyURL()));
tmp_1.appendChild(tmp_2);
diff --git a/klinkstatus/src/engine/linkstatus.h b/klinkstatus/src/engine/linkstatus.h
index e7567460..6e924129 100644
--- a/klinkstatus/src/engine/linkstatus.h
+++ b/klinkstatus/src/engine/linkstatus.h
@@ -30,9 +30,9 @@
class TreeView;
class TreeViewItem;
-#include <qstring.h>
-#include <qobject.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
class QDomElement;
#include <vector>
@@ -64,20 +64,20 @@ public:
LinkStatus(Node* node, LinkStatus* parent);
~LinkStatus();
- void save(QDomElement& element) const;
+ void save(TQDomElement& element) const;
void reset();
void setRootUrl(KURL const& url);
void setStatus(Status status);
void setDepth(uint depth);
void setParent(LinkStatus* parent);
- void setOriginalUrl(QString const& url_original);
- void setLabel(QString const& label);
+ void setOriginalUrl(TQString const& url_original);
+ void setLabel(TQString const& label);
void setAbsoluteUrl(KURL const& url_absoluto);
- void setDocHtml(QString const& doc_html);
+ void setDocHtml(TQString const& doc_html);
void setHttpHeader(HttpResponseHeader const& cabecalho_http);
- void setStatusText(QString const& statusText); // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
- void setError(QString const& error);
+ void setStatusText(TQString const& statusText); // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
+ void setError(TQString const& error);
void setIsRoot(bool flag);
void setErrorOccurred(bool houve_error);
void setIsRedirection(bool e_redirection);
@@ -93,9 +93,9 @@ public:
void setHasBaseURI(bool flag = true);
void setHasHtmlDocTitle(bool flag = true);
void setBaseURI(KURL const& base_url);
- void setHtmlDocTitle(QString const& title);
+ void setHtmlDocTitle(TQString const& title);
void setIgnored(bool flag = true);
- void setMimeType(QString const& mimetype);
+ void setMimeType(TQString const& mimetype);
void setIsErrorPage(bool flag);
void setIsLocalRestrict(bool flag);
void setTreeViewItem(TreeViewItem* tree_view_item);
@@ -107,21 +107,21 @@ public:
bool local() const; // linkstatus.paradigma.co.pt == paradigma.co.pt
bool isLocalRestrict() const; // linkstatus.paradigma.co.pt != paradigma.co.pt
LinkStatus const* parent() const;
- QString const& originalUrl() const;
- QString const& label() const;
+ TQString const& originalUrl() const;
+ TQString const& label() const;
KURL const& absoluteUrl() const;
- QString const& docHtml() const;
+ TQString const& docHtml() const;
HttpResponseHeader const& httpHeader() const;
HttpResponseHeader& httpHeader();
- QString statusText() const; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
- QString const& error() const;
+ TQString statusText() const; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
+ TQString const& error() const;
bool isRoot() const;
bool errorOccurred() const;
bool isRedirection() const;
LinkStatus* redirection() const;
Node* node() const;
vector<Node*> const& childrenNodes() const;
- QString const toString() const;
+ TQString const toString() const;
bool checked() const;
int externalDomainDepth() const;
bool onlyCheckHeader() const;
@@ -129,13 +129,13 @@ public:
bool hasBaseURI() const;
bool hasHtmlDocTitle() const;
KURL const& baseURI() const;
- QString const& htmlDocTitle() const;
+ TQString const& htmlDocTitle() const;
bool ignored() const;
bool redirectionExists(KURL const& url) const; // to avoid cyclic links
- QString mimeType() const;
+ TQString mimeType() const;
bool isErrorPage() const;
TreeViewItem* treeViewItem() const;
- QValueVector<KURL> const& referrers() const;
+ TQValueVector<KURL> const& referrers() const;
static LinkStatus* lastRedirection(LinkStatus* ls);
@@ -152,13 +152,13 @@ private:
Status status_;
int depth_;
int external_domain_depth_; // Para se poder escolher explorar domains diferentes ate n depth
- QString original_url_;
- QString label_;
+ TQString original_url_;
+ TQString label_;
KURL absolute_url_;
- QString doc_html_;
+ TQString doc_html_;
HttpResponseHeader http_header_;
- QString status_text_; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
- QString error_;
+ TQString status_text_; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
+ TQString error_;
bool is_root_;
bool error_occurred_;
bool is_redirection_;
@@ -172,13 +172,13 @@ private:
bool has_base_URI_;
bool has_html_doc_title_;
KURL base_URI_;
- QString html_doc_title_;
+ TQString html_doc_title_;
bool ignored_;
- QString mimetype_;
+ TQString mimetype_;
bool is_error_page_;
bool is_local_restrict_;
TreeViewItem* tree_view_item_;
- QValueVector<KURL> referrers_;
+ TQValueVector<KURL> referrers_;
};
#include "../parser/url.h"
diff --git a/klinkstatus/src/engine/linkstatus_impl.h b/klinkstatus/src/engine/linkstatus_impl.h
index 3359664c..5a875b2e 100644
--- a/klinkstatus/src/engine/linkstatus_impl.h
+++ b/klinkstatus/src/engine/linkstatus_impl.h
@@ -78,17 +78,17 @@ inline void LinkStatus::setAbsoluteUrl(KURL const& url_absoluto)
absolute_url_ = url_absoluto;
}
-inline void LinkStatus::setOriginalUrl(QString const& url_original)
+inline void LinkStatus::setOriginalUrl(TQString const& url_original)
{
original_url_ = url_original;
}
-inline void LinkStatus::setLabel(QString const& label)
+inline void LinkStatus::setLabel(TQString const& label)
{
label_ = label;
}
-inline void LinkStatus::setDocHtml(QString const& doc_html)
+inline void LinkStatus::setDocHtml(TQString const& doc_html)
{
Q_ASSERT(!doc_html.isEmpty());
doc_html_ = doc_html;
@@ -99,13 +99,13 @@ inline void LinkStatus::setHttpHeader(HttpResponseHeader const& cabecalho_http)
http_header_ = cabecalho_http;
}
-inline void LinkStatus::setStatusText(QString const& status)
+inline void LinkStatus::setStatusText(TQString const& status)
{
Q_ASSERT(!status.isEmpty());
status_text_ = status;
}
-inline void LinkStatus::setError(QString const& error)
+inline void LinkStatus::setError(TQString const& error)
{
Q_ASSERT(!error.isEmpty());
error_ = error;
@@ -186,7 +186,7 @@ inline void LinkStatus::setBaseURI(KURL const& base_url)
base_URI_ = base_url;
}
-inline void LinkStatus::setHtmlDocTitle(QString const& title)
+inline void LinkStatus::setHtmlDocTitle(TQString const& title)
{
if(title.isNull() || title.isEmpty())
{
@@ -204,7 +204,7 @@ inline void LinkStatus::setIgnored(bool flag)
ignored_ = flag;
}
-inline void LinkStatus::setMimeType(QString const& mimetype)
+inline void LinkStatus::setMimeType(TQString const& mimetype)
{
Q_ASSERT(!mimetype.isNull() && !mimetype.isEmpty());
mimetype_ = mimetype;
@@ -266,12 +266,12 @@ inline LinkStatus const* LinkStatus::parent() const
return parent_;
}
-inline QString const& LinkStatus::originalUrl() const
+inline TQString const& LinkStatus::originalUrl() const
{
return original_url_;
}
-inline QString const& LinkStatus::label() const
+inline TQString const& LinkStatus::label() const
{
return label_;
}
@@ -281,7 +281,7 @@ inline KURL const& LinkStatus::absoluteUrl() const
return absolute_url_;
}
-inline QString const& LinkStatus::docHtml() const
+inline TQString const& LinkStatus::docHtml() const
{
return doc_html_;
}
@@ -296,7 +296,7 @@ inline HttpResponseHeader& LinkStatus::httpHeader()
return http_header_;
}
-inline QString LinkStatus::statusText() const
+inline TQString LinkStatus::statusText() const
{
if(errorOccurred())
return error();
@@ -304,7 +304,7 @@ inline QString LinkStatus::statusText() const
return status_text_;
else
{
- QString string_code = QString::number(httpHeader().statusCode());
+ TQString string_code = TQString::number(httpHeader().statusCode());
if(absoluteUrl().hasRef()) // ref URL
return status_text_;
else if(string_code == "200"/* or string_code == "304"*/)
@@ -314,7 +314,7 @@ inline QString LinkStatus::statusText() const
}
}
-inline QString const& LinkStatus::error() const
+inline TQString const& LinkStatus::error() const
{
return error_;
}
@@ -383,7 +383,7 @@ inline KURL const& LinkStatus::baseURI() const
return base_URI_;
}
-inline QString const& LinkStatus::htmlDocTitle() const
+inline TQString const& LinkStatus::htmlDocTitle() const
{
Q_ASSERT(has_html_doc_title_);
return html_doc_title_;
@@ -394,7 +394,7 @@ inline bool LinkStatus::ignored() const
return ignored_;
}
-inline QString LinkStatus::mimeType() const
+inline TQString LinkStatus::mimeType() const
{
Q_ASSERT(!mimetype_.isNull());
return mimetype_;
@@ -410,7 +410,7 @@ inline TreeViewItem* LinkStatus::treeViewItem() const
return tree_view_item_;
}
-inline QValueVector<KURL> const& LinkStatus::referrers() const
+inline TQValueVector<KURL> const& LinkStatus::referrers() const
{
return referrers_;
}
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);
diff --git a/klinkstatus/src/engine/searchmanager.h b/klinkstatus/src/engine/searchmanager.h
index 135d267a..4dc68352 100644
--- a/klinkstatus/src/engine/searchmanager.h
+++ b/klinkstatus/src/engine/searchmanager.h
@@ -23,11 +23,11 @@
#include <kurl.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqmap.h>
class QDomElement;
#include <vector>
@@ -39,7 +39,7 @@ class QDomElement;
using namespace std;
-typedef QMap<QString, KHTMLPart*> KHTMLPartMap;
+typedef TQMap<TQString, KHTMLPart*> KHTMLPartMap;
class SearchManager: public QObject
{
@@ -54,16 +54,16 @@ public:
};
SearchManager(int max_simultaneous_connections = 3, int time_out = 50,
- QObject *parent = 0, const char *name = 0);
+ TQObject *parent = 0, const char *name = 0);
~SearchManager();
- QString toXML() const;
- void save(QDomElement& element) const;
+ TQString toXML() const;
+ void save(TQDomElement& element) const;
KHTMLPartMap const& htmlParts() const { return html_parts_; }
- KHTMLPart* htmlPart(QString const& key_url) const;
- void addHtmlPart(QString const& key_url, KHTMLPart* html_part);
+ KHTMLPart* htmlPart(TQString const& key_url) const;
+ void addHtmlPart(TQString const& key_url, KHTMLPart* html_part);
void removeHtmlParts();
void startSearch(KURL const& root);
@@ -78,11 +78,11 @@ public:
void setSearchMode(SearchMode modo);
void setDepth(int depth);
void setExternalDomainDepth(int depth);
- void setDomain(QString const& domain);
+ void setDomain(TQString const& domain);
void setCheckParentDirs(bool flag);
void setCheckExternalLinks(bool flag);
void setCheckRegularExpressions(bool flag);
- void setRegularExpression(QString const& reg_exp, bool case_sensitive);
+ void setRegularExpression(TQString const& reg_exp, bool case_sensitive);
void setTimeOut(int time_out);
void cleanItems();
@@ -94,9 +94,9 @@ public:
SearchMode const& searchMode() const;
bool checkRegularExpressions() const { return check_regular_expressions_; }
bool existUrl(KURL const& url, KURL const& url_parent) const;
- LinkStatus const* linkStatus(QString const& s_url) const;
+ LinkStatus const* linkStatus(TQString const& s_url) const;
int checkedLinks() const;
- QTime timeElapsed() const;
+ TQTime timeElapsed() const;
bool checkParentDirs() const;
bool checkExternalLinks() const;
LinkStatus const* linkStatusRoot() const;
@@ -104,7 +104,7 @@ public:
int timeOut() const;
bool sendIdentification() const { return send_identification_; }
- QString const& userAgent() const { return user_agent_; }
+ TQString const& userAgent() const { return user_agent_; }
private:
@@ -165,19 +165,19 @@ private:
int links_being_checked_;
int finished_connections_;
int maximum_current_connections_;
- QRegExp reg_exp_;
- QString domain_;
+ TQRegExp reg_exp_;
+ TQString domain_;
bool general_domain_;
bool checked_general_domain_;
int time_out_;
int current_connections_;
bool send_identification_; // user-agent
- QString user_agent_;
+ TQString user_agent_;
bool canceled_;
bool searching_;
int checked_links_;
- QTime time_;
+ TQTime time_;
int ignored_links_;
bool check_parent_dirs_;
bool check_external_links_;
diff --git a/klinkstatus/src/engine/searchmanager_impl.h b/klinkstatus/src/engine/searchmanager_impl.h
index eaa5e572..e472ccbb 100644
--- a/klinkstatus/src/engine/searchmanager_impl.h
+++ b/klinkstatus/src/engine/searchmanager_impl.h
@@ -38,11 +38,11 @@ inline int SearchManager::checkedLinks() const
return checked_links_;
}
-inline QTime SearchManager::timeElapsed() const
+inline TQTime SearchManager::timeElapsed() const
{
int ms = time_.elapsed();
//kdDebug(23100) << "Time elapsed (ms): " << ms << endl;
- return QTime(0, 0).addMSecs(ms);
+ return TQTime(0, 0).addMSecs(ms);
}
inline void SearchManager::startSearch(KURL const& root)
@@ -65,7 +65,7 @@ inline void SearchManager::setExternalDomainDepth(int depth)
external_domain_depth_ = depth;
}
-inline void SearchManager::setDomain(QString const& domain)
+inline void SearchManager::setDomain(TQString const& domain)
{
Q_ASSERT(domain.find("http://") == -1);
domain_ = domain;
@@ -88,9 +88,9 @@ inline void SearchManager::setCheckRegularExpressions(bool flag)
check_regular_expressions_ = flag;
}
-inline void SearchManager::setRegularExpression(QString const& reg_exp, bool case_sensitive)
+inline void SearchManager::setRegularExpression(TQString const& reg_exp, bool case_sensitive)
{
- reg_exp_ = QRegExp(reg_exp, case_sensitive);
+ reg_exp_ = TQRegExp(reg_exp, case_sensitive);
}
inline void SearchManager::setTimeOut(int time_out)