diff options
Diffstat (limited to 'klinkstatus/src/engine/linkchecker.cpp')
-rw-r--r-- | klinkstatus/src/engine/linkchecker.cpp | 60 |
1 files changed, 30 insertions, 30 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; |