diff options
Diffstat (limited to 'klinkstatus')
57 files changed, 827 insertions, 809 deletions
diff --git a/klinkstatus/FEATURES b/klinkstatus/FEATURES index 33a328e4..11ed0bf0 100644 --- a/klinkstatus/FEATURES +++ b/klinkstatus/FEATURES @@ -14,5 +14,5 @@ - Tabbed checking (allow multiple sessions at the same time) - Filter checked links (good, broken, malformed and undetermined) - Configurable number of simultaneous connections (performance tunning) -- Other configurable options like "check external links", "check parent folders", "timeout" +- Other configurable options like "check external links", "check tqparent folders", "timeout" - Good integration with Quanta+
\ No newline at end of file diff --git a/klinkstatus/data/styles/results_stylesheet.xsl b/klinkstatus/data/styles/results_stylesheet.xsl index d0b0c10d..fac79c2f 100644 --- a/klinkstatus/data/styles/results_stylesheet.xsl +++ b/klinkstatus/data/styles/results_stylesheet.xsl @@ -30,7 +30,7 @@ <thead> <tr> <th>URL</th> - <th>Status</th> + <th>tqStatus</th> <th>Label</th> <th>Referrers</th> </tr> diff --git a/klinkstatus/src/Makefile.am b/klinkstatus/src/Makefile.am index 590957a2..06c14b60 100644 --- a/klinkstatus/src/Makefile.am +++ b/klinkstatus/src/Makefile.am @@ -17,7 +17,7 @@ bin_PROGRAMS = klinkstatus # the application source, library search path, and link libraries -klinkstatus_LDFLAGS = $(KDE_RPATH) $(all_libraries) +klinkstatus_LDFLAGS = $(KDE_RPATH) $(all_libraries) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) -lDCOP klinkstatus_LDADD = $(LIB_KPARTS) xdg_apps_DATA = klinkstatus.desktop @@ -34,7 +34,7 @@ kde_module_LTLIBRARIES = libklinkstatuspart.la # the Part's source, library search path, and link libraries -libklinkstatuspart_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) +libklinkstatuspart_la_LDFLAGS = -module -no-undefined $(KDE_PLUGIN) $(all_libraries) $(LIB_QT) $(LIB_KDECORE) $(LIB_KDEUI) -lDCOP libklinkstatuspart_la_LIBADD = ui/settings/libsettings.la \ ui/libui.la engine/libengine.la \ parser/libparser.la utils/libutils.la $(LIB_KPARTS) $(LIB_KFILE) diff --git a/klinkstatus/src/actionmanager.cpp b/klinkstatus/src/actionmanager.cpp index f126d977..94506ea3 100644 --- a/klinkstatus/src/actionmanager.cpp +++ b/klinkstatus/src/actionmanager.cpp @@ -63,8 +63,8 @@ public: SessionWidget* sessionWidget; }; -ActionManager::ActionManager(TQObject *parent, const char *name) - : TQObject(parent, name), d(new ActionManagerPrivate) +ActionManager::ActionManager(TQObject *tqparent, const char *name) + : TQObject(tqparent, name), d(new ActionManagerPrivate) {} ActionManager::~ActionManager() @@ -90,33 +90,33 @@ void ActionManager::initPart(KLinkStatusPart* part) new KAction(i18n("New Link Check"), "filenew", 0, d->part, TQT_SLOT(slotNewLinkCheck()), - d->actionCollection, "new_link_check"); + TQT_TQOBJECT(d->actionCollection), "new_link_check"); new KAction(i18n("Open URL..."), "fileopen", 0, d->part, TQT_SLOT(slotOpenLink()), - d->actionCollection, "open_link"); + TQT_TQOBJECT(d->actionCollection), "open_link"); action = new KAction(i18n("Close Tab"), "fileclose", 0, d->part, TQT_SLOT(slotClose()), - d->actionCollection, "close_tab"); + TQT_TQOBJECT(d->actionCollection), "close_tab"); action->setEnabled(false); // *************** Settings menu ********************* - (void) new KAction(i18n("Configure KLinkStatus..."), "configure", - 0, d->part, TQT_SLOT(slotConfigureKLinkStatus()), - d->actionCollection, "configure_klinkstatus"); + (void) new KAction(i18n("Configure KLinktqStatus..."), "configure", + 0, d->part, TQT_SLOT(slotConfigureKLinktqStatus()), + TQT_TQOBJECT(d->actionCollection), "configure_klinkstatus"); // *************** Help menu ********************* - (void) new KAction(i18n("About KLinkStatus"), "klinkstatus", + (void) new KAction(i18n("About KLinktqStatus"), "klinkstatus", 0, d->part, TQT_SLOT(slotAbout()), - d->actionCollection, "about_klinkstatus"); + TQT_TQOBJECT(d->actionCollection), "about_klinkstatus"); (void) new KAction(i18n("&Report Bug..."), 0, 0, d->part, - TQT_SLOT(slotReportBug()), d->actionCollection, "report_bug"); + TQT_SLOT(slotReportBug()), TQT_TQOBJECT(d->actionCollection), "report_bug"); // *************** View menu ********************* } @@ -133,8 +133,8 @@ void ActionManager::initTabWidget(TabWidgetSession* tabWidgetSession) // *************** File menu ********************* KAction* action = new KAction(i18n("E&xport Results as HTML..."), "filesave", 0, - d->tabWidgetSession, TQT_SLOT(slotExportAsHTML()), - d->actionCollection, "file_export_html"); + TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotExportAsHTML()), + TQT_TQOBJECT(d->actionCollection), "file_export_html"); action->setEnabled(false); // *************** View menu ********************* @@ -142,39 +142,39 @@ void ActionManager::initTabWidget(TabWidgetSession* tabWidgetSession) // this action must be in the tabwidget because the slot can't be connected to a particular sessionWidget KToggleAction* toggle_action = new KToggleAction(i18n("&Follow last Link checked"), "make_kdevelop", "Ctrl+f", - d->tabWidgetSession, TQT_SLOT(slotFollowLastLinkChecked()), - d->actionCollection, "follow_last_link_checked"); + TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotFollowLastLinkChecked()), + TQT_TQOBJECT(d->actionCollection), "follow_last_link_checked"); toggle_action->setChecked(KLSConfig::followLastLinkChecked()); // this action must be in the tabwidget because the slot can't be connected to a particular sessionWidget toggle_action = new KToggleAction(i18n("&Hide Search Panel"), "bottom", "Ctrl+h", - d->tabWidgetSession, TQT_SLOT(slotHideSearchPanel()), - d->actionCollection, "hide_search_bar"); + TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotHideSearchPanel()), + TQT_TQOBJECT(d->actionCollection), "hide_search_bar"); KGuiItem item(i18n("&Show Search Panel"), "top", "Show Search Panel"); toggle_action->setCheckedState(item); new KAction(i18n("&Reset Search Options"), "reload", "F5", - d->tabWidgetSession, TQT_SLOT(slotResetSearchOptions()), - d->actionCollection, "reset_search_bar"); + TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotResetSearchOptions()), + TQT_TQOBJECT(d->actionCollection), "reset_search_bar"); // *************** Search menu ********************* toggle_action = new KToggleAction(i18n("&Start Search"), "player_play", "Ctrl+s", - d->tabWidgetSession, TQT_SLOT(slotStartSearch()), - d->actionCollection, "start_search"); + TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotStartSearch()), + TQT_TQOBJECT(d->actionCollection), "start_search"); toggle_action->setEnabled(false); toggle_action = new KToggleAction(i18n("&Pause Search"), "player_pause", "Ctrl+p", - d->tabWidgetSession, TQT_SLOT(slotPauseSearch()), - d->actionCollection, "pause_search"); + TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotPauseSearch()), + TQT_TQOBJECT(d->actionCollection), "pause_search"); toggle_action->setEnabled(false); action = new KAction(i18n("St&op Search"), "player_stop", "Ctrl+c", - d->tabWidgetSession, TQT_SLOT(slotStopSearch()), - d->actionCollection, "stop_search"); + TQT_TQOBJECT(d->tabWidgetSession), TQT_SLOT(slotStopSearch()), + TQT_TQOBJECT(d->actionCollection), "stop_search"); action->setEnabled(false); } diff --git a/klinkstatus/src/actionmanager.h b/klinkstatus/src/actionmanager.h index 53fc1003..b2426d8d 100644 --- a/klinkstatus/src/actionmanager.h +++ b/klinkstatus/src/actionmanager.h @@ -34,11 +34,12 @@ class TabWidgetSession; interface for accessing actions, popup menus etc. from widgets. */ -class ActionManager : public QObject +class ActionManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - ActionManager(TQObject* parent=0, const char* name=0); + ActionManager(TQObject* tqparent=0, const char* name=0); virtual ~ActionManager(); static ActionManager* getInstance(); diff --git a/klinkstatus/src/engine/linkchecker.cpp b/klinkstatus/src/engine/linkchecker.cpp index 8186bda8..32e17329 100644 --- a/klinkstatus/src/engine/linkchecker.cpp +++ b/klinkstatus/src/engine/linkchecker.cpp @@ -43,9 +43,9 @@ int LinkChecker::count_ = 0; -LinkChecker::LinkChecker(LinkStatus* linkstatus, int time_out, - TQObject *parent, const char *name) - : TQObject(parent, name), search_manager_(0), +LinkChecker::LinkChecker(LinktqStatus* linkstatus, int time_out, + TQObject *tqparent, const char *name) + : TQObject(tqparent, 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) @@ -69,7 +69,7 @@ void LinkChecker::check() { Q_ASSERT(!finnished_); - KURL url(linkStatus()->absoluteUrl()); + KURL url(linktqStatus()->absoluteUrl()); Q_ASSERT(url.isValid()); if(url.hasRef()) { @@ -84,8 +84,8 @@ void LinkChecker::check() t_job_->addMetaData("PropagateHttpHeader", "true"); // to have the http header - if (linkstatus_->parent()) { - t_job_->addMetaData("referrer", linkstatus_->parent()->absoluteUrl().prettyURL()); + if (linkstatus_->tqparent()) { + t_job_->addMetaData("referrer", linkstatus_->tqparent()->absoluteUrl().prettyURL()); } if(search_manager_->sendIdentification()) @@ -128,7 +128,7 @@ void LinkChecker::slotTimeOut() linkstatus_->setErrorOccurred(true); linkstatus_->setChecked(true); linkstatus_->setError(i18n("Timeout")); - linkstatus_->setStatus(LinkStatus::TIMEOUT); + linkstatus_->settqStatus(LinktqStatus::TIMEOUT); killJob(); finnish(); @@ -146,9 +146,9 @@ void LinkChecker::slotMimetype (KIO::Job* /*job*/, const TQString &type) Q_ASSERT(t_job_); - LinkStatus* ls = 0; + LinktqStatus* ls = 0; /* if(redirection_) - ls = linkStatus()->redirection(); + ls = linktqStatus()->redirection(); else*/ ls = linkstatus_; Q_ASSERT(ls); @@ -168,7 +168,7 @@ void LinkChecker::slotMimetype (KIO::Job* /*job*/, const TQString &type) if(!url.protocol().startsWith("http")) { ls->setStatusText("OK"); - ls->setStatus(LinkStatus::SUCCESSFULL); + ls->settqStatus(LinktqStatus::SUCCESSFULL); killJob(); finnish(); @@ -186,7 +186,7 @@ void LinkChecker::slotMimetype (KIO::Job* /*job*/, const TQString &type) { //kdDebug(23100) << "mimetype: " << type << endl; ls->setStatusText("OK"); - ls->setStatus(LinkStatus::SUCCESSFULL); + ls->settqStatus(LinktqStatus::SUCCESSFULL); killJob(); finnish(); @@ -206,9 +206,9 @@ void LinkChecker::slotData(KIO::Job* /*job*/, const TQByteArray& data) Q_ASSERT(t_job_); - LinkStatus* ls = 0; + LinktqStatus* ls = 0; /* if(redirection_) - ls = linkStatus()->redirection(); + ls = linktqStatus()->redirection(); else*/ ls = linkstatus_; Q_ASSERT(ls); @@ -235,7 +235,7 @@ void LinkChecker::slotData(KIO::Job* /*job*/, const TQByteArray& data) if(header_checked_) { killJob(); - linkstatus_->setStatus(getHttpStatus()); + linkstatus_->settqStatus(getHttptqStatus()); linkstatus_->setChecked(true); finnish(); return; @@ -253,7 +253,7 @@ void LinkChecker::slotData(KIO::Job* /*job*/, const TQByteArray& data) if(ls->mimeType() != "text/html" && header_checked_) { //kdDebug(23100) << "mimetype of " << ls->absoluteUrl().prettyURL() << ": " << ls->mimeType() << endl; - ls->setStatus(getHttpStatus()); + ls->settqStatus(getHttptqStatus()); killJob(); finnish(); // if finnish is called before kill what you get is a segfault, don't know why return; @@ -262,7 +262,7 @@ void LinkChecker::slotData(KIO::Job* /*job*/, const TQByteArray& data) { //kdDebug(23100) << "ERROR PAGE" << endl; ls->setIsErrorPage(true); - ls->setStatus(getHttpStatus()); + ls->settqStatus(getHttptqStatus()); killJob(); finnish(); return; @@ -339,9 +339,9 @@ void LinkChecker::slotResult(KIO::Job* /*job*/) return; } - LinkStatus* ls = 0; + LinktqStatus* ls = 0; if(redirection_) - ls = linkStatus()->redirection(); + ls = linktqStatus()->redirection(); else ls = linkstatus_; Q_ASSERT(ls); @@ -366,15 +366,15 @@ void LinkChecker::slotResult(KIO::Job* /*job*/) if(job->error() == KIO::ERR_IS_DIRECTORY) { ls->setStatusText("OK"); - ls->setStatus(LinkStatus::SUCCESSFULL); + ls->settqStatus(LinktqStatus::SUCCESSFULL); } else { ls->setErrorOccurred(true); if(job->error() == KIO::ERR_SERVER_TIMEOUT) - ls->setStatus(LinkStatus::TIMEOUT); + ls->settqStatus(LinktqStatus::TIMEOUT); else - ls->setStatus(LinkStatus::BROKEN); + ls->settqStatus(LinktqStatus::BROKEN); if(job->errorString().isEmpty()) kdWarning(23100) << "\n\nError string is empty, error = " << job->error() << "\n\n\n"; @@ -389,7 +389,7 @@ void LinkChecker::slotResult(KIO::Job* /*job*/) { if(!ls->absoluteUrl().protocol().startsWith("http")) { ls->setStatusText("OK"); - ls->setStatus(LinkStatus::SUCCESSFULL); + ls->settqStatus(LinktqStatus::SUCCESSFULL); } else { @@ -402,7 +402,7 @@ void LinkChecker::slotResult(KIO::Job* /*job*/) } Q_ASSERT(header_checked_); - ls->setStatus(getHttpStatus()); + ls->settqStatus(getHttptqStatus()); } if(!doc_html_.isNull() && !doc_html_.isEmpty()) @@ -449,10 +449,10 @@ bool LinkChecker::processRedirection(KURL const& toUrl) linkstatus_->setHttpHeader(getHttpHeader(t_job_, false)); linkstatus_->setIsRedirection(true); linkstatus_->setStatusText("redirection"); - linkstatus_->setStatus(LinkStatus::HTTP_REDIRECTION); + linkstatus_->settqStatus(LinktqStatus::HTTP_REDIRECTION); linkstatus_->setChecked(true); - LinkStatus* ls_red = new LinkStatus(*linkstatus_); + LinktqStatus* ls_red = new LinktqStatus(*linkstatus_); ls_red->setAbsoluteUrl(toUrl); ls_red->setRootUrl(linkstatus_->rootUrl()); @@ -534,33 +534,33 @@ HttpResponseHeader LinkChecker::getHttpHeader(KIO::Job* /*job*/, bool remember_c void LinkChecker::checkRef() { - KURL url(linkStatus()->absoluteUrl()); + KURL url(linktqStatus()->absoluteUrl()); Q_ASSERT(url.hasRef()); TQString ref = url.ref(); if(ref == "" || ref == "top") { linkstatus_->setStatusText("OK"); - linkstatus_->setStatus(LinkStatus::SUCCESSFULL); + linkstatus_->settqStatus(LinktqStatus::SUCCESSFULL); finnish(); return; } TQString url_base; - LinkStatus const* ls_parent = 0; + LinktqStatus const* ls_parent = 0; int i_ref = -1; - if(linkStatus()->originalUrl().startsWith("#")) - ls_parent = linkStatus()->parent(); + if(linktqStatus()->originalUrl().startsWith("#")) + ls_parent = linktqStatus()->tqparent(); else { - i_ref = url.url().find("#"); + i_ref = url.url().tqfind("#"); url_base = url.url().left(i_ref); //kdDebug(23100) << "url_base: " << url_base << endl; Q_ASSERT(search_manager_); - ls_parent = search_manager_->linkStatus(url_base); + ls_parent = search_manager_->linktqStatus(url_base); } if(ls_parent) @@ -603,22 +603,22 @@ void LinkChecker::checkRef(KURL const& url) search_manager_->addHtmlPart(url_string, html_part); } - if(hasAnchor(html_part, linkStatus()->absoluteUrl().ref())) + if(hasAnchor(html_part, linktqStatus()->absoluteUrl().ref())) { linkstatus_->setStatusText("OK"); - linkstatus_->setStatus(LinkStatus::SUCCESSFULL); + linkstatus_->settqStatus(LinktqStatus::SUCCESSFULL); } else { linkstatus_->setErrorOccurred(true); linkstatus_->setError(i18n( "Link destination not found." )); - linkstatus_->setStatus(LinkStatus::BROKEN); + linkstatus_->settqStatus(LinktqStatus::BROKEN); } finnish(); } -void LinkChecker::checkRef(LinkStatus const* linkstatus_parent) +void LinkChecker::checkRef(LinktqStatus const* linkstatus_parent) { Q_ASSERT(search_manager_); @@ -638,16 +638,16 @@ void LinkChecker::checkRef(LinkStatus const* linkstatus_parent) search_manager_->addHtmlPart(url_string, html_part); } - if(hasAnchor(html_part, linkStatus()->absoluteUrl().ref())) + if(hasAnchor(html_part, linktqStatus()->absoluteUrl().ref())) { linkstatus_->setStatusText("OK"); - linkstatus_->setStatus(LinkStatus::SUCCESSFULL); + linkstatus_->settqStatus(LinktqStatus::SUCCESSFULL); } else { linkstatus_->setErrorOccurred(true); linkstatus_->setError(i18n( "Link destination not found." )); - linkstatus_->setStatus(LinkStatus::BROKEN); + linkstatus_->settqStatus(LinktqStatus::BROKEN); } finnish(); @@ -684,20 +684,20 @@ void LinkChecker::killJob() aux->kill(true); // quietly } -LinkStatus::Status LinkChecker::getHttpStatus() const +LinktqStatus::tqStatus LinkChecker::getHttptqStatus() const { TQString status_code = TQString::number(linkstatus_->httpHeader().statusCode()); if(status_code[0] == '2') - return LinkStatus::SUCCESSFULL; + return LinktqStatus::SUCCESSFULL; else if(status_code[0] == '3') - return LinkStatus::HTTP_REDIRECTION; + return LinktqStatus::HTTP_REDIRECTION; else if(status_code[0] == '4') - return LinkStatus::HTTP_CLIENT_ERROR; + return LinktqStatus::HTTP_CLIENT_ERROR; else if(status_code[0] == '5') - return LinkStatus::HTTP_SERVER_ERROR; + return LinktqStatus::HTTP_SERVER_ERROR; else - return LinkStatus::UNDETERMINED; + return LinktqStatus::UNDETERMINED; } #include "linkchecker.moc" diff --git a/klinkstatus/src/engine/linkchecker.h b/klinkstatus/src/engine/linkchecker.h index 168776d9..74cf9eb9 100644 --- a/klinkstatus/src/engine/linkchecker.h +++ b/klinkstatus/src/engine/linkchecker.h @@ -37,25 +37,26 @@ using namespace std; /** @author Paulo Moura Guedes */ -class LinkChecker : public QObject +class LinkChecker : public TQObject { Q_OBJECT + TQ_OBJECT public: - LinkChecker(LinkStatus* linkstatus, int time_out = 50, - TQObject *parent = 0, const char *name = 0); + LinkChecker(LinktqStatus* linkstatus, int time_out = 50, + TQObject *tqparent = 0, const char *name = 0); ~LinkChecker(); //virtual void run(); void check(); void setSearchManager(SearchManager* search_manager); - LinkStatus const* linkStatus() const; + LinktqStatus const* linktqStatus() const; static bool hasAnchor(KHTMLPart* html_part, TQString const& anchor); signals: - void transactionFinished(const LinkStatus * linkstatus, + void transactionFinished(const LinktqStatus * linkstatus, LinkChecker * checker); void jobFinnished(LinkChecker * checker); @@ -75,8 +76,8 @@ protected: private: - LinkStatus::Status getHttpStatus() const; - void checkRef(LinkStatus const* linkstatus_parent); + LinktqStatus::tqStatus getHttptqStatus() const; + void checkRef(LinktqStatus const* linkstatus_parent); void checkRef(KURL const& url); void killJob(); /** @@ -90,7 +91,7 @@ private: private: SearchManager* search_manager_; - LinkStatus* const linkstatus_; + LinktqStatus* const linkstatus_; KIO::TransferJob* t_job_; int time_out_; LinkChecker* checker_; @@ -119,7 +120,7 @@ private: static int count_; // debug attribute that counts how many links were checked }; -inline LinkStatus const* LinkChecker::linkStatus() const +inline LinktqStatus const* LinkChecker::linktqStatus() const { return linkstatus_; } diff --git a/klinkstatus/src/engine/linkfilter.cpp b/klinkstatus/src/engine/linkfilter.cpp index 1c7a3844..92dee430 100644 --- a/klinkstatus/src/engine/linkfilter.cpp +++ b/klinkstatus/src/engine/linkfilter.cpp @@ -22,7 +22,7 @@ #include "linkstatus.h" -LinkMatcher::LinkMatcher(TQString const& text, ResultView::Status status) +LinkMatcher::LinkMatcher(TQString const& text, ResultView::tqStatus status) : m_text(text), m_status(status) { } @@ -31,15 +31,15 @@ LinkMatcher::~LinkMatcher() { } -bool LinkMatcher::matches(LinkStatus const& link ) const +bool LinkMatcher::matches(LinktqStatus const& link ) const { /* kdDebug() << link.absoluteUrl().url() << endl; kdDebug() << link.label() << endl; - kdDebug() << link.absoluteUrl().url().contains(m_text) << endl; - kdDebug() << link.label().contains(m_text) << endl; + kdDebug() << link.absoluteUrl().url().tqcontains(m_text) << endl; + kdDebug() << link.label().tqcontains(m_text) << endl; */ - return (link.absoluteUrl().url().contains(m_text, false) || link.label().contains(m_text, false)) && - ResultView::displayableWithStatus(&link, m_status); + return (link.absoluteUrl().url().tqcontains(m_text, false) || link.label().tqcontains(m_text, false)) && + ResultView::displayableWithtqStatus(&link, m_status); } diff --git a/klinkstatus/src/engine/linkfilter.h b/klinkstatus/src/engine/linkfilter.h index 6d211aa6..908649d2 100644 --- a/klinkstatus/src/engine/linkfilter.h +++ b/klinkstatus/src/engine/linkfilter.h @@ -28,22 +28,22 @@ class LinkMatcher { public: - LinkMatcher(TQString const& text, ResultView::Status status); + LinkMatcher(TQString const& text, ResultView::tqStatus status); ~LinkMatcher(); - bool matches(LinkStatus const& link) const; + bool matches(LinktqStatus const& link) const; 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; } + void settqStatus(ResultView::tqStatus status) { m_status = status; } + ResultView::tqStatus status() const { return m_status; } bool nullFilter() const { return m_text.isEmpty() && m_status == ResultView::none; } private: TQString m_text; - ResultView::Status m_status; + ResultView::tqStatus m_status; }; #endif diff --git a/klinkstatus/src/engine/linkstatus.cpp b/klinkstatus/src/engine/linkstatus.cpp index 58841a63..cec4cd52 100644 --- a/klinkstatus/src/engine/linkstatus.cpp +++ b/klinkstatus/src/engine/linkstatus.cpp @@ -28,20 +28,20 @@ #include <tqdom.h> -LinkStatus::~LinkStatus() +LinktqStatus::~LinktqStatus() { //kdDebug(23100) << "|"; - for(uint i = 0; i != children_nodes_.size(); ++i) + for(uint i = 0; i != tqchildren_nodes_.size(); ++i) { - if(children_nodes_[i]) + if(tqchildren_nodes_[i]) { - delete children_nodes_[i]; - children_nodes_[i] = 0; + delete tqchildren_nodes_[i]; + tqchildren_nodes_[i] = 0; } } - children_nodes_.clear(); + tqchildren_nodes_.clear(); if(isRedirection()) { @@ -53,7 +53,7 @@ LinkStatus::~LinkStatus() } } -void LinkStatus::reset() +void LinktqStatus::reset() { depth_ = -1; external_domain_depth_ = -1; @@ -71,16 +71,16 @@ void LinkStatus::reset() http_header_ = HttpResponseHeader(); error_ = ""; - for(uint i = 0; i != children_nodes_.size(); ++i) + for(uint i = 0; i != tqchildren_nodes_.size(); ++i) { - if(children_nodes_[i]) + if(tqchildren_nodes_[i]) { - delete children_nodes_[i]; - children_nodes_[i] = 0; + delete tqchildren_nodes_[i]; + tqchildren_nodes_[i] = 0; } } - children_nodes_.clear(); + tqchildren_nodes_.clear(); if(isRedirection()) { @@ -90,31 +90,31 @@ void LinkStatus::reset() redirection_ = 0; } } - Q_ASSERT(!parent_); + Q_ASSERT(!tqparent_); base_URI_ = ""; } -TQString const LinkStatus::toString() const +TQString const LinktqStatus::toString() const { TQString aux; if(!is_root_) { - Q_ASSERT(parent_); - aux += i18n( "Parent: %1" ).arg( parent()->absoluteUrl().prettyURL() ) + "\n"; + Q_ASSERT(tqparent_); + aux += i18n( "Parent: %1" ).tqarg( tqparent()->absoluteUrl().prettyURL() ) + "\n"; } Q_ASSERT(!original_url_.isNull()); - aux += i18n( "URL: %1" ).arg( absoluteUrl().prettyURL() ) + "\n"; - aux += i18n( "Original URL: %1" ).arg( originalUrl() ) + "\n"; + aux += i18n( "URL: %1" ).tqarg( absoluteUrl().prettyURL() ) + "\n"; + aux += i18n( "Original URL: %1" ).tqarg( originalUrl() ) + "\n"; if(node()) - aux += i18n( "Node: %1" ).arg( node()->content() ) + "\n"; + aux += i18n( "Node: %1" ).tqarg( node()->content() ) + "\n"; return aux; } -LinkStatus* LinkStatus::lastRedirection(LinkStatus* ls) +LinktqStatus* LinktqStatus::lastRedirection(LinktqStatus* ls) { if(ls->isRedirection()) if(ls->redirection()) @@ -125,7 +125,7 @@ LinkStatus* LinkStatus::lastRedirection(LinkStatus* ls) return ls; } -void LinkStatus::loadNode() +void LinktqStatus::loadNode() { Q_ASSERT(node_); @@ -136,32 +136,32 @@ void LinkStatus::loadNode() { setErrorOccurred(true); setError(i18n( "Malformed" )); - setStatus(LinkStatus::MALFORMED); + settqStatus(LinktqStatus::MALFORMED); kdDebug(23100) << "Malformed:" << endl; kdDebug(23100) << "Node: " << node()->content() << endl; //kdDebug(23100) << toString() << endl; // probable segfault } } -bool LinkStatus::malformed() const // don't inline please (#include "node.h") +bool LinktqStatus::malformed() const // don't inline please (#include "node.h") { return (malformed_ || node_->malformed()); } -void LinkStatus::setChildrenNodes(vector<Node*> const& nodes) // don't inline please (#include "node.h") +void LinktqStatus::setChildrenNodes(vector<Node*> const& nodes) // don't inline please (#include "node.h") { - children_nodes_.reserve(nodes.size()); - children_nodes_ = nodes; + tqchildren_nodes_.reserve(nodes.size()); + tqchildren_nodes_ = nodes; } -void LinkStatus::setMalformed(bool flag) +void LinktqStatus::setMalformed(bool flag) { malformed_ = flag; if(flag) { setErrorOccurred(true); setError(i18n( "Malformed" )); - setStatus(LinkStatus::MALFORMED); + settqStatus(LinktqStatus::MALFORMED); kdDebug(23100) << "Malformed!" << endl; kdDebug(23100) << node()->content() << endl; //kdDebug(23100) << toString() << endl; // probable segfault @@ -170,11 +170,11 @@ void LinkStatus::setMalformed(bool flag) { setErrorOccurred(false); setError(""); - setStatus(LinkStatus::UNDETERMINED); + settqStatus(LinktqStatus::UNDETERMINED); } } -void LinkStatus::save(TQDomElement& element) const +void LinktqStatus::save(TQDomElement& element) const { TQDomElement child_element = element.ownerDocument().createElement("link"); @@ -186,7 +186,7 @@ void LinkStatus::save(TQDomElement& element) const // <status> tmp_1 = element.ownerDocument().createElement("status"); tmp_1.setAttribute("broken", - ResultView::displayableWithStatus(this, ResultView::bad) ? + ResultView::displayableWithtqStatus(this, ResultView::bad) ? "true" : "false"); tmp_1.appendChild(element.ownerDocument().createTextNode(statusText())); child_element.appendChild(tmp_1); diff --git a/klinkstatus/src/engine/linkstatus.h b/klinkstatus/src/engine/linkstatus.h index 59a45751..7ec26ca9 100644 --- a/klinkstatus/src/engine/linkstatus.h +++ b/klinkstatus/src/engine/linkstatus.h @@ -43,11 +43,11 @@ using namespace std; class Node; -class LinkStatus +class LinktqStatus { public: - enum Status { + enum tqStatus { UNDETERMINED, SUCCESSFULL, BROKEN, @@ -59,29 +59,29 @@ public: MALFORMED }; - LinkStatus(); - LinkStatus(KURL const& absolute_url); - LinkStatus(Node* node, LinkStatus* parent); - ~LinkStatus(); + LinktqStatus(); + LinktqStatus(KURL const& absolute_url); + LinktqStatus(Node* node, LinktqStatus* tqparent); + ~LinktqStatus(); void save(TQDomElement& element) const; void reset(); void setRootUrl(KURL const& url); - void setStatus(Status status); + void settqStatus(tqStatus status); void setDepth(uint depth); - void setParent(LinkStatus* parent); + void setParent(LinktqStatus* tqparent); void setOriginalUrl(TQString const& url_original); void setLabel(TQString const& label); void setAbsoluteUrl(KURL const& url_absoluto); void setDocHtml(TQString const& doc_html); void setHttpHeader(HttpResponseHeader const& cabecalho_http); - void setStatusText(TQString const& statusText); // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status + void setStatusText(TQString const& statusText); // FIXME Legacy. This should be eliminated in favor of LinktqStatus::tqStatus void setError(TQString const& error); void setIsRoot(bool flag); void setErrorOccurred(bool houve_error); void setIsRedirection(bool e_redirection); - void setRedirection(LinkStatus* redirection); + void setRedirection(LinktqStatus* redirection); void setNode(Node* node); void setChildrenNodes(vector<Node*> const& nodes); void addChildNode(Node* node); @@ -102,25 +102,25 @@ public: void addReferrer(KURL const& url); KURL const& rootUrl() const; - Status const& status() const; + tqStatus const& status() const; uint depth() const; bool local() const; // linkstatus.paradigma.co.pt == paradigma.co.pt bool isLocalRestrict() const; // linkstatus.paradigma.co.pt != paradigma.co.pt - LinkStatus const* parent() const; + LinktqStatus const* tqparent() const; TQString const& originalUrl() const; TQString const& label() const; KURL const& absoluteUrl() const; TQString const& docHtml() const; HttpResponseHeader const& httpHeader() const; HttpResponseHeader& httpHeader(); - TQString statusText() const; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status + TQString statusText() const; // FIXME Legacy. This should be eliminated in favor of LinktqStatus::tqStatus TQString const& error() const; bool isRoot() const; bool errorOccurred() const; bool isRedirection() const; - LinkStatus* redirection() const; + LinktqStatus* redirection() const; Node* node() const; - vector<Node*> const& childrenNodes() const; + vector<Node*> const& tqchildrenNodes() const; TQString const toString() const; bool checked() const; int externalDomainDepth() const; @@ -137,19 +137,19 @@ public: TreeViewItem* treeViewItem() const; TQValueVector<KURL> const& referrers() const; - static LinkStatus* lastRedirection(LinkStatus* ls); + static LinktqStatus* lastRedirection(LinktqStatus* ls); private: /** - Load some atributes in function of his parent node. + Load some atributes in function of his tqparent node. */ void loadNode(); private: KURL root_url_; // The URL which made the search start - Status status_; + tqStatus status_; int depth_; int external_domain_depth_; // Para se poder escolher explorar domains diferentes ate n depth TQString original_url_; @@ -157,14 +157,14 @@ private: KURL absolute_url_; TQString doc_html_; HttpResponseHeader http_header_; - TQString status_text_; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status + TQString status_text_; // FIXME Legacy. This should be eliminated in favor of LinktqStatus::tqStatus TQString error_; bool is_root_; bool error_occurred_; bool is_redirection_; - vector<Node*> children_nodes_; - LinkStatus* parent_; - LinkStatus* redirection_; + vector<Node*> tqchildren_nodes_; + LinktqStatus* tqparent_; + LinktqStatus* redirection_; bool checked_; bool only_check_header_; bool malformed_; diff --git a/klinkstatus/src/engine/linkstatus_impl.h b/klinkstatus/src/engine/linkstatus_impl.h index 5a875b2e..4d3faf36 100644 --- a/klinkstatus/src/engine/linkstatus_impl.h +++ b/klinkstatus/src/engine/linkstatus_impl.h @@ -18,17 +18,17 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -inline LinkStatus::LinkStatus() - : status_(LinkStatus::UNDETERMINED), depth_(-1), external_domain_depth_(-1), is_root_(false), - error_occurred_(false), is_redirection_(false), parent_(0), redirection_(0), checked_(false), +inline LinktqStatus::LinktqStatus() + : status_(LinktqStatus::UNDETERMINED), depth_(-1), external_domain_depth_(-1), is_root_(false), + error_occurred_(false), is_redirection_(false), tqparent_(0), redirection_(0), checked_(false), only_check_header_(true), malformed_(false), node_(0), has_base_URI_(false), has_html_doc_title_(false), ignored_(false), mimetype_(""), is_error_page_(false), tree_view_item_(0) {} -inline LinkStatus::LinkStatus(KURL const& absolute_url) - : status_(LinkStatus::UNDETERMINED), depth_(-1), external_domain_depth_(-1), is_root_(false), - error_occurred_(false), is_redirection_(false), parent_(0), redirection_(0), checked_(false), +inline LinktqStatus::LinktqStatus(KURL const& absolute_url) + : status_(LinktqStatus::UNDETERMINED), depth_(-1), external_domain_depth_(-1), is_root_(false), + error_occurred_(false), is_redirection_(false), tqparent_(0), redirection_(0), checked_(false), only_check_header_(true), malformed_(false), node_(0), has_base_URI_(false), has_html_doc_title_(false), ignored_(false), mimetype_(""), is_error_page_(false), tree_view_item_(0) @@ -36,147 +36,147 @@ inline LinkStatus::LinkStatus(KURL const& absolute_url) setAbsoluteUrl(absolute_url); } -inline LinkStatus::LinkStatus(Node* node, LinkStatus* parent) - : status_(LinkStatus::UNDETERMINED), depth_(-1), external_domain_depth_(-1), is_root_(false), - error_occurred_(false), is_redirection_(false), parent_(0), redirection_(0), checked_(false), +inline LinktqStatus::LinktqStatus(Node* node, LinktqStatus* tqparent) + : status_(LinktqStatus::UNDETERMINED), depth_(-1), external_domain_depth_(-1), is_root_(false), + error_occurred_(false), is_redirection_(false), tqparent_(0), redirection_(0), checked_(false), only_check_header_(true), malformed_(false), node_(node), has_base_URI_(false), has_html_doc_title_(false), ignored_(false), mimetype_(""), is_error_page_(false), tree_view_item_(0) { loadNode(); - setDepth(parent->depth() + 1); - setParent(parent); - setRootUrl(parent->rootUrl()); + setDepth(tqparent->depth() + 1); + setParent(tqparent); + setRootUrl(tqparent->rootUrl()); } -inline void LinkStatus::setRootUrl(KURL const& url) +inline void LinktqStatus::setRootUrl(KURL const& url) { root_url_ = url; } -inline void LinkStatus::setStatus(Status status) +inline void LinktqStatus::settqStatus(tqStatus status) { status_ = status; } -inline void LinkStatus::setDepth(uint depth) +inline void LinktqStatus::setDepth(uint depth) { depth_ = depth; } -inline void LinkStatus::setParent(LinkStatus* parent) +inline void LinktqStatus::setParent(LinktqStatus* tqparent) { - Q_ASSERT(parent); + Q_ASSERT(tqparent); - parent_ = parent; - addReferrer(parent->absoluteUrl()); + tqparent_ = tqparent; + addReferrer(tqparent->absoluteUrl()); } -inline void LinkStatus::setAbsoluteUrl(KURL const& url_absoluto) +inline void LinktqStatus::setAbsoluteUrl(KURL const& url_absoluto) { absolute_url_ = url_absoluto; } -inline void LinkStatus::setOriginalUrl(TQString const& url_original) +inline void LinktqStatus::setOriginalUrl(TQString const& url_original) { original_url_ = url_original; } -inline void LinkStatus::setLabel(TQString const& label) +inline void LinktqStatus::setLabel(TQString const& label) { label_ = label; } -inline void LinkStatus::setDocHtml(TQString const& doc_html) +inline void LinktqStatus::setDocHtml(TQString const& doc_html) { Q_ASSERT(!doc_html.isEmpty()); doc_html_ = doc_html; } -inline void LinkStatus::setHttpHeader(HttpResponseHeader const& cabecalho_http) +inline void LinktqStatus::setHttpHeader(HttpResponseHeader const& cabecalho_http) { http_header_ = cabecalho_http; } -inline void LinkStatus::setStatusText(TQString const& status) +inline void LinktqStatus::setStatusText(TQString const& status) { Q_ASSERT(!status.isEmpty()); status_text_ = status; } -inline void LinkStatus::setError(TQString const& error) +inline void LinktqStatus::setError(TQString const& error) { Q_ASSERT(!error.isEmpty()); error_ = error; } -inline void LinkStatus::setErrorOccurred(bool houve_error) +inline void LinktqStatus::setErrorOccurred(bool houve_error) { error_occurred_ = houve_error; } -inline void LinkStatus::setIsRoot(bool flag) +inline void LinktqStatus::setIsRoot(bool flag) { is_root_ = flag; label_ = i18n("ROOT"); } -inline void LinkStatus::setRedirection(LinkStatus* redirection) +inline void LinktqStatus::setRedirection(LinktqStatus* redirection) { Q_ASSERT(redirection != NULL); Q_ASSERT(isRedirection()); redirection_ = redirection; } -inline void LinkStatus::setIsRedirection(bool e_redirection) +inline void LinktqStatus::setIsRedirection(bool e_redirection) { is_redirection_ = e_redirection; } -inline void LinkStatus::addChildNode(Node* node) +inline void LinktqStatus::addChildNode(Node* node) { - children_nodes_.push_back(node); + tqchildren_nodes_.push_back(node); } -inline void LinkStatus::reserveMemoryForChildrenNodes(int n) +inline void LinktqStatus::reserveMemoryForChildrenNodes(int n) { Q_ASSERT(n > 0); - children_nodes_.reserve(n); + tqchildren_nodes_.reserve(n); } -inline void LinkStatus::setChecked(bool flag) +inline void LinktqStatus::setChecked(bool flag) { checked_ = flag; } -inline void LinkStatus::setExternalDomainDepth(int p) +inline void LinktqStatus::setExternalDomainDepth(int p) { Q_ASSERT(p >= -1); external_domain_depth_ = p; } -inline void LinkStatus::setOnlyCheckHeader(bool flag) +inline void LinktqStatus::setOnlyCheckHeader(bool flag) { only_check_header_= flag; } -inline void LinkStatus::setHasBaseURI(bool flag) +inline void LinktqStatus::setHasBaseURI(bool flag) { has_base_URI_ = flag; } -inline void LinkStatus::setHasHtmlDocTitle(bool flag) +inline void LinktqStatus::setHasHtmlDocTitle(bool flag) { has_html_doc_title_ = flag; } -inline void LinkStatus::setBaseURI(KURL const& base_url) +inline void LinktqStatus::setBaseURI(KURL const& base_url) { if(!base_url.isValid()) { kdWarning(23100) << "base url not valid: " << endl - << "parent: " << parent()->absoluteUrl().prettyURL() << endl + << "tqparent: " << tqparent()->absoluteUrl().prettyURL() << endl << "url: " << absoluteUrl().prettyURL() << endl << "base url resolved: " << base_url.prettyURL() << endl; } @@ -186,7 +186,7 @@ inline void LinkStatus::setBaseURI(KURL const& base_url) base_URI_ = base_url; } -inline void LinkStatus::setHtmlDocTitle(TQString const& title) +inline void LinktqStatus::setHtmlDocTitle(TQString const& title) { if(title.isNull() || title.isEmpty()) { @@ -199,34 +199,34 @@ inline void LinkStatus::setHtmlDocTitle(TQString const& title) html_doc_title_ = title; } -inline void LinkStatus::setIgnored(bool flag) +inline void LinktqStatus::setIgnored(bool flag) { ignored_ = flag; } -inline void LinkStatus::setMimeType(TQString const& mimetype) +inline void LinktqStatus::setMimeType(TQString const& mimetype) { Q_ASSERT(!mimetype.isNull() && !mimetype.isEmpty()); mimetype_ = mimetype; } -inline void LinkStatus::setIsErrorPage(bool flag) +inline void LinktqStatus::setIsErrorPage(bool flag) { is_error_page_ = flag; } -inline void LinkStatus::setIsLocalRestrict(bool flag) +inline void LinktqStatus::setIsLocalRestrict(bool flag) { is_local_restrict_ = flag; } -inline void LinkStatus::setTreeViewItem(TreeViewItem* tree_view_item) +inline void LinktqStatus::setTreeViewItem(TreeViewItem* tree_view_item) { Q_ASSERT(tree_view_item); tree_view_item_ = tree_view_item; } -inline void LinkStatus::addReferrer(KURL const& url) +inline void LinktqStatus::addReferrer(KURL const& url) { Q_ASSERT(url.isValid()); @@ -236,67 +236,67 @@ inline void LinkStatus::addReferrer(KURL const& url) -inline KURL const& LinkStatus::rootUrl() const +inline KURL const& LinktqStatus::rootUrl() const { return root_url_; } -inline LinkStatus::Status const& LinkStatus::status() const +inline LinktqStatus::tqStatus const& LinktqStatus::status() const { return status_; } -inline uint LinkStatus::depth() const +inline uint LinktqStatus::depth() const { return depth_; } -inline bool LinkStatus::local() const +inline bool LinktqStatus::local() const { return external_domain_depth_ == -1; } -inline bool LinkStatus::isLocalRestrict() const +inline bool LinktqStatus::isLocalRestrict() const { return is_local_restrict_; } -inline LinkStatus const* LinkStatus::parent() const +inline LinktqStatus const* LinktqStatus::tqparent() const { - return parent_; + return tqparent_; } -inline TQString const& LinkStatus::originalUrl() const +inline TQString const& LinktqStatus::originalUrl() const { return original_url_; } -inline TQString const& LinkStatus::label() const +inline TQString const& LinktqStatus::label() const { return label_; } -inline KURL const& LinkStatus::absoluteUrl() const +inline KURL const& LinktqStatus::absoluteUrl() const { return absolute_url_; } -inline TQString const& LinkStatus::docHtml() const +inline TQString const& LinktqStatus::docHtml() const { return doc_html_; } -inline HttpResponseHeader const& LinkStatus::httpHeader() const +inline HttpResponseHeader const& LinktqStatus::httpHeader() const { return http_header_; } -inline HttpResponseHeader& LinkStatus::httpHeader() +inline HttpResponseHeader& LinktqStatus::httpHeader() { return http_header_; } -inline TQString LinkStatus::statusText() const +inline TQString LinktqStatus::statusText() const { if(errorOccurred()) return error(); @@ -314,103 +314,103 @@ inline TQString LinkStatus::statusText() const } } -inline TQString const& LinkStatus::error() const +inline TQString const& LinktqStatus::error() const { return error_; } -inline bool LinkStatus::isRoot() const +inline bool LinktqStatus::isRoot() const { return is_root_; } -inline bool LinkStatus::errorOccurred() const +inline bool LinktqStatus::errorOccurred() const { return error_occurred_; } -inline bool LinkStatus::isRedirection() const +inline bool LinktqStatus::isRedirection() const { return is_redirection_; } -inline LinkStatus* LinkStatus::redirection() const +inline LinktqStatus* LinktqStatus::redirection() const { Q_ASSERT(isRedirection()); return redirection_; } -inline Node* LinkStatus::node() const +inline Node* LinktqStatus::node() const { //Q_ASSERT(node_); return node_; } -inline vector<Node*> const& LinkStatus::childrenNodes() const +inline vector<Node*> const& LinktqStatus::tqchildrenNodes() const { - return children_nodes_; + return tqchildren_nodes_; } -inline bool LinkStatus::checked() const +inline bool LinktqStatus::checked() const { return checked_; } -inline int LinkStatus::externalDomainDepth() const +inline int LinktqStatus::externalDomainDepth() const { return external_domain_depth_; } -inline bool LinkStatus::onlyCheckHeader() const +inline bool LinktqStatus::onlyCheckHeader() const { return only_check_header_; } -inline bool LinkStatus::hasBaseURI() const +inline bool LinktqStatus::hasBaseURI() const { return has_base_URI_; } -inline bool LinkStatus::hasHtmlDocTitle() const +inline bool LinktqStatus::hasHtmlDocTitle() const { return has_html_doc_title_; } -inline KURL const& LinkStatus::baseURI() const +inline KURL const& LinktqStatus::baseURI() const { Q_ASSERT(hasBaseURI()); return base_URI_; } -inline TQString const& LinkStatus::htmlDocTitle() const +inline TQString const& LinktqStatus::htmlDocTitle() const { Q_ASSERT(has_html_doc_title_); return html_doc_title_; } -inline bool LinkStatus::ignored() const +inline bool LinktqStatus::ignored() const { return ignored_; } -inline TQString LinkStatus::mimeType() const +inline TQString LinktqStatus::mimeType() const { Q_ASSERT(!mimetype_.isNull()); return mimetype_; } -inline bool LinkStatus::isErrorPage() const +inline bool LinktqStatus::isErrorPage() const { return is_error_page_; } -inline TreeViewItem* LinkStatus::treeViewItem() const +inline TreeViewItem* LinktqStatus::treeViewItem() const { return tree_view_item_; } -inline TQValueVector<KURL> const& LinkStatus::referrers() const +inline TQValueVector<KURL> const& LinktqStatus::referrers() const { return referrers_; } diff --git a/klinkstatus/src/engine/searchmanager.cpp b/klinkstatus/src/engine/searchmanager.cpp index c64c3a89..3a34d04c 100644 --- a/klinkstatus/src/engine/searchmanager.cpp +++ b/klinkstatus/src/engine/searchmanager.cpp @@ -37,8 +37,8 @@ SearchManager::SearchManager(int max_simultaneous_connections, int time_out, - TQObject *parent, const char *name) - : TQObject(parent, name), + TQObject *tqparent, const char *name) + : TQObject(tqparent, 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), @@ -106,7 +106,7 @@ void SearchManager::cleanItems() ((search_results_[i])[j])[l] = 0; } else - kdDebug(23100) << "LinkStatus NULL!!" << endl; + kdDebug(23100) << "LinktqStatus NULL!!" << endl; } search_results_[i][j].clear(); } @@ -148,7 +148,7 @@ void SearchManager::startSearch(KURL const& root, SearchMode const& modo) searching_ = true; - //Q_ASSERT(domain_ != TQString::null); + //Q_ASSERT(domain_ != TQString()); checkRoot(); } @@ -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 LinkStatus *, LinkChecker *)), - this, TQT_SLOT(slotRootChecked(const LinkStatus *, LinkChecker *))); + connect(checker, TQT_SIGNAL(transactionFinished(const LinktqStatus *, LinkChecker *)), + this, TQT_SLOT(slotRootChecked(const LinktqStatus *, 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 LinkStatus * link, LinkChecker * checker) +void SearchManager::slotRootChecked(const LinktqStatus * link, LinkChecker * checker) { kdDebug(23100) << "SearchManager::slotRootChecked:" << endl; kdDebug(23100) << link->absoluteUrl().url() << " -> " << - LinkStatus::lastRedirection(&root_)->absoluteUrl().url() << endl; + LinktqStatus::lastRedirection(&root_)->absoluteUrl().url() << endl; Q_ASSERT(checked_links_ == 0); Q_ASSERT(search_results_.size() == 0); @@ -217,11 +217,11 @@ void SearchManager::slotRootChecked(const LinkStatus * link, LinkChecker * check { current_depth_ = 1; - vector<LinkStatus*> no = children(LinkStatus::lastRedirection(&root_)); + vector<LinktqStatus*> no = tqchildren(LinktqStatus::lastRedirection(&root_)); emit signalLinksToCheckTotalSteps(no.size()); - vector< vector<LinkStatus*> > nivel; + vector< vector<LinktqStatus*> > nivel; nivel.push_back(no); search_results_.push_back(nivel); @@ -255,14 +255,14 @@ void SearchManager::slotRootChecked(const LinkStatus * link, LinkChecker * check checker = 0; } -vector<LinkStatus*> SearchManager::children(LinkStatus* link) +vector<LinktqStatus*> SearchManager::tqchildren(LinktqStatus* link) { - vector<LinkStatus*> children; + vector<LinktqStatus*> tqchildren; if(!link || link->absoluteUrl().hasRef()) - return children; + return tqchildren; - vector<Node*> const& nodes = link->childrenNodes(); + vector<Node*> const& nodes = link->tqchildrenNodes(); int count = 0; for(uint i = 0; i != nodes.size(); ++i) @@ -278,12 +278,12 @@ vector<LinkStatus*> SearchManager::children(LinkStatus* link) if( (node->isLink() && checkable(url, *link) && - !Url::existUrl(url, children) && + !Url::existUrl(url, tqchildren) && !node->url().isEmpty()) || node->malformed() ) { - LinkStatus* ls = new LinkStatus(node, link); + LinktqStatus* ls = new LinktqStatus(node, link); ls->setAbsoluteUrl(url); if(localDomain(ls->absoluteUrl())) @@ -310,7 +310,7 @@ vector<LinkStatus*> SearchManager::children(LinkStatus* link) } Q_ASSERT(link->externalDomainDepth() <= external_domain_depth_); - children.push_back(ls); + tqchildren.push_back(ls); } if(count == 50) { @@ -319,7 +319,7 @@ vector<LinkStatus*> SearchManager::children(LinkStatus* link) } } - return children; + return tqchildren; } 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) { - LinkStatus* tmp = search_results_[i][j][l]; + LinktqStatus* 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; } -LinkStatus const* SearchManager::linkStatus(TQString const& s_url) const +LinktqStatus const* SearchManager::linktqStatus(TQString const& s_url) const { Q_ASSERT(!s_url.isEmpty()); @@ -366,7 +366,7 @@ LinkStatus const* SearchManager::linkStatus(TQString const& s_url) const { ++count; - LinkStatus* ls = search_results_[i][j][l]; + LinktqStatus* 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<LinkStatus*> const& no = nodeToAnalize(); + vector<LinktqStatus*> const& no = nodeToAnalize(); if((uint)current_index_ < no.size()) checkVectorLinks(no); @@ -442,7 +442,7 @@ void SearchManager::continueSearch() } } -vector<LinkStatus*> const& SearchManager::nodeToAnalize() const +vector<LinktqStatus*> 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<LinkStatus*> const& SearchManager::nodeToAnalize() const return (search_results_[current_depth_ - 1])[current_node_]; } -void SearchManager::checkVectorLinks(vector<LinkStatus*> const& links) +void SearchManager::checkVectorLinks(vector<LinktqStatus*> const& links) { checkLinksSimultaneously(chooseLinks(links)); } -vector<LinkStatus*> SearchManager::chooseLinks(vector<LinkStatus*> const& links) +vector<LinktqStatus*> SearchManager::chooseLinks(vector<LinktqStatus*> const& links) { - vector<LinkStatus*> escolha; + vector<LinktqStatus*> escolha; for(int i = 0; i != max_simultaneous_connections_; ++i) { if((uint)current_index_ < links.size()) @@ -466,7 +466,7 @@ vector<LinkStatus*> SearchManager::chooseLinks(vector<LinkStatus*> const& links) return escolha; } -void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) +void SearchManager::checkLinksSimultaneously(vector<LinktqStatus*> const& links) { Q_ASSERT(finished_connections_ <= max_simultaneous_connections_); finished_connections_ = 0; @@ -480,7 +480,7 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) for(uint i = 0; i != links.size(); ++i) { - LinkStatus* ls(links[i]); + LinktqStatus* ls(links[i]); Q_ASSERT(ls); TQString protocol = ls->absoluteUrl().protocol(); @@ -491,19 +491,19 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) if(ls->malformed()) { Q_ASSERT(ls->errorOccurred()); - Q_ASSERT(ls->status() == LinkStatus::MALFORMED); + Q_ASSERT(ls->status() == LinktqStatus::MALFORMED); ls->setChecked(true); slotLinkChecked(ls, 0); } - else if(ls->absoluteUrl().prettyURL().contains("javascript:", false)) + else if(ls->absoluteUrl().prettyURL().tqcontains("javascript:", false)) { ++ignored_links_; ls->setIgnored(true); ls->setErrorOccurred(true); ls->setError(i18n( "Javascript not supported" )); - ls->setStatus(LinkStatus::NOT_SUPPORTED); + ls->settqStatus(LinktqStatus::NOT_SUPPORTED); ls->setChecked(true); slotLinkChecked(ls, 0); } @@ -513,8 +513,8 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) ++ignored_links_; ls->setIgnored(true); ls->setErrorOccurred(true); - ls->setError(i18n("Protocol %1 not supported").arg(protocol)); - ls->setStatus(LinkStatus::MALFORMED); + ls->setError(i18n("Protocol %1 not supported").tqarg(protocol)); + ls->settqStatus(LinktqStatus::MALFORMED); ls->setChecked(true); slotLinkChecked(ls, 0); } @@ -524,8 +524,8 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) LinkChecker* checker = new LinkChecker(ls, time_out_, this, "link_checker"); checker->setSearchManager(this); - connect(checker, TQT_SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)), - this, TQT_SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *))); + connect(checker, TQT_SIGNAL(transactionFinished(const LinktqStatus *, LinkChecker *)), + this, TQT_SLOT(slotLinkChecked(const LinktqStatus *, LinkChecker *))); /* connect(checker, TQT_SIGNAL(jobFinnished(LinkChecker *)), this, TQT_SLOT(slotLinkCheckerFinnished(LinkChecker *))); @@ -535,11 +535,11 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links) } } -void SearchManager::slotLinkChecked(const LinkStatus * link, LinkChecker * checker) +void SearchManager::slotLinkChecked(const LinktqStatus * link, LinkChecker * checker) { kdDebug(23100) << "SearchManager::slotLinkChecked:" << endl; // kdDebug(23100) << link->absoluteUrl().url() << " -> " << -// LinkStatus::lastRedirection((const_cast<LinkStatus*> (link)))->absoluteUrl().url() << endl; +// LinktqStatus::lastRedirection((const_cast<LinktqStatus*> (link)))->absoluteUrl().url() << endl; Q_ASSERT(link); emit signalLinkChecked(link, checker); @@ -569,8 +569,8 @@ void SearchManager::slotLinkChecked(const LinkStatus * link, LinkChecker * check void SearchManager::addLevel() { - search_results_.push_back(vector< vector <LinkStatus*> >()); - vector< vector <LinkStatus*> >& ultimo_nivel(search_results_[search_results_.size() - 2]); + search_results_.push_back(vector< vector <LinktqStatus*> >()); + vector< vector <LinktqStatus*> >& 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 <LinkStatus*> f(children( LinkStatus::lastRedirection(((ultimo_nivel[i])[j])) )); + vector <LinktqStatus*> f(tqchildren( LinktqStatus::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, LinkStatus const& link_parent) const +bool SearchManager::checkable(KURL const& url, LinktqStatus const& link_parent) const { if(existUrl(url, link_parent.absoluteUrl())) return false; @@ -618,7 +618,7 @@ bool SearchManager::checkable(KURL const& url, LinkStatus const& link_parent) co if(!check_parent_dirs_) { - if(Url::parentDir(root_.absoluteUrl(), url)) + if(Url::tqparentDir(root_.absoluteUrl(), url)) return false; } if(!check_external_links_) @@ -638,7 +638,7 @@ bool SearchManager::checkable(KURL const& url, LinkStatus const& link_parent) co return true; } -bool SearchManager::checkableByDomain(KURL const& url, LinkStatus const& link_parent) const +bool SearchManager::checkableByDomain(KURL const& url, LinktqStatus const& link_parent) const { bool result = false; if(localDomain(url)) @@ -749,7 +749,7 @@ bool SearchManager::generalDomain() const if(!check_parent_dirs_) return false; - int barra = domain_.find('/'); + int barra = domain_.tqfind('/'); if(barra != -1 && (uint)barra != domain_.length() - 1) { kdDebug(23100) << "Domain nao vago" << endl; @@ -781,7 +781,7 @@ bool SearchManager::generalDomain() const } } -bool SearchManager::onlyCheckHeader(LinkStatus* ls) const +bool SearchManager::onlyCheckHeader(LinktqStatus* 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->linkStatus()->checked()); + //Q_ASSERT(checker->linktqStatus()->checked()); delete checker; checker = 0; @@ -813,7 +813,7 @@ void SearchManager::slotLinkCheckerFinnished(LinkChecker * checker) KHTMLPart* SearchManager::htmlPart(TQString const& key_url) const { - if(!html_parts_.contains(key_url)) + if(!html_parts_.tqcontains(key_url)) return 0; return html_parts_[key_url]; @@ -891,7 +891,7 @@ void SearchManager::save(TQDomElement& element) const { for(uint l = 0; l != (search_results_[i])[j].size(); ++l) { - LinkStatus* ls = ((search_results_[i])[j])[l]; + LinktqStatus* ls = ((search_results_[i])[j])[l]; if(ls->checked()) ls->save(child_element); } diff --git a/klinkstatus/src/engine/searchmanager.h b/klinkstatus/src/engine/searchmanager.h index 5f2410ac..e977eae4 100644 --- a/klinkstatus/src/engine/searchmanager.h +++ b/klinkstatus/src/engine/searchmanager.h @@ -18,8 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef GESTOR_PESQUISA_H -#define GESTOR_PESQUISA_H +#ifndef GESTOR_PESTQUISA_H +#define GESTOR_PESTQUISA_H #include <kurl.h> @@ -41,9 +41,10 @@ using namespace std; typedef TQMap<TQString, KHTMLPart*> KHTMLPartMap; -class SearchManager: public QObject +class SearchManager: public TQObject { Q_OBJECT + TQ_OBJECT public: @@ -54,7 +55,7 @@ public: }; SearchManager(int max_simultaneous_connections = 3, int time_out = 50, - TQObject *parent = 0, const char *name = 0); + TQObject *tqparent = 0, const char *name = 0); ~SearchManager(); TQString toXML() const; @@ -94,12 +95,12 @@ 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(TQString const& s_url) const; + LinktqStatus const* linktqStatus(TQString const& s_url) const; int checkedLinks() const; TQTime timeElapsed() const; bool checkParentDirs() const; bool checkExternalLinks() const; - LinkStatus const* linkStatusRoot() const; + LinktqStatus const* linkStatusRoot() const; int maxSimultaneousConnections() const; int timeOut() const; @@ -109,20 +110,20 @@ public: private: void checkRoot(); - void checkVectorLinks(vector<LinkStatus*> const& links); // corresponde a um no de um nivel de depth - vector<LinkStatus*> children(LinkStatus* link); + void checkVectorLinks(vector<LinktqStatus*> const& links); // corresponde a um no de um nivel de depth + vector<LinktqStatus*> tqchildren(LinktqStatus* link); void startSearch(); void continueSearch(); void finnish(); void pause(); - vector<LinkStatus*> const& nodeToAnalize() const; - vector<LinkStatus*> chooseLinks(vector<LinkStatus*> const& links); - void checkLinksSimultaneously(vector<LinkStatus*> const& links); + vector<LinktqStatus*> const& nodeToAnalize() const; + vector<LinktqStatus*> chooseLinks(vector<LinktqStatus*> const& links); + void checkLinksSimultaneously(vector<LinktqStatus*> const& links); void addLevel(); - bool checkableByDomain(KURL const& url, LinkStatus const& link_parent) const; - bool checkable(KURL const& url, LinkStatus const& link_parent) const; + bool checkableByDomain(KURL const& url, LinktqStatus const& link_parent) const; + bool checkable(KURL const& url, LinktqStatus const& link_parent) const; int maximumCurrentConnections() const; - bool onlyCheckHeader(LinkStatus* ls) const; + bool onlyCheckHeader(LinktqStatus* ls) const; /* Entende-se por domain vago um domain do tipo www.google.pt ou google.pt, pelo que, @@ -134,15 +135,15 @@ private: private slots: - void slotRootChecked(const LinkStatus * link, LinkChecker * checker); - void slotLinkChecked(const LinkStatus * link, LinkChecker * checker); + void slotRootChecked(const LinktqStatus * link, LinkChecker * checker); + void slotLinkChecked(const LinktqStatus * link, LinkChecker * checker); void slotSearchFinished(); void slotLinkCheckerFinnished(LinkChecker * checker); signals: - void signalRootChecked(const LinkStatus * link, LinkChecker * checker); - void signalLinkChecked(const LinkStatus * link, LinkChecker * checker); + void signalRootChecked(const LinktqStatus * link, LinkChecker * checker); + void signalLinkChecked(const LinktqStatus * link, LinkChecker * checker); void signalSearchFinished(); void signalSearchPaused(); void signalAddingLevelTotalSteps(uint number_of_links); @@ -154,7 +155,7 @@ private: int max_simultaneous_connections_; SearchMode search_mode_; - LinkStatus root_; + LinktqStatus root_; bool has_document_root_; KURL document_root_url_; // in case of non http protocols the document root must be explicitly given int depth_; @@ -184,7 +185,7 @@ private: bool check_regular_expressions_; uint number_of_level_links_; uint number_of_links_to_check_; - vector< vector< vector <LinkStatus*> > > search_results_; + vector< vector< vector <LinktqStatus*> > > search_results_; KHTMLPartMap html_parts_; }; diff --git a/klinkstatus/src/engine/searchmanager_impl.h b/klinkstatus/src/engine/searchmanager_impl.h index e472ccbb..0342428a 100644 --- a/klinkstatus/src/engine/searchmanager_impl.h +++ b/klinkstatus/src/engine/searchmanager_impl.h @@ -67,7 +67,7 @@ inline void SearchManager::setExternalDomainDepth(int depth) inline void SearchManager::setDomain(TQString const& domain) { - Q_ASSERT(domain.find("http://") == -1); + Q_ASSERT(domain.tqfind("http://") == -1); domain_ = domain; general_domain_ = generalDomain(); checked_general_domain_ = true; @@ -111,7 +111,7 @@ inline bool SearchManager::checkExternalLinks() const return check_external_links_; } -inline LinkStatus const* SearchManager::linkStatusRoot() const +inline LinktqStatus const* SearchManager::linkStatusRoot() const { return &root_; } diff --git a/klinkstatus/src/global.cpp b/klinkstatus/src/global.cpp index cfbfe910..9fe9d96d 100644 --- a/klinkstatus/src/global.cpp +++ b/klinkstatus/src/global.cpp @@ -40,8 +40,8 @@ Global* Global::self() return m_self_; } -Global::Global(TQObject *parent, const char *name) - : TQObject(parent, name), loop_started_(false) +Global::Global(TQObject *tqparent, const char *name) + : TQObject(tqparent, name), loop_started_(false) { m_self_ = this; dcop_client_ = kapp->dcopClient(); @@ -176,7 +176,7 @@ void Global::execCommand(TQString const& command) void Global::slotGetScriptOutput(KProcess* /*process*/, char* buf, int buflen) { TQCString tmp( buf, buflen + 1 ); - script_output_ = TQString::null; + script_output_ = TQString(); script_output_ = TQString::fromLocal8Bit(tmp).remove(" "); } diff --git a/klinkstatus/src/global.h b/klinkstatus/src/global.h index d93e17f4..1e465404 100644 --- a/klinkstatus/src/global.h +++ b/klinkstatus/src/global.h @@ -22,9 +22,10 @@ class KProcess; /** @author Paulo Moura Guedes */ -class Global : public QObject +class Global : public TQObject { Q_OBJECT + TQ_OBJECT public: static Global* self(); ~Global(); @@ -39,7 +40,7 @@ public: static void openQuanta(TQStringList const& args); private: - Global(TQObject *parent = 0, const char *name = 0); + Global(TQObject *tqparent = 0, const char *name = 0); static void execCommand(TQString const& command); private slots: diff --git a/klinkstatus/src/klinkstatus.cpp b/klinkstatus/src/klinkstatus.cpp index 8628cd57..6c8a8dbe 100644 --- a/klinkstatus/src/klinkstatus.cpp +++ b/klinkstatus/src/klinkstatus.cpp @@ -54,7 +54,7 @@ KLinkStatus::KLinkStatus() { // now that the Part is loaded, we cast it to a Part to get // our hands on it - m_part = static_cast<KParts::ReadOnlyPart *>(factory->create(this, + m_part = static_cast<KParts::ReadOnlyPart *>(factory->create(TQT_TQOBJECT(this), "klinkstatus_part", "KParts::ReadOnlyPart" )); if (m_part) @@ -113,13 +113,13 @@ void KLinkStatus::setupActions() administration. The easiest solution is to call close() on the mainwindow instead of KApplication::quit()*/ - KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); //m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection()); //m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection()); - KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); } void KLinkStatus::setupPartActions() diff --git a/klinkstatus/src/klinkstatus.h b/klinkstatus/src/klinkstatus.h index 14ba2934..02463f81 100644 --- a/klinkstatus/src/klinkstatus.h +++ b/klinkstatus/src/klinkstatus.h @@ -41,6 +41,7 @@ class KToggleAction; class KLinkStatus : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: KLinkStatus(); virtual ~KLinkStatus(); diff --git a/klinkstatus/src/klinkstatus.lsm b/klinkstatus/src/klinkstatus.lsm index 94221faf..0cc4c0c1 100644 --- a/klinkstatus/src/klinkstatus.lsm +++ b/klinkstatus/src/klinkstatus.lsm @@ -1,5 +1,5 @@ Begin3 -Title: KLinkStatus -- Some description +Title: KLinktqStatus -- Some description Version: 0.2.1 Entered-date: Description: diff --git a/klinkstatus/src/klinkstatus_part.cpp b/klinkstatus/src/klinkstatus_part.cpp index 6d8df6a8..e6ce9776 100644 --- a/klinkstatus/src/klinkstatus_part.cpp +++ b/klinkstatus/src/klinkstatus_part.cpp @@ -55,10 +55,10 @@ const char KLinkStatusPart::version_[] = "0.3.2"; typedef KParts::GenericFactory<KLinkStatusPart> KLinkStatusFactory; K_EXPORT_COMPONENT_FACTORY( libklinkstatuspart, KLinkStatusFactory ) -KLinkStatusPart::KLinkStatusPart(TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, +KLinkStatusPart::KLinkStatusPart(TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList & /*string_list*/) - : KParts::ReadOnlyPart(parent, name), m_dlgAbout(0) + : KParts::ReadOnlyPart(tqparent, name), m_dlgAbout(0) { setInstance(KLinkStatusFactory::instance()); @@ -66,7 +66,7 @@ KLinkStatusPart::KLinkStatusPart(TQWidget *parentWidget, const char *widgetName, ActionManager::setInstance(action_manager_); initGUI(); - tabwidget_ = new TabWidgetSession(parentWidget, widgetName); + tabwidget_ = new TabWidgetSession(tqparentWidget, widgetName); setWidget(tabwidget_); action_manager_->initTabWidget(tabwidget_); diff --git a/klinkstatus/src/klinkstatus_part.h b/klinkstatus/src/klinkstatus_part.h index e1968d6d..1e7f1009 100644 --- a/klinkstatus/src/klinkstatus_part.h +++ b/klinkstatus/src/klinkstatus_part.h @@ -37,9 +37,10 @@ class KAction; class KLinkStatusPart: public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: - KLinkStatusPart(TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, + KLinkStatusPart(TQWidget *tqparentWidget, const char *widgetName, + TQObject *tqparent, const char *name, const TQStringList& args); virtual ~KLinkStatusPart(); diff --git a/klinkstatus/src/parser/htmlparser.cpp b/klinkstatus/src/parser/htmlparser.cpp index 557d0d25..ebe8e362 100644 --- a/klinkstatus/src/parser/htmlparser.cpp +++ b/klinkstatus/src/parser/htmlparser.cpp @@ -131,11 +131,11 @@ int HtmlParser::endOfTag(TQString const& s, int index, TQChar end_of_tag) if( (uint)index >= s.length() ) return -1; - int _end_of_tag = s.find(end_of_tag, index); + int _end_of_tag = s.tqfind(end_of_tag, index); if(_end_of_tag == -1) return _end_of_tag; - int open_aspas = s.find('"', index); + int open_aspas = s.tqfind('"', index); if(open_aspas == -1) return _end_of_tag + 1; @@ -147,7 +147,7 @@ int HtmlParser::endOfTag(TQString const& s, int index, TQChar end_of_tag) else { - int close_aspas = s.find('"', open_aspas + 1); + int close_aspas = s.tqfind('"', open_aspas + 1); if(close_aspas != -1) return endOfTag(s, close_aspas + 1, end_of_tag); else @@ -202,7 +202,7 @@ void HtmlParser::parseNodesOfTypeMETA() NodeMETA* node = new NodeMETA(aux[i]); nodes_.push_back(node); - if(!is_content_type_set_ && node->atributoHTTP_EQUIV().lower() == TQString("Content-Type").lower()) { + if(!is_content_type_set_ && node->atributoHTTP_ETQUIV().lower() == TQString("Content-Type").lower()) { is_content_type_set_ = true; node_META_content_type_.setNode(aux[i]); } @@ -218,7 +218,7 @@ TQString HtmlParser::findCharsetInMetaElement(TQString const& html) { NodeMETA node(metaTags[i]); - if(node.atributoHTTP_EQUIV().lower() == TQString("Content-Type").lower()) { + if(node.atributoHTTP_ETQUIV().lower() == TQString("Content-Type").lower()) { return node.charset(); } } @@ -259,7 +259,7 @@ void HtmlParser::parseNodesOfTypeBASE() if(inicio == -1 || !doc[inicio].isSpace()) return; - fim = doc.find(">", inicio); + fim = doc.tqfind(">", inicio); if(fim == -1) return; @@ -375,7 +375,7 @@ void HtmlParser::mostra() const { if(nodes_[i]->element() == Node::META) { -#if defined Q_WS_WIN +#if defined TQ_WS_WIN NodeMETA* nm = (NodeMETA*)nodes_[i]; #else @@ -383,7 +383,7 @@ void HtmlParser::mostra() const #endif kdDebug(23100) << nm->url() << endl - << nm->atributoHTTP_EQUIV() << endl + << nm->atributoHTTP_ETQUIV() << endl << nm->atributoNAME() << endl << nm->atributoCONTENT() << endl; } diff --git a/klinkstatus/src/parser/http.cpp b/klinkstatus/src/parser/http.cpp index 6e086739..0a62a9a2 100644 --- a/klinkstatus/src/parser/http.cpp +++ b/klinkstatus/src/parser/http.cpp @@ -34,8 +34,8 @@ void HttpResponseHeader::parseLocation() int location = findWord(cabecalho, "Location: "); Q_ASSERT(location != -1); - int fim_de_linha_1 = cabecalho.find('\n', location); - int fim_de_linha_2 = cabecalho.find('\r', location); + int fim_de_linha_1 = cabecalho.tqfind('\n', location); + int fim_de_linha_2 = cabecalho.tqfind('\r', location); Q_ASSERT(fim_de_linha_1 != -1 || fim_de_linha_2 != -1); @@ -67,11 +67,11 @@ TQString HttpResponseHeader::charset(TQString const& contentTypeHttpHeaderLine) if(contentTypeHttpHeaderLine.isEmpty()) return _charset; - int index = contentTypeHttpHeaderLine.find("charset="); + int index = contentTypeHttpHeaderLine.tqfind("charset="); if(index != -1) index += TQString("charset=").length(); else { - index = contentTypeHttpHeaderLine.find("charset:"); + index = contentTypeHttpHeaderLine.tqfind("charset:"); if(index != -1) index += TQString("charset:").length(); } diff --git a/klinkstatus/src/parser/http.h b/klinkstatus/src/parser/http.h index b955d25d..2ad81012 100644 --- a/klinkstatus/src/parser/http.h +++ b/klinkstatus/src/parser/http.h @@ -25,7 +25,7 @@ #include <tqstring.h> -class HttpResponseHeader: public QHttpResponseHeader +class HttpResponseHeader: public TQHttpResponseHeader { public: diff --git a/klinkstatus/src/parser/mstring.cpp b/klinkstatus/src/parser/mstring.cpp index aa2cdec7..f84c5809 100644 --- a/klinkstatus/src/parser/mstring.cpp +++ b/klinkstatus/src/parser/mstring.cpp @@ -28,7 +28,7 @@ using namespace std; int findWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice) { - int indice = s.find(palavra, a_partir_do_indice, false); + int indice = s.tqfind(palavra, a_partir_do_indice, false); if(indice == -1) return indice; @@ -38,7 +38,7 @@ int findWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice int findChar(TQString const& s, TQChar letra, uint a_partir_do_indice) { - int index = s.find(letra, a_partir_do_indice, false); + int index = s.tqfind(letra, a_partir_do_indice, false); if(index == -1) return index; else @@ -173,7 +173,7 @@ vector<TQString> tokenizeWordsSeparatedByDots(TQString s) if(inicio == -1) return v; - int fim = s.find('.', inicio); + int fim = s.tqfind('.', inicio); if(fim == -1) { v.push_back(s.mid(inicio)); @@ -200,7 +200,7 @@ vector<TQString> tokenizeWordsSeparatedBy(TQString s, TQChar criteria) if(inicio == -1) return v; - int fim = s.find(criteria, inicio); + int fim = s.tqfind(criteria, inicio); if(fim == -1) { v.push_back(s.mid(inicio)); diff --git a/klinkstatus/src/parser/node.cpp b/klinkstatus/src/parser/node.cpp index cb5fdec4..ad5ce064 100644 --- a/klinkstatus/src/parser/node.cpp +++ b/klinkstatus/src/parser/node.cpp @@ -39,19 +39,19 @@ TQString Node::getAttribute(TQString const& atributo) { if(content_[inicio] == '"') { - fim = content_.find("\"", inicio + 1); + fim = content_.tqfind("\"", inicio + 1); tem_aspas_ou_plicas = true; } else if(content_[inicio] == '\'') { - fim = content_.find("'", inicio + 1); + fim = content_.tqfind("'", inicio + 1); tem_aspas_ou_plicas = true; } else { int fim_bloco = nextSpaceChar(content_, inicio + 1); - int fim_tag = content_.find(">", inicio + 1); - int fim_aspas = content_.find("\"", inicio + 1); + int fim_tag = content_.tqfind(">", inicio + 1); + int fim_aspas = content_.tqfind("\"", inicio + 1); if(fim_bloco == -1 && fim_tag == -1 && fim_aspas == -1) { @@ -137,7 +137,7 @@ void NodeLink::parseLinkLabel() do { - fim_tag = content_.find(">", fim_tag); + fim_tag = content_.tqfind(">", fim_tag); if(fim_tag != -1) proximo_caractere = TQChar(content_[++fim_tag]); @@ -147,7 +147,7 @@ void NodeLink::parseLinkLabel() if(fim_tag != -1) { - int fim_label = content_.find("<", fim_tag); + int fim_label = content_.tqfind("<", fim_tag); if(fim_label != -1) { @@ -166,7 +166,7 @@ void NodeLink::parseLinkLabel() void NodeMETA::parseAttributeURL() { if(attribute_http_equiv_.isEmpty()) - parseAttributeHTTP_EQUIV(); + parseAttributeHTTP_ETQUIV(); if(upperCase(attribute_http_equiv_) == "REFRESH") { @@ -183,7 +183,7 @@ void NodeMETA::parseAttributeURL() int aspas = -1; do { - aspas = attribute_url_.find("\""); + aspas = attribute_url_.tqfind("\""); if(aspas != -1) attribute_url_.remove(aspas, 1); } @@ -206,7 +206,7 @@ TQString NodeMETA::charset() const if(content.isEmpty()) return charset; - int index = content.find("charset="); + int index = content.tqfind("charset="); if(index != -1) { index += TQString("charset=").length(); diff --git a/klinkstatus/src/parser/node.h b/klinkstatus/src/parser/node.h index 0452c219..c3ecdcaa 100644 --- a/klinkstatus/src/parser/node.h +++ b/klinkstatus/src/parser/node.h @@ -166,7 +166,7 @@ public: virtual TQString const& url() const; virtual const TQString& linkLabel() const; virtual bool isLink() const; - TQString const& atributoHTTP_EQUIV() const; + TQString const& atributoHTTP_ETQUIV() const; TQString const& atributoNAME() const; TQString const& atributoCONTENT() const; TQString charset() const; @@ -176,13 +176,13 @@ public: private: /** - Procura se existem os atributos HTTP-EQUIV=Refresh e URL=... + Procura se existem os atributos HTTP-ETQUIV=Refresh e URL=... Se existir considera o content do atributo URL como um link. - ex: <META HTTP-EQUIV=Refresh CONTENT="10; URL=http://www.htmlhelp.com/"> + ex: <META HTTP-ETQUIV=Refresh CONTENT="10; URL=http://www.htmlhelp.com/"> */ void parseAttributeURL(); - void parseAttributeHTTP_EQUIV(); + void parseAttributeHTTP_ETQUIV(); void parseAttributeNAME(); void parseAttributeCONTENT(); diff --git a/klinkstatus/src/parser/node_impl.h b/klinkstatus/src/parser/node_impl.h index 97224bd5..f1ebed13 100644 --- a/klinkstatus/src/parser/node_impl.h +++ b/klinkstatus/src/parser/node_impl.h @@ -214,7 +214,7 @@ inline bool NodeMETA::isLink() const return false; } -inline TQString const& NodeMETA::atributoHTTP_EQUIV() const +inline TQString const& NodeMETA::atributoHTTP_ETQUIV() const { return attribute_http_equiv_; } @@ -237,16 +237,16 @@ inline bool NodeMETA::isRedirection() const inline void NodeMETA::parse() { - parseAttributeHTTP_EQUIV(); + parseAttributeHTTP_ETQUIV(); parseAttributeNAME(); parseAttributeCONTENT(); parseAttributeURL(); } -inline void NodeMETA::parseAttributeHTTP_EQUIV() +inline void NodeMETA::parseAttributeHTTP_ETQUIV() { - attribute_http_equiv_ = getAttribute("HTTP-EQUIV="); + attribute_http_equiv_ = getAttribute("HTTP-ETQUIV="); } inline void NodeMETA::parseAttributeNAME() @@ -378,12 +378,12 @@ inline NodeTITLE::NodeTITLE(TQString const& content) inline TQString const& NodeTITLE::url() const { - return TQString::null; + return TQString(); } inline TQString const& NodeTITLE::linkLabel() const { - return TQString::null; + return TQString(); } inline void NodeTITLE::parse() @@ -404,8 +404,8 @@ inline TQString const& NodeTITLE::attributeTITLE() const inline void NodeTITLE::parseAttributeTITLE() { attribute_title_ = content_; - attribute_title_.replace("<TITLE>", "", false); - attribute_title_.replace("</TITLE>", "", false); + attribute_title_.tqreplace("<TITLE>", "", false); + attribute_title_.tqreplace("</TITLE>", "", false); attribute_title_.stripWhiteSpace(); //kdDebug(23100) << "TITLE: " << attribute_title_ << endl; diff --git a/klinkstatus/src/parser/url.cpp b/klinkstatus/src/parser/url.cpp index 966bd509..164b54a6 100644 --- a/klinkstatus/src/parser/url.cpp +++ b/klinkstatus/src/parser/url.cpp @@ -39,13 +39,13 @@ Node::LinkType Url::resolveLinkType(TQString const& url) return Node::file_href; else if(findWord(KCharsets::resolveEntities(url), "MAILTO:") != -1) return Node::mailto; - else if( (int)url.find(":/") != -1) + else if( (int)url.tqfind(":/") != -1) return Node::href; else return Node::relative; } -KURL Url::normalizeUrl(TQString const& string_url, LinkStatus const& link_parent, TQString const& document_root) +KURL Url::normalizeUrl(TQString const& string_url, LinktqStatus const& link_parent, TQString const& document_root) { TQString _string_url = string_url.stripWhiteSpace(); @@ -124,7 +124,7 @@ KURL Url::normalizeUrl(TQString const& string_url) } } -bool Url::existUrl(KURL const& url, vector<LinkStatus*> const& v) +bool Url::existUrl(KURL const& url, vector<LinktqStatus*> const& v) { if(url.prettyURL().isEmpty()) return true; @@ -248,7 +248,7 @@ bool Url::hasProtocol(TQString const& url) /** http://linkstatus.paradigma.co.pt/en/index.html&bix=bix -> /en/index.html&bix=bix */ -TQString Url::convertToLocal(LinkStatus const* ls) +TQString Url::convertToLocal(LinktqStatus const* ls) { KURL url = ls->absoluteUrl(); KURL base_url = ls->rootUrl(); @@ -294,9 +294,9 @@ bool Url::localDomain(KURL const& url1, KURL const& url2, bool restrict) } /** - Returns true if url2 is a parent of url1. + Returns true if url2 is a tqparent of url1. */ -bool Url::parentDir(KURL const& url1, KURL const& url2) +bool Url::tqparentDir(KURL const& url1, KURL const& url2) { if(url1.protocol() != url2.protocol()) return false; diff --git a/klinkstatus/src/parser/url.h b/klinkstatus/src/parser/url.h index 8e13d812..0f704783 100644 --- a/klinkstatus/src/parser/url.h +++ b/klinkstatus/src/parser/url.h @@ -32,20 +32,20 @@ using namespace std; -class LinkStatus; +class LinktqStatus; namespace Url { Node::LinkType resolveLinkType(TQString const& url); -KURL normalizeUrl(TQString const& string_url, LinkStatus const& link_parent, TQString const& document_root); +KURL normalizeUrl(TQString const& string_url, LinktqStatus const& link_parent, TQString const& document_root); KURL normalizeUrl(TQString const& string_url); bool validUrl(KURL const& url); -bool existUrl(KURL const& url, vector<LinkStatus*> const& v); +bool existUrl(KURL const& url, vector<LinktqStatus*> const& v); bool equalHost(TQString const& host1, TQString const& host2, bool restrict = false); bool hasProtocol(TQString const& url); -TQString convertToLocal(LinkStatus const* ls); +TQString convertToLocal(LinktqStatus const* ls); bool localDomain(KURL const& url1, KURL const& url2, bool restrict = true); -bool parentDir(KURL const& url1, KURL const& url2); +bool tqparentDir(KURL const& url1, KURL const& url2); bool externalLink(KURL const& url1, KURL const& url2, bool restrict = true); } diff --git a/klinkstatus/src/ui/celltooltip.h b/klinkstatus/src/ui/celltooltip.h index 24303adb..4f0e850d 100644 --- a/klinkstatus/src/ui/celltooltip.h +++ b/klinkstatus/src/ui/celltooltip.h @@ -26,7 +26,7 @@ class TableLinkstatus; -class CellToolTip: public QToolTip +class CellToolTip: public TQToolTip { public: diff --git a/klinkstatus/src/ui/documentrootdialog.cpp b/klinkstatus/src/ui/documentrootdialog.cpp index 8c55519e..622faedf 100644 --- a/klinkstatus/src/ui/documentrootdialog.cpp +++ b/klinkstatus/src/ui/documentrootdialog.cpp @@ -28,8 +28,8 @@ #include <tqlabel.h> -DocumentRootDialog::DocumentRootDialog(TQWidget *parent, TQString const& url) - : KDialogBase(parent, "DocumentRootDialog", true, "Choose a Document Root", +DocumentRootDialog::DocumentRootDialog(TQWidget *tqparent, TQString const& url) + : KDialogBase(tqparent, "DocumentRootDialog", true, "Choose a Document Root", KDialogBase::Ok, KDialogBase::Ok, true), m_url(url) { diff --git a/klinkstatus/src/ui/documentrootdialog.h b/klinkstatus/src/ui/documentrootdialog.h index 09657851..cf531e51 100644 --- a/klinkstatus/src/ui/documentrootdialog.h +++ b/klinkstatus/src/ui/documentrootdialog.h @@ -30,8 +30,9 @@ class KURLRequester; class DocumentRootDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - DocumentRootDialog(TQWidget *parent, TQString const& url); + DocumentRootDialog(TQWidget *tqparent, TQString const& url); ~DocumentRootDialog(); void setUrl(const TQString& theValue) { m_url = theValue; } diff --git a/klinkstatus/src/ui/klshistorycombo.cpp b/klinkstatus/src/ui/klshistorycombo.cpp index 10fc7900..bcfef44c 100644 --- a/klinkstatus/src/ui/klshistorycombo.cpp +++ b/klinkstatus/src/ui/klshistorycombo.cpp @@ -24,8 +24,8 @@ bool KLSHistoryCombo::items_saved_ = false; -KLSHistoryCombo::KLSHistoryCombo(TQWidget *parent, const char *name) - : KHistoryCombo(parent, name) +KLSHistoryCombo::KLSHistoryCombo(TQWidget *tqparent, const char *name) + : KHistoryCombo(tqparent, name) { setMaxCount(KLSConfig::maxCountComboUrl()); @@ -76,15 +76,15 @@ void KLSHistoryCombo::loadItems() bool KLSHistoryCombo::eventFilter( TQObject *o, TQEvent *ev ) { - // Handle Ctrl+Del/Backspace etc better than the Qt widget, which always + // Handle Ctrl+Del/Backspace etc better than the TQt widget, which always // jumps to the next whitespace. TQLineEdit *edit = lineEdit(); - if ( o == edit ) + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(edit) ) { int type = ev->type(); if ( type == TQEvent::KeyPress ) { - TQKeyEvent *e = static_cast<TQKeyEvent *>( ev ); + TQKeyEvent *e = TQT_TQKEYEVENT( ev ); if ( e->key() == Key_Return || e->key() == Key_Enter ) { @@ -116,7 +116,7 @@ bool KLSHistoryCombo::eventFilter( TQObject *o, TQEvent *ev ) } /* - Handle Ctrl+Cursor etc better than the Qt widget, which always + Handle Ctrl+Cursor etc better than the TQt widget, which always jumps to the next whitespace. This code additionally jumps to the next [/#?:], which makes more sense for URLs. The list of chars that will stop the cursor are '/', '.', '?', '#', ':'. @@ -143,7 +143,7 @@ void KLSHistoryCombo::selectWord(TQKeyEvent *e) if( allow_space_break && text[pos].isSpace() && count > 1 ) break; } - while( pos >= 0 && (chars.findIndex(text[pos]) == -1 || count <= 1) ); + while( pos >= 0 && (chars.tqfindIndex(text[pos]) == -1 || count <= 1) ); if( e->state() & ShiftButton ) { @@ -172,7 +172,7 @@ void KLSHistoryCombo::selectWord(TQKeyEvent *e) if( allow_space_break && text[pos].isSpace() ) break; } - while( pos < (int) text.length() && chars.findIndex(text[pos]) == -1 ); + while( pos < (int) text.length() && chars.tqfindIndex(text[pos]) == -1 ); if( e->state() & ShiftButton ) { diff --git a/klinkstatus/src/ui/klshistorycombo.h b/klinkstatus/src/ui/klshistorycombo.h index 1215c3d9..4627f55a 100644 --- a/klinkstatus/src/ui/klshistorycombo.h +++ b/klinkstatus/src/ui/klshistorycombo.h @@ -22,9 +22,10 @@ Based on KonqCombo class KLSHistoryCombo : public KHistoryCombo { Q_OBJECT + TQ_OBJECT public: - KLSHistoryCombo(TQWidget* parent, const char* name); + KLSHistoryCombo(TQWidget* tqparent, const char* name); ~KLSHistoryCombo(); void init(); diff --git a/klinkstatus/src/ui/resultssearchbar.cpp b/klinkstatus/src/ui/resultssearchbar.cpp index 11ec6134..8d039558 100644 --- a/klinkstatus/src/ui/resultssearchbar.cpp +++ b/klinkstatus/src/ui/resultssearchbar.cpp @@ -42,46 +42,46 @@ class ResultsSearchBar::ResultsSearchBarPrivate { public: ResultsSearchBarPrivate() - : layout(0), searchLine(0), searchCombo(0), delay(400), m_lastComboIndex(0) + : tqlayout(0), searchLine(0), searchCombo(0), delay(400), m_lastComboIndex(0) {} TQString searchText; TQTimer timer; - TQHBoxLayout* layout; + TQHBoxLayout* tqlayout; KLineEdit* searchLine; KComboBox* searchCombo; int delay; int m_lastComboIndex; }; -ResultsSearchBar::ResultsSearchBar(TQWidget* parent, const char* name) - : TQWidget(parent, name), d(new ResultsSearchBar::ResultsSearchBarPrivate) +ResultsSearchBar::ResultsSearchBar(TQWidget* tqparent, const char* name) + : TQWidget(tqparent, name), d(new ResultsSearchBar::ResultsSearchBarPrivate) { - setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - d->layout = new TQHBoxLayout(this); - d->layout->setMargin(2); - d->layout->setSpacing(5); + d->tqlayout = new TQHBoxLayout(this); + d->tqlayout->setMargin(2); + d->tqlayout->setSpacing(5); TQToolButton* clearButton = new TQToolButton(this); clearButton->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); clearButton->setAutoRaise(true); - d->layout->addWidget(clearButton); + d->tqlayout->addWidget(clearButton); TQLabel* searchLabel = new TQLabel(this); searchLabel->setText(i18n("S&earch:")); - d->layout->addWidget(searchLabel); + d->tqlayout->addWidget(searchLabel); d->searchLine = new KLineEdit(this, "searchline"); connect(d->searchLine, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSearchStringChanged(const TQString &))); searchLabel->setBuddy(d->searchLine); - d->layout->addWidget(d->searchLine); + d->tqlayout->addWidget(d->searchLine); TQLabel* statusLabel = new TQLabel(this); - statusLabel->setText( i18n("Status:") ); - d->layout->addWidget(statusLabel); + statusLabel->setText( i18n("tqStatus:") ); + d->tqlayout->addWidget(statusLabel); d->searchCombo = new KComboBox(this, "searchcombo"); TQPixmap iconAll = KGlobal::iconLoader()->loadIcon("exec", KIcon::Small); @@ -95,7 +95,7 @@ ResultsSearchBar::ResultsSearchBar(TQWidget* parent, const char* name) d->searchCombo->insertItem(iconBroken, i18n("Broken Links")); d->searchCombo->insertItem(iconMalformed, i18n("Malformed Links")); d->searchCombo->insertItem(iconUndetermined, i18n("Undetermined Links")); - d->layout->addWidget(d->searchCombo); + d->tqlayout->addWidget(d->searchCombo); TQToolTip::add(clearButton, i18n("Clear filter")); TQToolTip::add( d->searchLine, i18n("Enter the terms to filter the result link list")); @@ -147,7 +147,7 @@ void ResultsSearchBar::slotClearSearch() } } -void ResultsSearchBar::slotSetStatus(int status) +void ResultsSearchBar::slotSettqStatus(int status) { d->searchCombo->setCurrentItem(status); } @@ -187,19 +187,19 @@ void ResultsSearchBar::slotActivateSearch() { kdDebug(23100) << "ResultsSearchBar::slotActivateSearch" << endl; - ResultView::Status status = selectedStatus(); + ResultView::tqStatus status = selectedtqStatus(); emit signalSearch(LinkMatcher(d->searchLine->text(), status)); } LinkMatcher ResultsSearchBar::currentLinkMatcher() const { - return LinkMatcher(d->searchLine->text(), selectedStatus()); + return LinkMatcher(d->searchLine->text(), selectedtqStatus()); } -ResultView::Status ResultsSearchBar::selectedStatus() const +ResultView::tqStatus ResultsSearchBar::selectedtqStatus() const { - ResultView::Status status = ResultView::none; + ResultView::tqStatus status = ResultView::none; if(d->searchCombo->currentItem()) { diff --git a/klinkstatus/src/ui/resultssearchbar.h b/klinkstatus/src/ui/resultssearchbar.h index 16d254c7..a51c3f72 100644 --- a/klinkstatus/src/ui/resultssearchbar.h +++ b/klinkstatus/src/ui/resultssearchbar.h @@ -30,11 +30,12 @@ @author Paulo Moura Guedes <moura@kdewebdev.org> Based on Akregator code. Kudos ;) */ -class ResultsSearchBar : public QWidget +class ResultsSearchBar : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ResultsSearchBar(TQWidget *parent = 0, const char *name = 0); + ResultsSearchBar(TQWidget *tqparent = 0, const char *name = 0); ~ResultsSearchBar(); TQString const& text() const; @@ -51,7 +52,7 @@ signals: public slots: void slotClearSearch(); - void slotSetStatus(int status); + void slotSettqStatus(int status); void slotSetText(const TQString& text); private slots: @@ -62,7 +63,7 @@ private slots: private: - ResultView::Status selectedStatus() const; + ResultView::tqStatus selectedtqStatus() const; private: diff --git a/klinkstatus/src/ui/resultview.cpp b/klinkstatus/src/ui/resultview.cpp index 737b901b..907559a1 100644 --- a/klinkstatus/src/ui/resultview.cpp +++ b/klinkstatus/src/ui/resultview.cpp @@ -20,7 +20,7 @@ #include <kiconloader.h> const TQString ResultView::URL_LABEL = "URL"; -const TQString ResultView::STATUS_LABEL = "Status"; +const TQString ResultView::STATUS_LABEL = "tqStatus"; const TQString ResultView::MARKUP_LABEL = "Markup"; const TQString ResultView::LINK_LABEL_LABEL = "Label"; @@ -69,31 +69,31 @@ void ResultView::setColumns(TQStringList const& columns) number_of_columns_ = columns.size(); } -bool ResultView::displayableWithStatus(LinkStatus const* ls, Status const& status) +bool ResultView::displayableWithtqStatus(LinktqStatus const* ls, tqStatus const& status) { if(status == ResultView::good) { return - ls->status() == LinkStatus::SUCCESSFULL || - ls->status() == LinkStatus::HTTP_REDIRECTION; + ls->status() == LinktqStatus::SUCCESSFULL || + ls->status() == LinktqStatus::HTTP_REDIRECTION; } else if(status == ResultView::bad) { return - ls->status() == LinkStatus::BROKEN || - ls->status() == LinkStatus::HTTP_CLIENT_ERROR || - ls->status() == LinkStatus::HTTP_SERVER_ERROR; + ls->status() == LinktqStatus::BROKEN || + ls->status() == LinktqStatus::HTTP_CLIENT_ERROR || + ls->status() == LinktqStatus::HTTP_SERVER_ERROR; } else if(status == ResultView::malformed) { - return ls->status() == LinkStatus::MALFORMED; + return ls->status() == LinktqStatus::MALFORMED; } else if(status == ResultView::undetermined) { return - ls->status() == LinkStatus::UNDETERMINED || - ls->status() == LinkStatus::TIMEOUT || - ls->status() == LinkStatus::NOT_SUPPORTED; + ls->status() == LinktqStatus::UNDETERMINED || + ls->status() == LinktqStatus::TIMEOUT || + ls->status() == LinktqStatus::NOT_SUPPORTED; } else return true; @@ -102,8 +102,8 @@ bool ResultView::displayableWithStatus(LinkStatus const* ls, Status const& statu // ******************************* ResultViewItem ***************************** -ResultViewItem::ResultViewItem(LinkStatus const* linkstatus, int column_index) - : ls_((LinkStatus*)linkstatus), column_index_(column_index) +ResultViewItem::ResultViewItem(LinktqStatus const* linkstatus, int column_index) + : ls_((LinktqStatus*)linkstatus), column_index_(column_index) { Q_ASSERT(ls_); Q_ASSERT(column_index_ > 0); @@ -123,7 +123,7 @@ int ResultViewItem::columnIndex() const return column_index_; } -LinkStatus const* ResultViewItem::linkStatus() const +LinktqStatus const* ResultViewItem::linktqStatus() const { Q_ASSERT(ls_); return ls_; @@ -131,47 +131,47 @@ LinkStatus const* ResultViewItem::linkStatus() const TQColor const& ResultViewItem::textStatusColor() const { - if(linkStatus()->errorOccurred()) + if(linktqStatus()->errorOccurred()) { - //kdDebug(23100) << "ERROR: " << linkStatus()->error() << ": " << linkStatus()->absoluteUrl().prettyURL() << endl; - if(linkStatus()->error() == i18n( "Javascript not supported" )) - return Qt::lightGray; + //kdDebug(23100) << "ERROR: " << linktqStatus()->error() << ": " << linktqStatus()->absoluteUrl().prettyURL() << endl; + if(linktqStatus()->error() == i18n( "Javascript not supported" )) + return TQt::lightGray; else - return Qt::red; + return TQt::red; } - else if(linkStatus()->absoluteUrl().hasRef()) - return Qt::blue; + else if(linktqStatus()->absoluteUrl().hasRef()) + return TQt::blue; - else if(!linkStatus()->absoluteUrl().protocol().startsWith("http")) - return Qt::darkGreen; + else if(!linktqStatus()->absoluteUrl().protocol().startsWith("http")) + return TQt::darkGreen; else { - TQString status_code(TQString::number(linkStatus()->httpHeader().statusCode())); + TQString status_code(TQString::number(linktqStatus()->httpHeader().statusCode())); if(status_code[0] == '0') { kdWarning(23100) << "status code == 0: " << endl; - kdWarning(23100) << linkStatus()->toString() << endl; - kdWarning(23100) << linkStatus()->httpHeader().toString() << endl; + kdWarning(23100) << linktqStatus()->toString() << endl; + kdWarning(23100) << linktqStatus()->httpHeader().toString() << endl; } //Q_ASSERT(status_code[0] != '0'); if(status_code[0] == '5') - return Qt::darkMagenta; + return TQt::darkMagenta; else if(status_code[0] == '4') - return Qt::red; + return TQt::red; else if(status_code[0] == '3') - return Qt::blue; + return TQt::blue; else if(status_code[0] == '2') - return Qt::darkGreen; + return TQt::darkGreen; else - return Qt::red; + return TQt::red; } } diff --git a/klinkstatus/src/ui/resultview.h b/klinkstatus/src/ui/resultview.h index 43a52427..d63fb8c0 100644 --- a/klinkstatus/src/ui/resultview.h +++ b/klinkstatus/src/ui/resultview.h @@ -27,7 +27,7 @@ class KURL; -class LinkStatus; +class LinktqStatus; class CellToolTip; @@ -43,7 +43,7 @@ public: static const TQString MARKUP_LABEL; static const TQString LINK_LABEL_LABEL; - enum Status { + enum tqStatus { none = 0, good, bad, @@ -54,14 +54,14 @@ public: ResultView(); virtual ~ResultView(); - //virtual void insertResult(LinkStatus const* linkstatus) = 0; + //virtual void insertResult(LinktqStatus const* linkstatus) = 0; virtual void clear() = 0; - virtual void show(Status const& status) = 0; + virtual void show(tqStatus const& status) = 0; virtual void showAll() = 0; //virtual void ensureCellVisible(int row, int col) = 0; virtual void setColumns(TQStringList const& columns); - static bool displayableWithStatus(LinkStatus const* ls, Status const& status); + static bool displayableWithtqStatus(LinktqStatus const* ls, tqStatus const& status); int numberOfColumns() const { return number_of_columns_; } @@ -105,7 +105,7 @@ private: class ResultViewItem { public: - ResultViewItem(LinkStatus const* linkstatus, + ResultViewItem(LinktqStatus const* linkstatus, int column_index); virtual ~ResultViewItem(); @@ -113,7 +113,7 @@ public: virtual int columnIndex() const; virtual TQString toolTip() const = 0; - LinkStatus const* linkStatus() const; + LinktqStatus const* linktqStatus() const; protected: @@ -125,9 +125,9 @@ protected: protected: - LinkStatus* ls_; + LinktqStatus* ls_; int column_index_; - int alignment_; + int tqalignment_; }; diff --git a/klinkstatus/src/ui/sessionwidget.cpp b/klinkstatus/src/ui/sessionwidget.cpp index f729ca3e..0678822a 100644 --- a/klinkstatus/src/ui/sessionwidget.cpp +++ b/klinkstatus/src/ui/sessionwidget.cpp @@ -66,8 +66,8 @@ SessionWidget::SessionWidget(int max_simultaneous_connections, int time_out, - TQWidget* parent, const char* name, WFlags f) - : SessionWidgetBase(parent, name, f), search_manager_(0), + TQWidget* tqparent, const char* name, WFlags f) + : SessionWidgetBase(tqparent, name, f), search_manager_(0), action_manager_(ActionManager::getInstance()), ready_(true), to_start_(false), to_pause_(false), to_stop_(false), in_progress_(false), paused_(false), stopped_(true), @@ -151,13 +151,13 @@ void SessionWidget::newSearchManager() search_manager_ = new SearchManager(KLSConfig::maxConnectionsNumber(), KLSConfig::timeOut(), - this, "search_manager"); + TQT_TQOBJECT(this), "search_manager"); Q_ASSERT(search_manager_); - connect(search_manager_, TQT_SIGNAL(signalRootChecked(const LinkStatus *, LinkChecker *)), - this, TQT_SLOT(slotRootChecked(const LinkStatus *, LinkChecker *))); - connect(search_manager_, TQT_SIGNAL(signalLinkChecked(const LinkStatus *, LinkChecker *)), - this, TQT_SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *))); + connect(search_manager_, TQT_SIGNAL(signalRootChecked(const LinktqStatus *, LinkChecker *)), + this, TQT_SLOT(slotRootChecked(const LinktqStatus *, LinkChecker *))); + connect(search_manager_, TQT_SIGNAL(signalLinkChecked(const LinktqStatus *, LinkChecker *)), + this, TQT_SLOT(slotLinkChecked(const LinktqStatus *, LinkChecker *))); connect(search_manager_, TQT_SIGNAL(signalSearchFinished()), this, TQT_SLOT(slotSearchFinished())); connect(search_manager_, TQT_SIGNAL(signalSearchPaused()), @@ -321,7 +321,7 @@ void SessionWidget::slotCheck() void SessionWidget::keyPressEvent ( TQKeyEvent* e ) { - if( e->key() == Qt::Key_Return && + if( e->key() == TQt::Key_Return && ( combobox_url->hasFocus() || //lineedit_domain->hasFocus() || //checkbox_depth->hasFocus() || @@ -338,7 +338,7 @@ void SessionWidget::keyPressEvent ( TQKeyEvent* e ) } } - else if(e->key() == Qt::Key_F6) + else if(e->key() == TQt::Key_F6) { combobox_url->lineEdit()->selectAll(); } @@ -356,7 +356,7 @@ bool SessionWidget::validFields() return true; } -void SessionWidget::slotRootChecked(LinkStatus const* linkstatus, LinkChecker * anal) +void SessionWidget::slotRootChecked(LinktqStatus const* linkstatus, LinkChecker * anal) { slotSetTimeElapsed(); emit signalUpdateTabLabel(search_manager_->linkStatusRoot(), this); @@ -368,7 +368,7 @@ void SessionWidget::slotRootChecked(LinkStatus const* linkstatus, LinkChecker * //table_linkstatus->insertResult(linkstatus); TreeViewItem* tree_view_item = new TreeViewItem(tree_view, tree_view->lastItem(), linkstatus); - LinkStatus* ls = const_cast<LinkStatus*> (linkstatus); + LinktqStatus* ls = const_cast<LinktqStatus*> (linkstatus); ls->setTreeViewItem(tree_view_item); if(linkstatus->isRedirection() && linkstatus->redirection()) @@ -378,7 +378,7 @@ void SessionWidget::slotRootChecked(LinkStatus const* linkstatus, LinkChecker * ActionManager::getInstance()->action("file_export_html")->setEnabled(!isEmpty()); } -void SessionWidget::slotLinkChecked(LinkStatus const* linkstatus, LinkChecker * anal) +void SessionWidget::slotLinkChecked(LinktqStatus const* linkstatus, LinkChecker * anal) { slotSetTimeElapsed(); @@ -392,15 +392,15 @@ void SessionWidget::slotLinkChecked(LinkStatus const* linkstatus, LinkChecker * if(linkstatus->checked()) { TreeViewItem* tree_view_item = 0; - TreeViewItem* parent_item = linkstatus->parent()->treeViewItem(); + TreeViewItem* tqparent_item = linkstatus->tqparent()->treeViewItem(); bool match = resultsSearchBar->currentLinkMatcher().matches(*linkstatus); if(tree_display_) { //kdDebug(23100) << "TREE!!!!!" << endl; - tree_view_item = new TreeViewItem(tree_view, parent_item, parent_item->lastChild(), linkstatus); + tree_view_item = new TreeViewItem(tree_view, tqparent_item, tqparent_item->lastChild(), linkstatus); - parent_item->setLastChild(tree_view_item); + tqparent_item->setLastChild(tree_view_item); if(follow_last_link_checked_) tree_view->ensureRowVisible(tree_view_item, tree_display_); @@ -416,7 +416,7 @@ void SessionWidget::slotLinkChecked(LinkStatus const* linkstatus, LinkChecker * tree_view_item->setVisible(match); } - LinkStatus* ls = const_cast<LinkStatus*> (linkstatus); + LinktqStatus* ls = const_cast<LinktqStatus*> (linkstatus); ls->setTreeViewItem(tree_view_item); if(linkstatus->isRedirection() && linkstatus->redirection()) @@ -503,10 +503,10 @@ void SessionWidget::showBottomStatusLabel(TQListViewItem* item) TreeViewItem* _item = tree_view->myItem(item); if(_item) { - TQString status = _item->linkStatus()->statusText(); + TQString status = _item->linktqStatus()->statusText(); textlabel_status->setText(status); - if(textlabel_status->sizeHint().width() > textlabel_status->maximumWidth()) + if(textlabel_status->tqsizeHint().width() > textlabel_status->maximumWidth()) TQToolTip::add(textlabel_status, status); else TQToolTip::remove(textlabel_status); @@ -683,7 +683,7 @@ void SessionWidget::slotApplyFilter(LinkMatcher link_matcher) void SessionWidget::slotExportAsHTML( ) { - KURL url = KFileDialog::getSaveURL(TQString::null,"text/html", 0, i18n("Export Results as HTML")); + KURL url = KFileDialog::getSaveURL(TQString(),"text/html", 0, i18n("Export Results as HTML")); if(url.isEmpty()) return; diff --git a/klinkstatus/src/ui/sessionwidget.h b/klinkstatus/src/ui/sessionwidget.h index ad6136b6..a10df805 100644 --- a/klinkstatus/src/ui/sessionwidget.h +++ b/klinkstatus/src/ui/sessionwidget.h @@ -45,11 +45,12 @@ using namespace std; class SessionWidget: public SessionWidgetBase { Q_OBJECT + TQ_OBJECT public: SessionWidget(int max_simultaneous_connections = 3, int time_out = 50, - TQWidget* parent = 0, const char* name = 0, WFlags f = 0); + TQWidget* tqparent = 0, const char* name = 0, WFlags f = 0); ~SessionWidget(); @@ -69,7 +70,7 @@ public: bool stopped() const { return stopped_; } signals: - void signalUpdateTabLabel(const LinkStatus *, SessionWidget*); + void signalUpdateTabLabel(const LinktqStatus *, SessionWidget*); void signalSearchStarted(); void signalSearchPaused(); void signalSearchFinnished(); @@ -96,8 +97,8 @@ private slots: //virtual void slotSuggestDomain(bool toogle); void slotEnableCheckButton(const TQString &); - void slotRootChecked(LinkStatus const* linkstatus, LinkChecker * anal); - void slotLinkChecked(LinkStatus const* linkstatus, LinkChecker * anal); + void slotRootChecked(LinktqStatus const* linkstatus, LinkChecker * anal); + void slotLinkChecked(LinktqStatus const* linkstatus, LinkChecker * anal); void slotSearchFinished(); void slotSearchPaused(); /** Shows the status of the clicked URL (row) for 5 seconds */ diff --git a/klinkstatus/src/ui/sessionwidgetbase.ui b/klinkstatus/src/ui/sessionwidgetbase.ui index 0d194143..64870e29 100644 --- a/klinkstatus/src/ui/sessionwidgetbase.ui +++ b/klinkstatus/src/ui/sessionwidgetbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>SessionWidgetBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SessionWidgetBase</cstring> </property> @@ -12,7 +12,7 @@ <height>683</height> </rect> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>300</height> @@ -28,7 +28,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttongroup_search</cstring> </property> @@ -39,31 +39,31 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>toolButton_clear_combo</cstring> </property> @@ -75,13 +75,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>25</width> <height>25</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>25</width> <height>25</height> @@ -94,7 +94,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textlabel_url</cstring> </property> @@ -109,7 +109,7 @@ <property name="text"> <string>URL: </string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> @@ -150,7 +150,7 @@ <property name="sizeType"> <enum>Maximum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -159,15 +159,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkbox_recursively</cstring> </property> @@ -181,7 +181,7 @@ <string>Check pages recursively</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>spinbox_depth</cstring> </property> @@ -204,7 +204,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkbox_subdirs_only</cstring> </property> @@ -212,7 +212,7 @@ <bool>true</bool> </property> <property name="text"> - <string>Do &not check parent folders</string> + <string>Do &not check tqparent folders</string> </property> </widget> <spacer> @@ -225,7 +225,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>160</width> <height>20</height> @@ -234,15 +234,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkbox_external_links</cstring> </property> @@ -266,7 +266,7 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>174</width> <height>20</height> @@ -275,15 +275,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -291,7 +291,7 @@ <string>Do not check regular expression:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>lineedit_reg_exp</cstring> </property> @@ -306,7 +306,7 @@ <property name="sizeType"> <enum>Maximum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -338,26 +338,26 @@ <property name="name"> <cstring>tree_view</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>300</height> </size> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textlabel_progressbar</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>94</width> <height>0</height> @@ -383,9 +383,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> @@ -403,7 +403,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>470</width> <height>32767</height> @@ -423,22 +423,22 @@ <property name="sizeType"> <enum>Preferred</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12_2</cstring> + <cstring>tqlayout12_2</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textlabel_elapsed_time</cstring> </property> @@ -460,7 +460,7 @@ <string>hh:mm:ss.zzz</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textlabel_elapsed_time_value</cstring> </property> @@ -475,7 +475,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>80</width> <height>0</height> @@ -585,12 +585,12 @@ <tabstop>checkbox_subdirs_only</tabstop> <tabstop>checkbox_external_links</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot specifier="pure virtual">slotCheck()</slot> <slot specifier="pure virtual">slotCancel()</slot> <slot specifier="pure virtual">slotClearComboUrl()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klshistorycombo.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/klinkstatus/src/ui/settings/configidentificationdialog.cpp b/klinkstatus/src/ui/settings/configidentificationdialog.cpp index f2675d81..28f00d81 100644 --- a/klinkstatus/src/ui/settings/configidentificationdialog.cpp +++ b/klinkstatus/src/ui/settings/configidentificationdialog.cpp @@ -29,8 +29,8 @@ #include "../cfg/klsconfig.h" -ConfigIdentificationDialog::ConfigIdentificationDialog(TQWidget *parent, const char *name) - : ConfigIdentificationDialogUi(parent, name) +ConfigIdentificationDialog::ConfigIdentificationDialog(TQWidget *tqparent, const char *name) + : ConfigIdentificationDialogUi(tqparent, name) { if(KLSConfig::userAgent().isEmpty()) { diff --git a/klinkstatus/src/ui/settings/configidentificationdialog.h b/klinkstatus/src/ui/settings/configidentificationdialog.h index 8bc0fa64..033a74c5 100644 --- a/klinkstatus/src/ui/settings/configidentificationdialog.h +++ b/klinkstatus/src/ui/settings/configidentificationdialog.h @@ -29,8 +29,9 @@ class ConfigIdentificationDialog : public ConfigIdentificationDialogUi { Q_OBJECT + TQ_OBJECT public: - ConfigIdentificationDialog(TQWidget *parent = 0, const char *name = 0); + ConfigIdentificationDialog(TQWidget *tqparent = 0, const char *name = 0); ~ConfigIdentificationDialog(); private slots: diff --git a/klinkstatus/src/ui/settings/configidentificationdialogui.ui b/klinkstatus/src/ui/settings/configidentificationdialogui.ui index 29723358..7f70dbb1 100644 --- a/klinkstatus/src/ui/settings/configidentificationdialogui.ui +++ b/klinkstatus/src/ui/settings/configidentificationdialogui.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>ConfigIdentificationDialogUi</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ConfigIdentificationDialogUi</cstring> </property> @@ -21,7 +21,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup4</cstring> </property> @@ -37,7 +37,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -69,7 +69,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>300</width> <height>0</height> @@ -84,7 +84,7 @@ <string>Default</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_SendIdentification</cstring> </property> @@ -126,7 +126,7 @@ <tabstop>kcfg_UserAgent</tabstop> <tabstop>buttonDefault</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/klinkstatus/src/ui/settings/configresultsdialog.ui b/klinkstatus/src/ui/settings/configresultsdialog.ui index 544f3273..86f579c3 100644 --- a/klinkstatus/src/ui/settings/configresultsdialog.ui +++ b/klinkstatus/src/ui/settings/configresultsdialog.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>ConfigResultsDialog</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ConfigResultsDialog</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup13</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>kcfg_DisplayTreeView</cstring> </property> @@ -35,7 +35,7 @@ <string>Tree</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>kcfg_DisplayFlatView</cstring> </property> @@ -45,7 +45,7 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup13_2</cstring> </property> @@ -56,7 +56,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>kcfg_FollowLastLinkChecked</cstring> </property> @@ -68,5 +68,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/klinkstatus/src/ui/settings/configsearchdialog.ui b/klinkstatus/src/ui/settings/configsearchdialog.ui index 604a431c..df982adb 100644 --- a/klinkstatus/src/ui/settings/configsearchdialog.ui +++ b/klinkstatus/src/ui/settings/configsearchdialog.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>ConfigSearchDialog</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ConfigSearchDialog</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup13</cstring> </property> @@ -39,7 +39,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -55,7 +55,7 @@ <number>5</number> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> @@ -93,7 +93,7 @@ <number>40</number> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -111,7 +111,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup8</cstring> </property> @@ -144,18 +144,18 @@ <number>50</number> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>kcfg_CheckParentFolders</cstring> </property> <property name="text"> - <string>Check parent folders</string> + <string>Check tqparent folders</string> </property> <property name="checked"> <bool>true</bool> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -171,7 +171,7 @@ <string>Number of items in URL history:</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>kcfg_CheckExternalLinks</cstring> </property> @@ -182,15 +182,15 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout21</cstring> + <cstring>tqlayout21</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_RecursiveCheck</cstring> </property> @@ -211,22 +211,22 @@ <property name="sizeType"> <enum>Maximum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout20</cstring> + <cstring>tqlayout20</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2_2_2</cstring> </property> @@ -268,7 +268,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup3</cstring> </property> @@ -279,7 +279,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>kcfg_UseQuantaUrlPreviewPrefix</cstring> </property> @@ -295,7 +295,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_RememberCheckSettings</cstring> </property> @@ -343,7 +343,7 @@ <tabstop>kcfg_CheckExternalLinks</tabstop> <tabstop>kcfg_RememberCheckSettings</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/klinkstatus/src/ui/tablelinkstatus.cpp b/klinkstatus/src/ui/tablelinkstatus.cpp index 66cd06be..d640f7bd 100644 --- a/klinkstatus/src/ui/tablelinkstatus.cpp +++ b/klinkstatus/src/ui/tablelinkstatus.cpp @@ -46,11 +46,11 @@ */ -TableLinkstatus::TableLinkstatus(TQWidget * parent, const char * name, +TableLinkstatus::TableLinkstatus(TQWidget * tqparent, const char * name, int column_index_status, int column_index_label, int column_index_URL) - : TQTable(parent, name), + : TQTable(tqparent, name), ResultView(column_index_status, column_index_label, column_index_URL) //context_table_menu_(this, "context_table_menu") { @@ -88,7 +88,7 @@ void TableLinkstatus::setColumns(TQStringList const& columns) { if(i == 0) { - Q_ASSERT(columns[i] == i18n("Status") && col_status_ == 1); + Q_ASSERT(columns[i] == i18n("tqStatus") && col_status_ == 1); setColumnWidth(i, STATUS_COLUMN_WIDTH); } else if(i == 1) @@ -106,17 +106,17 @@ void TableLinkstatus::setColumns(TQStringList const& columns) horizontal_header->adjustHeaderSize(); } -void TableLinkstatus::insertResult(LinkStatus const* linkstatus) +void TableLinkstatus::insertResult(LinktqStatus const* linkstatus) { insereLinha(generateRowOfTableItems(linkstatus)); } -vector<TableItem*> TableLinkstatus::generateRowOfTableItems(LinkStatus const* linkstatus) +vector<TableItem*> TableLinkstatus::generateRowOfTableItems(LinktqStatus const* linkstatus) { vector<TableItem*> items; int column = 1; - TableItem* item1 = new TableItemStatus(this, TQTableItem::Never, + TableItem* item1 = new TableItemtqStatus(this, TQTableItem::Never, linkstatus, column++); TableItem* item2 = new TableItemNome(this, TQTableItem::Never, linkstatus, column++); @@ -147,10 +147,10 @@ void TableLinkstatus::insereLinha(vector<TableItem*> items) setItem(row, col, items[i]); } - if(items[col_url_ - 1]->sizeHint().width() > columnWidth(col_url_ - 1)) + if(items[col_url_ - 1]->tqsizeHint().width() > columnWidth(col_url_ - 1)) { setColumnStretchable(col_url_ - 1, false); - setColumnWidth(col_url_ - 1, items[col_url_ - 1]->sizeHint().width()); + setColumnWidth(col_url_ - 1, items[col_url_ - 1]->tqsizeHint().width()); } ensureCellVisible(row, 0); @@ -178,14 +178,14 @@ void TableLinkstatus::removeColunas() Q_ASSERT(numCols() == 0); } -void TableLinkstatus::show(ResultView::Status const& status) +void TableLinkstatus::show(ResultView::tqStatus const& status) { for(int i = 0; i != numRows(); ++i) { int row = i; TableItem* _item = myItem(row, col_status_); - if(!ResultView::displayableWithStatus(_item->linkStatus(), status)) + if(!ResultView::displayableWithtqStatus(_item->linktqStatus(), status)) hideRow(row); else showRow(row); @@ -230,7 +230,7 @@ bool TableLinkstatus::textFitsInCell(int row, int col) const TQTableItem* itm(myItem(row, col)); Q_ASSERT(itm); - TQSize size_hint(itm->sizeHint()); + TQSize size_hint(itm->tqsizeHint()); int visible_width = 0; if(col == numCols() - 1) @@ -261,8 +261,8 @@ void TableLinkstatus::slotPopupContextMenu(int r, int w, const TQPoint& pos) TableItem* table_item = myItem(r, w); if(table_item) { - TQValueVector<KURL> referrers = table_item->linkStatus()->referrers(); - loadContextTableMenu(referrers, table_item->linkStatus()->isRoot()); + TQValueVector<KURL> referrers = table_item->linktqStatus()->referrers(); + loadContextTableMenu(referrers, table_item->linktqStatus()->isRoot()); context_table_menu_.popup(pos); } } @@ -313,30 +313,30 @@ void TableLinkstatus::loadContextTableMenu(TQValueVector<KURL> const& referrers, void TableLinkstatus::slotCopyUrlToClipboard() const { TableItem* _item = myItem(currentRow(), currentColumn()); - TQString content(_item->linkStatus()->absoluteUrl().prettyURL()); - QClipboard* cb = kapp->clipboard(); + TQString content(_item->linktqStatus()->absoluteUrl().prettyURL()); + TQClipboard* cb = kapp->clipboard(); cb->setText(content); } void TableLinkstatus::slotCopyParentUrlToClipboard() const { TableItem* _item = myItem(currentRow(), currentColumn()); - TQString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL()); - QClipboard* cb = kapp->clipboard(); + TQString content(_item->linktqStatus()->tqparent()->absoluteUrl().prettyURL()); + TQClipboard* cb = kapp->clipboard(); cb->setText(content); } void TableLinkstatus::slotCopyCellTextToClipboard() const { TQString cell_text(text(currentRow(), currentColumn())); - QClipboard* cb = kapp->clipboard(); + TQClipboard* cb = kapp->clipboard(); cb->setText(cell_text); } void TableLinkstatus::slotEditReferrersWithQuanta() { TableItem* _item = myItem(currentRow(), currentColumn()); - TQValueVector<KURL> referrers = _item->linkStatus()->referrers(); + TQValueVector<KURL> referrers = _item->linktqStatus()->referrers(); if(Global::isQuantaAvailableViaDCOP()) { @@ -369,7 +369,7 @@ void TableLinkstatus::slotEditReferrerWithQuanta(int id) index -= 2; // The list of referrers starts on index = 2 TableItem* _item = myItem(currentRow(), currentColumn()); - TQValueVector<KURL> referrers = _item->linkStatus()->referrers(); + TQValueVector<KURL> referrers = _item->linktqStatus()->referrers(); Q_ASSERT(index >= 0 && (uint)index < referrers.size()); slotEditReferrerWithQuanta(referrers[index]); @@ -386,8 +386,8 @@ void TableLinkstatus::slotEditReferrerWithQuanta(KURL const& url) if(!success) { - TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath); - KMessageBox::error(parentWidget(), message); + TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").tqarg(filePath); + KMessageBox::error(tqparentWidget(), message); } } else @@ -400,7 +400,7 @@ void TableLinkstatus::slotEditReferrerWithQuanta(KURL const& url) void TableLinkstatus::slotViewUrlInBrowser() { TableItem* _item = myItem(currentRow(), currentColumn()); - KURL url = _item->linkStatus()->absoluteUrl(); + KURL url = _item->linktqStatus()->absoluteUrl(); if(url.isValid()) { @@ -414,13 +414,13 @@ void TableLinkstatus::slotViewParentUrlInBrowser() { TableItem* _item = myItem(currentRow(), currentColumn()); - if(_item->linkStatus()->isRoot()) + if(_item->linktqStatus()->isRoot()) { KMessageBox::sorry(this, i18n("ROOT URL.")); } else { - LinkStatus const* ls_parent = _item->linkStatus()->parent(); + LinktqStatus const* ls_parent = _item->linktqStatus()->tqparent(); Q_ASSERT(ls_parent); KURL url = ls_parent->absoluteUrl(); @@ -439,11 +439,11 @@ void TableLinkstatus::slotViewParentUrlInBrowser() */ TableItem::TableItem(TQTable* table, EditType et, - LinkStatus const* linkstatus, - int column_index, int alignment) + LinktqStatus const* linkstatus, + int column_index, int tqalignment) : TQTableItem(table, et, ""), ResultViewItem(linkstatus, column_index), - /*ls_((LinkStatus*)linkstatus), - column_index_(column_index),*/ alignment_(alignment) + /*ls_((LinktqStatus*)linkstatus), + column_index_(column_index),*/ tqalignment_(tqalignment) { //Q_ASSERT(ls_); //Q_ASSERT(column_index_ > 0); @@ -467,17 +467,17 @@ int TableItem::columnIndex() const return ResultViewItem::columnIndex(); } -void TableItem::setAlignment(int aFlags) +void TableItem::tqsetAlignment(int aFlags) { - alignment_ = aFlags; + tqalignment_ = aFlags; } -int TableItem::alignment() const +int TableItem::tqalignment() const { - return alignment_; + return tqalignment_; } /* -LinkStatus const* const TableItem::linkStatus() const +LinktqStatus const* const TableItem::linktqStatus() const { Q_ASSERT(ls_); return ls_; @@ -485,48 +485,48 @@ LinkStatus const* const TableItem::linkStatus() const TQColor const& TableItem::textStatusColor() const { - if(linkStatus()->errorOccurred()) + if(linktqStatus()->errorOccurred()) { - //kdDebug(23100) << "ERROR: " << linkStatus()->error() << ": " << linkStatus()->absoluteUrl().prettyURL() << endl; - if(linkStatus()->error() == i18n( "Javascript not supported" )) - return Qt::lightGray; + //kdDebug(23100) << "ERROR: " << linktqStatus()->error() << ": " << linktqStatus()->absoluteUrl().prettyURL() << endl; + if(linktqStatus()->error() == i18n( "Javascript not supported" )) + return TQt::lightGray; else - return Qt::red; + return TQt::red; } - else if(linkStatus()->absoluteUrl().hasRef()) - return Qt::blue; + else if(linktqStatus()->absoluteUrl().hasRef()) + return TQt::blue; - else if(linkStatus()->absoluteUrl().protocol() != "http" && - linkStatus()->absoluteUrl().protocol() != "https") - return Qt::darkGreen; + else if(linktqStatus()->absoluteUrl().protocol() != "http" && + linktqStatus()->absoluteUrl().protocol() != "https") + return TQt::darkGreen; else { - TQString status_code(TQString::number(linkStatus()->httpHeader().statusCode())); + TQString status_code(TQString::number(linktqStatus()->httpHeader().statusCode())); if(status_code[0] == '0') { kdWarning(23100) << "status code == 0: " << endl; - kdWarning(23100) << linkStatus()->toString() << endl; - kdWarning(23100) << linkStatus()->httpHeader().toString() << endl; + kdWarning(23100) << linktqStatus()->toString() << endl; + kdWarning(23100) << linktqStatus()->httpHeader().toString() << endl; } //Q_ASSERT(status_code[0] != '0'); if(status_code[0] == '5') - return Qt::darkMagenta; + return TQt::darkMagenta; else if(status_code[0] == '4') - return Qt::red; + return TQt::red; else if(status_code[0] == '3') - return Qt::blue; + return TQt::blue; else if(status_code[0] == '2') - return Qt::darkGreen; + return TQt::darkGreen; else - return Qt::red; + return TQt::red; } } */ @@ -538,7 +538,7 @@ TQColor const& TableItem::textStatusColor() const */ TableItemURL::TableItemURL(TQTable* table, EditType et, - LinkStatus const* linkstatus, int column_index) + LinktqStatus const* linkstatus, int column_index) : TableItem(table, et, linkstatus, column_index) { setText(); @@ -546,17 +546,17 @@ TableItemURL::TableItemURL(TQTable* table, EditType et, void TableItemURL::setText() { - if(linkStatus()->node() && linkStatus()->malformed()) + if(linktqStatus()->node() && linktqStatus()->malformed()) { - if(linkStatus()->node()->url().isEmpty()) - TQTableItem::setText( linkStatus()->node()->content().simplifyWhiteSpace() ); + if(linktqStatus()->node()->url().isEmpty()) + TQTableItem::setText( linktqStatus()->node()->content().simplifyWhiteSpace() ); else - TQTableItem::setText( linkStatus()->node()->url() ); + TQTableItem::setText( linktqStatus()->node()->url() ); } else { - KURL url = linkStatus()->absoluteUrl(); - TQTableItem::setText(::convertToLocal(linkStatus())); + KURL url = linktqStatus()->absoluteUrl(); + TQTableItem::setText(::convertToLocal(linktqStatus())); } } @@ -583,19 +583,19 @@ TQColor const& TableItemURL::textStatusColor() const { // TODO clean this code - TQString status_code(TQString::number(linkStatus()->httpHeader().statusCode())); + TQString status_code(TQString::number(linktqStatus()->httpHeader().statusCode())); - if(linkStatus()->errorOccurred()) + if(linktqStatus()->errorOccurred()) { - if(linkStatus()->error().contains(i18n( "Timeout" ))) + if(linktqStatus()->error().tqcontains(i18n( "Timeout" ))) return darkMagenta; - else if(linkStatus()->error().contains(i18n( "not supported" ))) + else if(linktqStatus()->error().tqcontains(i18n( "not supported" ))) return lightGray; else return red; } - else if(linkStatus()->absoluteUrl().protocol() != "http" && - linkStatus()->absoluteUrl().protocol() != "https") + else if(linktqStatus()->absoluteUrl().protocol() != "http" && + linktqStatus()->absoluteUrl().protocol() != "https") return black; else if(status_code[0] == '5') @@ -610,53 +610,53 @@ TQColor const& TableItemURL::textStatusColor() const /* -********************* TableItemStatus *************************** +********************* TableItemtqStatus *************************** */ -TableItemStatus::TableItemStatus(TQTable* table, EditType et, - LinkStatus const* linkstatus, int column_index) +TableItemtqStatus::TableItemtqStatus(TQTable* table, EditType et, + LinktqStatus const* linkstatus, int column_index) : TableItem(table, et, linkstatus, column_index) { - setAlignment(Qt::AlignHCenter /*| Qt :: AlignVCenter*/); + tqsetAlignment(TQt::AlignHCenter /*| TQt :: AlignVCenter*/); setText(); setPixmap(); } -void TableItemStatus::setText() +void TableItemtqStatus::setText() { - if(linkStatus()->errorOccurred() || - linkStatus()->status() == "OK" || - linkStatus()->status() == "304") + if(linktqStatus()->errorOccurred() || + linktqStatus()->status() == "OK" || + linktqStatus()->status() == "304") { TQTableItem::setText(""); } else { /* - if(linkStatus()->httpHeader().statusCode() == 0) + if(linktqStatus()->httpHeader().statusCode() == 0) { - kdDebug(23100) << "TableItemStatus::setText : statusCode() == 0" << endl; - kdDebug(23100) << linkStatus()->toString() << endl; - kdDebug(23100) << linkStatus()->docHtml() << endl; + kdDebug(23100) << "TableItemtqStatus::setText : statusCode() == 0" << endl; + kdDebug(23100) << linktqStatus()->toString() << endl; + kdDebug(23100) << linktqStatus()->docHtml() << endl; } */ - //Q_ASSERT(linkStatus()->httpHeader().statusCode() != 0); //<------------------------------------------------------------ - //TQTableItem::setText( TQString::number(linkStatus()->httpHeader().statusCode()) ); - TQTableItem::setText( linkStatus()->status() ); + //Q_ASSERT(linktqStatus()->httpHeader().statusCode() != 0); //<------------------------------------------------------------ + //TQTableItem::setText( TQString::number(linktqStatus()->httpHeader().statusCode()) ); + TQTableItem::setText( linktqStatus()->status() ); } } -void TableItemStatus::setPixmap() +void TableItemtqStatus::setPixmap() { - if(linkStatus()->errorOccurred()) + if(linktqStatus()->errorOccurred()) { - if(linkStatus()->error().contains(i18n( "Timeout" ))) + if(linktqStatus()->error().tqcontains(i18n( "Timeout" ))) { TQTableItem::setPixmap(SmallIcon("kalarm")); } - else if(linkStatus()->error() == i18n( "Malformed" )) + else if(linktqStatus()->error() == i18n( "Malformed" )) { TQTableItem::setPixmap(SmallIcon("bug")); } @@ -665,27 +665,27 @@ void TableItemStatus::setPixmap() TQTableItem::setPixmap(SmallIcon("no")); } } - else if(linkStatus()->status() == "304") + else if(linktqStatus()->status() == "304") TQTableItem::setPixmap(UserIcon("304")); - else if(linkStatus()->status() == "OK") + else if(linktqStatus()->status() == "OK") TQTableItem::setPixmap(SmallIcon("ok")); } -TQString TableItemStatus::toolTip() const +TQString TableItemtqStatus::toolTip() const { - if(linkStatus()->errorOccurred() || - linkStatus()->absoluteUrl().hasRef() || - (linkStatus()->absoluteUrl().protocol() != "http" && - linkStatus()->absoluteUrl().protocol() != "https")) + if(linktqStatus()->errorOccurred() || + linktqStatus()->absoluteUrl().hasRef() || + (linktqStatus()->absoluteUrl().protocol() != "http" && + linktqStatus()->absoluteUrl().protocol() != "https")) { - return i18n("%1").arg(linkStatus()->status()); + return i18n("%1").tqarg(linktqStatus()->status()); } else - return i18n("%1").arg(linkStatus()->httpHeader().reasonPhrase()); + return i18n("%1").tqarg(linktqStatus()->httpHeader().reasonPhrase()); } -void TableItemStatus::paint( TQPainter *p, const TQColorGroup &cg, +void TableItemtqStatus::paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected ) { p->fillRect( 0, 0, cr.width(), cr.height(), @@ -716,7 +716,7 @@ void TableItemStatus::paint( TQPainter *p, const TQColorGroup &cg, else p->setPen( m_cg.text() ); p->drawText( x + 2, 0, w - x - 4, h, - wordWrap() ? (alignment() | WordBreak) : alignment(), text() ); + wordWrap() ? (tqalignment() | WordBreak) : tqalignment(), text() ); } /* @@ -726,7 +726,7 @@ void TableItemStatus::paint( TQPainter *p, const TQColorGroup &cg, */ TableItemNome::TableItemNome(TQTable* table, EditType et, - LinkStatus const* linkstatus, int column_index) + LinktqStatus const* linkstatus, int column_index) : TableItem(table, et, linkstatus, column_index) { setText(); @@ -734,7 +734,7 @@ TableItemNome::TableItemNome(TQTable* table, EditType et, void TableItemNome::setText() { - TQString label(linkStatus()->label()); + TQString label(linktqStatus()->label()); if(!label.isNull()) TQTableItem::setText(label.simplifyWhiteSpace()); } diff --git a/klinkstatus/src/ui/tablelinkstatus.h b/klinkstatus/src/ui/tablelinkstatus.h index 3f7b5cb9..2d320619 100644 --- a/klinkstatus/src/ui/tablelinkstatus.h +++ b/klinkstatus/src/ui/tablelinkstatus.h @@ -46,9 +46,10 @@ class TableItem; class TableLinkstatus: public TQTable, public ResultView { Q_OBJECT + TQ_OBJECT public: - TableLinkstatus(TQWidget * parent = 0, const char * name = 0, + TableLinkstatus(TQWidget * tqparent = 0, const char * name = 0, int column_index_status = 1, int column_index_label = 2, int column_index_URL = 3); @@ -57,12 +58,12 @@ public: virtual void setColumns(TQStringList const& columns); /* Insere uma nova entrada no fim da tabela */ - virtual void insertResult(LinkStatus const* linkstatus); + virtual void insertResult(LinktqStatus const* linkstatus); virtual void clear(); void removeColunas(); - virtual void show(ResultView::Status const& status); + virtual void show(ResultView::tqStatus const& status); virtual void showAll(); @@ -89,7 +90,7 @@ private slots: private: - vector<TableItem*> generateRowOfTableItems(LinkStatus const* linkstatus); + vector<TableItem*> generateRowOfTableItems(LinktqStatus const* linkstatus); void insereLinha(vector<TableItem*> items); private: @@ -109,18 +110,18 @@ class TableItem: public TQTableItem, public ResultViewItem public: TableItem(TQTable* table, EditType et, - LinkStatus const* linkstatus, - int column_index, int alignment = Qt::AlignLeft); + LinktqStatus const* linkstatus, + int column_index, int tqalignment = TQt::AlignLeft); virtual ~TableItem(); virtual void setColumnIndex(int i); virtual int columnIndex() const; - void setAlignment(int aFlags); - virtual int alignment() const; + void tqsetAlignment(int aFlags); + virtual int tqalignment() const; virtual TQString toolTip() const = 0; - //LinkStatus const* const linkStatus() const; + //LinktqStatus const* const linktqStatus() const; protected: @@ -132,9 +133,9 @@ protected: private: - //LinkStatus* ls_; + //LinktqStatus* ls_; //int column_index_; - int alignment_; + int tqalignment_; }; @@ -143,7 +144,7 @@ class TableItemURL: public TableItem public: TableItemURL(TQTable* table, EditType et, - LinkStatus const* linkstatus, int column_index = 3); + LinktqStatus const* linkstatus, int column_index = 3); //virtual ~TableItemURL(){}; virtual TQString toolTip() const; @@ -157,13 +158,13 @@ protected: }; -class TableItemStatus: public TableItem +class TableItemtqStatus: public TableItem { public: - TableItemStatus(TQTable* table, EditType et, - LinkStatus const* linkstatus, int column_index = 1); - //virtual ~TableItemStatus(){}; + TableItemtqStatus(TQTable* table, EditType et, + LinktqStatus const* linkstatus, int column_index = 1); + //virtual ~TableItemtqStatus(){}; virtual TQString toolTip() const; @@ -180,7 +181,7 @@ class TableItemNome: public TableItem public: TableItemNome(TQTable* table, EditType et, - LinkStatus const* linkstatus, int column_index = 2); + LinktqStatus const* linkstatus, int column_index = 2); //virtual ~TableItemNome(){}; virtual TQString toolTip() const; diff --git a/klinkstatus/src/ui/tabwidgetsession.cpp b/klinkstatus/src/ui/tabwidgetsession.cpp index d692486a..24c89d0f 100644 --- a/klinkstatus/src/ui/tabwidgetsession.cpp +++ b/klinkstatus/src/ui/tabwidgetsession.cpp @@ -42,10 +42,10 @@ #include <kiconloader.h> -TabWidgetSession::TabWidgetSession(TQWidget* parent, const char* name, WFlags f) - : KTabWidget(parent, name, f) // tabs_ is initialized with size 17 +TabWidgetSession::TabWidgetSession(TQWidget* tqparent, const char* name, WFlags f) + : KTabWidget(tqparent, name, f) // tabs_ is initialized with size 17 { - setFocusPolicy(TQTabWidget::NoFocus); + setFocusPolicy(TQ_NoFocus); setMargin(0); setTabReorderingEnabled(true); setHoverCloseButton(true); @@ -117,8 +117,8 @@ SessionWidget* TabWidgetSession::newSession() { // TODO: settings: number of connections, timeout SessionWidget* session_widget = newSessionWidget(); - connect(session_widget, TQT_SIGNAL(signalUpdateTabLabel(const LinkStatus *, SessionWidget*)), - this, TQT_SLOT(updateTabLabel(const LinkStatus *, SessionWidget*))); + connect(session_widget, TQT_SIGNAL(signalUpdateTabLabel(const LinktqStatus *, SessionWidget*)), + this, TQT_SLOT(updateTabLabel(const LinktqStatus *, SessionWidget*))); insertTab(session_widget, i18n("Session") + i18n(TQString::number(count() + 1).ascii())); @@ -166,7 +166,7 @@ SessionWidget* TabWidgetSession::newSessionWidget() return session_widget; } -void TabWidgetSession::updateTabLabel(LinkStatus const* linkstatus, SessionWidget* page) +void TabWidgetSession::updateTabLabel(LinktqStatus const* linkstatus, SessionWidget* page) { TQString label; KURL url = linkstatus->absoluteUrl(); diff --git a/klinkstatus/src/ui/tabwidgetsession.h b/klinkstatus/src/ui/tabwidgetsession.h index 52ec3ccd..4b315a85 100644 --- a/klinkstatus/src/ui/tabwidgetsession.h +++ b/klinkstatus/src/ui/tabwidgetsession.h @@ -27,7 +27,7 @@ class TQToolButton; class SessionWidget; -class LinkStatus; +class LinktqStatus; /** @@ -38,9 +38,10 @@ This class handles the creation and destruction of sessions, i.e, severals insta class TabWidgetSession : public KTabWidget { Q_OBJECT + TQ_OBJECT public: - TabWidgetSession(TQWidget * parent = 0, const char * name = 0, WFlags f = 0); + TabWidgetSession(TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0); ~TabWidgetSession(); /** Set the URL in the current session widget */ @@ -58,7 +59,7 @@ public slots: SessionWidget* newSession(); SessionWidget* newSession(KURL const& url); void closeSession(); - void updateTabLabel(LinkStatus const* linkstatus, SessionWidget*); + void updateTabLabel(LinktqStatus const* linkstatus, SessionWidget*); void slotLoadSettings(); void slotHideSearchPanel(); diff --git a/klinkstatus/src/ui/treeview.cpp b/klinkstatus/src/ui/treeview.cpp index 14e0e12a..3adec065 100644 --- a/klinkstatus/src/ui/treeview.cpp +++ b/klinkstatus/src/ui/treeview.cpp @@ -39,8 +39,8 @@ #include "../cfg/klsconfig.h" -TreeView::TreeView(TQWidget *parent, const char *name) - : KListView(parent, name), +TreeView::TreeView(TQWidget *tqparent, const char *name) + : KListView(tqparent, name), ResultView(), current_column_(0) { @@ -76,9 +76,9 @@ void TreeView::setColumns(TQStringList const& columns) setColumnWidthMode(i, TQListView::Manual); } - setColumnAlignment(col_status_ - 1, Qt::AlignCenter); + setColumnAlignment(col_status_ - 1, TQt::AlignCenter); if(KLSConfig::showMarkupStatus()) - setColumnAlignment(col_markup_ - 1, Qt::AlignCenter); + setColumnAlignment(col_markup_ - 1, TQt::AlignCenter); } void TreeView::resetColumns() @@ -114,36 +114,36 @@ void TreeView::removeColunas() clear(); } -void TreeView::show(ResultView::Status const& status) +void TreeView::show(ResultView::tqStatus const& status) { TQListViewItemIterator it(static_cast<KListView*> (this)); while(it.current()) { TreeViewItem* item = myItem(it.current()); - if(!ResultView::displayableWithStatus(item->linkStatus(), status)) + if(!ResultView::displayableWithtqStatus(item->linktqStatus(), status)) { item->setVisible(false); - //kdDebug(23100) << "Hide: " << item->linkStatus()->absoluteUrl().url() << endl; + //kdDebug(23100) << "Hide: " << item->linktqStatus()->absoluteUrl().url() << endl; } else { item->setVisible(true); //item->setEnabled(true); /* - if(KLSConfig::displayTreeView() && status != ResultView::good && item->parent()) + if(KLSConfig::displayTreeView() && status != ResultView::good && item->tqparent()) { - TreeViewItem* parent = myItem(item->parent()); - while(parent) + TreeViewItem* tqparent = myItem(item->tqparent()); + while(tqparent) { - kdDebug(23100) << "Show: " << parent->linkStatus()->absoluteUrl().url() << endl; + kdDebug(23100) << "Show: " << tqparent->linktqStatus()->absoluteUrl().url() << endl; - parent->setVisible(true); - //parent->setEnabled(false); + tqparent->setVisible(true); + //tqparent->setEnabled(false); - if(parent->parent()) - parent = myItem(parent->parent()); + if(tqparent->tqparent()) + tqparent = myItem(tqparent->tqparent()); else - parent = 0; + tqparent = 0; } } */ @@ -159,7 +159,7 @@ void TreeView::show(LinkMatcher link_matcher) while(it.current()) { TreeViewItem* item = myItem(it.current()); - bool match = link_matcher.matches(*(item->linkStatus())); + bool match = link_matcher.matches(*(item->linktqStatus())); if(tree_display_) item->setEnabled(match); @@ -199,7 +199,7 @@ void TreeView::resizeEvent(TQResizeEvent *e) { KListView::resizeEvent(e); resetColumns(); - clipper()->repaint(); + clipper()->tqrepaint(); } void TreeView::slotPopupContextMenu(TQListViewItem* item, const TQPoint& pos, int col) @@ -209,8 +209,8 @@ void TreeView::slotPopupContextMenu(TQListViewItem* item, const TQPoint& pos, in TreeViewItem* tree_item = myItem(item); if(tree_item) { - TQValueVector<KURL> referrers = tree_item->linkStatus()->referrers(); - loadContextTableMenu(referrers, tree_item->linkStatus()->isRoot()); + TQValueVector<KURL> referrers = tree_item->linktqStatus()->referrers(); + loadContextTableMenu(referrers, tree_item->linktqStatus()->isRoot()); context_table_menu_.popup(pos); } } @@ -218,16 +218,16 @@ void TreeView::slotPopupContextMenu(TQListViewItem* item, const TQPoint& pos, in void TreeView::slotCopyUrlToClipboard() const { TreeViewItem* _item = myItem(currentItem()); - TQString content(_item->linkStatus()->absoluteUrl().prettyURL()); - QClipboard* cb = kapp->clipboard(); + TQString content(_item->linktqStatus()->absoluteUrl().prettyURL()); + TQClipboard* cb = kapp->tqclipboard(); cb->setText(content); } void TreeView::slotCopyParentUrlToClipboard() const { TreeViewItem* _item = myItem(currentItem()); - TQString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL()); - QClipboard* cb = kapp->clipboard(); + TQString content(_item->linktqStatus()->tqparent()->absoluteUrl().prettyURL()); + TQClipboard* cb = kapp->tqclipboard(); cb->setText(content); } @@ -235,14 +235,14 @@ void TreeView::slotCopyCellTextToClipboard() const { TreeViewItem* _item = myItem(currentItem()); TQString cell_text(_item->text(current_column_)); - QClipboard* cb = kapp->clipboard(); + TQClipboard* cb = kapp->tqclipboard(); cb->setText(cell_text); } void TreeView::slotEditReferrersWithQuanta() { TreeViewItem* _item = myItem(currentItem()); - TQValueVector<KURL> referrers = _item->linkStatus()->referrers(); + TQValueVector<KURL> referrers = _item->linktqStatus()->referrers(); if(Global::isQuantaAvailableViaDCOP()) { @@ -275,7 +275,7 @@ void TreeView::slotEditReferrerWithQuanta(int id) index -= 2; // The list of referrers starts on index = 2 TreeViewItem* _item = myItem(currentItem()); - TQValueVector<KURL> referrers = _item->linkStatus()->referrers(); + TQValueVector<KURL> referrers = _item->linktqStatus()->referrers(); Q_ASSERT(index >= 0 && (uint)index < referrers.size()); slotEditReferrerWithQuanta(referrers[index]); @@ -292,8 +292,8 @@ void TreeView::slotEditReferrerWithQuanta(KURL const& url) if(!success) { - TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath); - KMessageBox::error(parentWidget(), message); + TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").tqarg(filePath); + KMessageBox::error(tqparentWidget(), message); } } else @@ -306,7 +306,7 @@ void TreeView::slotEditReferrerWithQuanta(KURL const& url) void TreeView::slotViewUrlInBrowser() { TreeViewItem* _item = myItem(currentItem()); - KURL url = _item->linkStatus()->absoluteUrl(); + KURL url = _item->linktqStatus()->absoluteUrl(); if(url.isValid()) { @@ -320,13 +320,13 @@ void TreeView::slotViewParentUrlInBrowser() { TreeViewItem* _item = myItem(currentItem()); - if(_item->linkStatus()->isRoot()) + if(_item->linktqStatus()->isRoot()) { KMessageBox::sorry(this, i18n("ROOT URL.")); } else { - LinkStatus const* ls_parent = _item->linkStatus()->parent(); + LinktqStatus const* ls_parent = _item->linktqStatus()->tqparent(); Q_ASSERT(ls_parent); KURL url = ls_parent->absoluteUrl(); @@ -392,16 +392,16 @@ TreeViewItem* TreeView::myItem(TQListViewItem* item) const /* ******************************* TreeViewItem ******************************* */ -TreeViewItem::TreeViewItem(TreeView* parent, TQListViewItem* after, - LinkStatus const* linkstatus) - : KListViewItem(parent, after), - last_child_(0), root_(parent) +TreeViewItem::TreeViewItem(TreeView* tqparent, TQListViewItem* after, + LinktqStatus const* linkstatus) + : KListViewItem(tqparent, after), + last_child_(0), root_(tqparent) { init(linkstatus); } TreeViewItem::TreeViewItem(TreeView* root, TQListViewItem* listview_item, TQListViewItem* after, - LinkStatus const* linkstatus) + LinktqStatus const* linkstatus) : KListViewItem(listview_item, after), last_child_(0), root_(root) @@ -412,7 +412,7 @@ TreeViewItem::TreeViewItem(TreeView* root, TQListViewItem* listview_item, TQList TreeViewItem::~TreeViewItem() {} -void TreeViewItem::init(LinkStatus const* linkstatus) +void TreeViewItem::init(LinktqStatus const* linkstatus) { setOpen(true); @@ -450,15 +450,15 @@ TQString TreeViewItem::key(int column, bool) const switch(column) { case 1: // status column - return linkStatus()->statusText(); + return linktqStatus()->statusText(); } return text(column); } -LinkStatus const* TreeViewItem::linkStatus() const +LinktqStatus const* TreeViewItem::linktqStatus() const { - return column_items_[0].linkStatus(); + return column_items_[0].linktqStatus(); } void TreeViewItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align) @@ -478,7 +478,7 @@ void TreeViewItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, /* ******************************* TreeColumnViewItem ******************************* */ -TreeColumnViewItem::TreeColumnViewItem(TreeView* root, LinkStatus const* linkstatus, int column_index) +TreeColumnViewItem::TreeColumnViewItem(TreeView* root, LinktqStatus const* linkstatus, int column_index) : root_(root), ls_(linkstatus), column_index_(column_index) { Q_ASSERT(ls_); @@ -501,7 +501,7 @@ int TreeColumnViewItem::columnIndex() const return column_index_; } -LinkStatus const* TreeColumnViewItem::linkStatus() const +LinktqStatus const* TreeColumnViewItem::linktqStatus() const { Q_ASSERT(ls_); return ls_; @@ -511,29 +511,29 @@ TQColor const& TreeColumnViewItem::textStatusColor() const { if(columnIndex() == root_->urlColumnIndex() || columnIndex() == root_->statusColumnIndex()) { - if(linkStatus()->status() == LinkStatus::BROKEN) - return Qt::red; - else if(linkStatus()->status() == LinkStatus::HTTP_CLIENT_ERROR) - return Qt::red; - else if(linkStatus()->status() == LinkStatus::HTTP_REDIRECTION) - return Qt::black; - else if(linkStatus()->status() == LinkStatus::HTTP_SERVER_ERROR) - return Qt::darkMagenta; - else if(linkStatus()->status() == LinkStatus::MALFORMED) - return Qt::red; - else if(linkStatus()->status() == LinkStatus::NOT_SUPPORTED) - return Qt::lightGray; - else if(linkStatus()->status() == LinkStatus::SUCCESSFULL) - return Qt::black; - else if(linkStatus()->status() == LinkStatus::TIMEOUT) - return Qt::darkMagenta; - else if(linkStatus()->status() == LinkStatus::UNDETERMINED) - return Qt::blue; + if(linktqStatus()->status() == LinktqStatus::BROKEN) + return TQt::red; + else if(linktqStatus()->status() == LinktqStatus::HTTP_CLIENT_ERROR) + return TQt::red; + else if(linktqStatus()->status() == LinktqStatus::HTTP_REDIRECTION) + return TQt::black; + else if(linktqStatus()->status() == LinktqStatus::HTTP_SERVER_ERROR) + return TQt::darkMagenta; + else if(linktqStatus()->status() == LinktqStatus::MALFORMED) + return TQt::red; + else if(linktqStatus()->status() == LinktqStatus::NOT_SUPPORTED) + return TQt::lightGray; + else if(linktqStatus()->status() == LinktqStatus::SUCCESSFULL) + return TQt::black; + else if(linktqStatus()->status() == LinktqStatus::TIMEOUT) + return TQt::darkMagenta; + else if(linktqStatus()->status() == LinktqStatus::UNDETERMINED) + return TQt::blue; - return Qt::red; + return TQt::red; } else - return Qt::black; + return TQt::black; } @@ -544,17 +544,17 @@ TQString TreeColumnViewItem::text(int column) const if(column == root_->urlColumnIndex()) { - if(linkStatus()->node() && linkStatus()->malformed()) + if(linktqStatus()->node() && linktqStatus()->malformed()) { - if(linkStatus()->node()->url().isEmpty()) - return linkStatus()->node()->content().simplifyWhiteSpace(); + if(linktqStatus()->node()->url().isEmpty()) + return linktqStatus()->node()->content().simplifyWhiteSpace(); else - return linkStatus()->node()->url(); + return linktqStatus()->node()->url(); } else { - KURL url = linkStatus()->absoluteUrl(); - return Url::convertToLocal(linkStatus()); + KURL url = linktqStatus()->absoluteUrl(); + return Url::convertToLocal(linktqStatus()); } } else if(column == root_->statusColumnIndex()) @@ -563,7 +563,7 @@ TQString TreeColumnViewItem::text(int column) const } else if(column == root_->labelColumnIndex()) { - TQString label(linkStatus()->label()); + TQString label(linktqStatus()->label()); if(!label.isNull()) return label.simplifyWhiteSpace(); } @@ -577,28 +577,28 @@ TQPixmap TreeColumnViewItem::pixmap(int column) const if(column == root_->statusColumnIndex()) { - if(linkStatus()->status() == LinkStatus::BROKEN) + if(linktqStatus()->status() == LinktqStatus::BROKEN) return SmallIcon("no"); - else if(linkStatus()->status() == LinkStatus::HTTP_CLIENT_ERROR) + else if(linktqStatus()->status() == LinktqStatus::HTTP_CLIENT_ERROR) return SmallIcon("no"); - else if(linkStatus()->status() == LinkStatus::HTTP_REDIRECTION) + else if(linktqStatus()->status() == LinktqStatus::HTTP_REDIRECTION) { - if(linkStatus()->statusText() == "304") + if(linktqStatus()->statusText() == "304") return UserIcon("304"); else return SmallIcon("redo"); } - else if(linkStatus()->status() == LinkStatus::HTTP_SERVER_ERROR) + else if(linktqStatus()->status() == LinktqStatus::HTTP_SERVER_ERROR) return SmallIcon("no"); - else if(linkStatus()->status() == LinkStatus::MALFORMED) + else if(linktqStatus()->status() == LinktqStatus::MALFORMED) return SmallIcon("editdelete"); - else if(linkStatus()->status() == LinkStatus::NOT_SUPPORTED) + else if(linktqStatus()->status() == LinktqStatus::NOT_SUPPORTED) return SmallIcon("help"); - else if(linkStatus()->status() == LinkStatus::SUCCESSFULL) + else if(linktqStatus()->status() == LinktqStatus::SUCCESSFULL) return SmallIcon("ok"); - else if(linkStatus()->status() == LinkStatus::TIMEOUT) + else if(linktqStatus()->status() == LinktqStatus::TIMEOUT) return SmallIcon("history_clear"); - else if(linkStatus()->status() == LinkStatus::UNDETERMINED) + else if(linktqStatus()->status() == LinktqStatus::UNDETERMINED) return SmallIcon("help"); } diff --git a/klinkstatus/src/ui/treeview.h b/klinkstatus/src/ui/treeview.h index 4d67c4f4..ccb84bb1 100644 --- a/klinkstatus/src/ui/treeview.h +++ b/klinkstatus/src/ui/treeview.h @@ -29,15 +29,16 @@ that a TQTable view isn't needed at all so some day I will clean this up. class TreeView : public KListView, public ResultView { Q_OBJECT + TQ_OBJECT public: - TreeView(TQWidget *parent = 0, const char *name = 0); + TreeView(TQWidget *tqparent = 0, const char *name = 0); ~TreeView(); virtual void setColumns(TQStringList const& columns); virtual void clear(); void removeColunas(); - virtual void show(ResultView::Status const& status); + virtual void show(ResultView::tqStatus const& status); void show(LinkMatcher link_matcher); virtual void showAll(); @@ -74,7 +75,7 @@ private: double columnsWidth() const; private: - int current_column_; // apparently it's impossible to know what is the current column + int current_column_; // aptqparently it's impossible to know what is the current column bool tree_display_; }; @@ -90,23 +91,23 @@ class TreeViewItem: public KListViewItem { public: - TreeViewItem(TreeView* parent, TQListViewItem* after, - LinkStatus const* linkstatus); - TreeViewItem(TreeView* root, TQListViewItem* parent_item, TQListViewItem* after, - LinkStatus const* linkstatus); + TreeViewItem(TreeView* tqparent, TQListViewItem* after, + LinktqStatus const* linkstatus); + TreeViewItem(TreeView* root, TQListViewItem* tqparent_item, TQListViewItem* after, + LinktqStatus const* linkstatus); virtual ~TreeViewItem(); void setLastChild(TQListViewItem* last_child); TQListViewItem* lastChild() const; TQString key(int column, bool) const; - LinkStatus const* linkStatus() const; + LinktqStatus const* linktqStatus() const; protected: virtual void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align); private: - void init(LinkStatus const* linkstatus); + void init(LinktqStatus const* linkstatus); private: TQValueVector<TreeColumnViewItem> column_items_; @@ -123,19 +124,19 @@ public: TreeColumnViewItem() {} ; - TreeColumnViewItem(TreeView* root, LinkStatus const* linkstatus, int column_index); + TreeColumnViewItem(TreeView* root, LinktqStatus const* linkstatus, int column_index); ~TreeColumnViewItem(); //void setColumnIndex(int i); int columnIndex() const; - LinkStatus const* linkStatus() const; + LinktqStatus const* linktqStatus() const; TQColor const& textStatusColor() const; TQString text(int column) const; TQPixmap pixmap(int column) const; private: TreeView* root_; - LinkStatus const* ls_; + LinktqStatus const* ls_; int column_index_; }; diff --git a/klinkstatus/src/utils/utils.cpp b/klinkstatus/src/utils/utils.cpp index 25384b4b..83956dee 100644 --- a/klinkstatus/src/utils/utils.cpp +++ b/klinkstatus/src/utils/utils.cpp @@ -131,14 +131,14 @@ TQString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = { void decode(TQString& url) { - if( (int)url.find('&') != -1) + if( (int)url.tqfind('&') != -1) { for(int i = 0; i != NUMBER_OF_HTML_CODES; ++i) { - int index = url.find(htmlDocCharset[i][0]); + int index = url.tqfind(htmlDocCharset[i][0]); if(index != - 1) { - url.replace(htmlDocCharset[i][0], htmlDocCharset[i][1]); + url.tqreplace(htmlDocCharset[i][0], htmlDocCharset[i][1]); } } } @@ -146,15 +146,15 @@ void decode(TQString& url) /* void decode(string& url) { - if( (int)url.find('&') != -1) + if( (int)url.tqfind('&') != -1) { for(int i = 0; i != NUMBER_OF_HTML_CODES; ++i) { - int index = url.find(htmlDocCharset[i][0].latin1()); + int index = url.tqfind(htmlDocCharset[i][0].latin1()); if(index != - 1) { int length = htmlDocCharset[i][0].length(); - url.replace(index, length, htmlDocCharset[i][1].latin1()); + url.tqreplace(index, length, htmlDocCharset[i][1].latin1()); } } } diff --git a/klinkstatus/src/utils/xsl.cpp b/klinkstatus/src/utils/xsl.cpp index 27f61cb8..320f14cd 100644 --- a/klinkstatus/src/utils/xsl.cpp +++ b/klinkstatus/src/utils/xsl.cpp @@ -51,7 +51,7 @@ * The thread class that actually performs the XSL processing. * Using a thread allows async operation. */ -class KopeteXSLThread : public TQObject, public QThread +class KopeteXSLThread : public TQObject, public TQThread { public: /** @@ -106,7 +106,7 @@ void KopeteXSLThread::run() m_resultString = xsltTransform( m_xml, m_xsl ); dataMutex.unlock(); // get back to the main thread - qApp->postEvent( this, new TQEvent( TQEvent::User ) ); + tqApp->postEvent( this, new TQEvent( TQEvent::User ) ); } bool KopeteXSLThread::event( TQEvent *event ) @@ -141,7 +141,7 @@ TQString KopeteXSLThread::xsltTransform( const TQString &xmlString, xsltStyleshe { if ( styleSheet ) { - static TQCString appPath( TQString::fromLatin1("\"%1\"").arg( KApplication::kApplication()->dirs()->findDirs("appdata", TQString::fromLatin1("styles/data") ).front() ).utf8() ); + static TQCString appPath( TQString::tqfromLatin1("\"%1\"").tqarg( KApplication::kApplication()->dirs()->findDirs("appdata", TQString::tqfromLatin1("styles/data") ).front() ).utf8() ); static const char* params[3] = { "appdata", @@ -152,7 +152,7 @@ TQString KopeteXSLThread::xsltTransform( const TQString &xmlString, xsltStyleshe xmlDocPtr resultDoc = xsltApplyStylesheet( styleSheet, xmlDoc, params ); if ( resultDoc ) { - // Save the result into the QString + // Save the result into the TQString xmlChar *mem; int size; xmlDocDumpMemory( resultDoc, &mem, &size ); @@ -179,7 +179,7 @@ TQString KopeteXSLThread::xsltTransform( const TQString &xmlString, xsltStyleshe if ( resultString.isEmpty() ) { - resultString = i18n( "<div><b>KLinkStatus encountered the following error while parsing a message:</b><br />%1</div>" ).arg( errorMsg ); + resultString = i18n( "<div><b>KLinktqStatus encountered the following error while parsing a message:</b><br />%1</div>" ).tqarg( errorMsg ); } #ifdef RAWXSL @@ -196,8 +196,8 @@ public: unsigned int flags; }; -XSLT::XSLT( const TQString &document, TQObject *parent ) - : TQObject( parent ), d(new XSLTPrivate) +XSLT::XSLT( const TQString &document, TQObject *tqparent ) + : TQObject( tqparent ), d(new XSLTPrivate) { d->flags = 0; d->xslDoc = 0; @@ -228,14 +228,14 @@ void XSLT::setXSLT( const TQString &_document ) // depend on the strings in the current styles. If these strings change // they may break the parsing here. // - // The reason I'm doing it like this is because of issues with QDOM and - // namespaces in earlier Qt versions. When we drop Qt 3.1.x support we + // The reason I'm doing it like this is because of issues with TQDOM and + // namespaces in earlier TQt versions. When we drop TQt 3.1.x support we // should probably convert this to more accurate DOM code. - Martijn // // Actually, since we need to parse into a libxml2 document anyway, this whole // nonsense could be replaced with some simple XPath expressions - JK // - TQRegExp elementMatch( TQString::fromLatin1( "<kopete-i18n>(.*)</kopete-i18n>" ) ); + TQRegExp elementMatch( TQString::tqfromLatin1( "<kopete-i18n>(.*)</kopete-i18n>" ) ); elementMatch.setMinimal( true ); TQString document = _document; int pos; @@ -261,21 +261,21 @@ void XSLT::setXSLT( const TQString &_document ) { prependPercent = false; - if ( *it == TQString::fromLatin1( "TIME" ) ) + if ( *it == TQString::tqfromLatin1( "TIME" ) ) { - trans += TQString::fromLatin1( "<xsl:value-of select=\"@time\"/>" ); + trans += TQString::tqfromLatin1( "<xsl:value-of select=\"@time\"/>" ); } - else if ( *it == TQString::fromLatin1( "TIMESTAMP" ) ) + else if ( *it == TQString::tqfromLatin1( "TIMESTAMP" ) ) { - trans += TQString::fromLatin1( "<xsl:value-of select=\"@timestamp\"/>" ); + trans += TQString::tqfromLatin1( "<xsl:value-of select=\"@timestamp\"/>" ); } - else if ( *it == TQString::fromLatin1( "FORMATTEDTIMESTAMP" ) ) + else if ( *it == TQString::tqfromLatin1( "FORMATTEDTIMESTAMP" ) ) { - trans += TQString::fromLatin1( "<xsl:value-of select=\"@formattedTimestamp\"/>" ); + trans += TQString::tqfromLatin1( "<xsl:value-of select=\"@formattedTimestamp\"/>" ); } - else if ( *it == TQString::fromLatin1( "FROM_CONTACT_DISPLAYNAME" ) ) + else if ( *it == TQString::tqfromLatin1( "FROM_CONTACT_DISPLAYNAME" ) ) { - trans += TQString::fromLatin1( "<span><xsl:attribute name=\"title\">" + trans += TQString::tqfromLatin1( "<span><xsl:attribute name=\"title\">" "<xsl:choose>" "<xsl:when test='from/contact/@contactId=from/contact/contactDisplayName/@text'>" "<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/metaContactDisplayName/@text\"/>" @@ -290,9 +290,9 @@ void XSLT::setXSLT( const TQString &_document ) "</xsl:attribute>" "<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/contactDisplayName/@text\"/></span>" ); } - else if ( *it == TQString::fromLatin1( "TO_CONTACT_DISPLAYNAME" ) ) + else if ( *it == TQString::tqfromLatin1( "TO_CONTACT_DISPLAYNAME" ) ) { - trans += TQString::fromLatin1( "<span><xsl:attribute name=\"title\">" + trans += TQString::tqfromLatin1( "<span><xsl:attribute name=\"title\">" "<xsl:choose>" "<xsl:when test='to/contact/@contactId=from/contact/contactDisplayName/@text'>" "<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/metaContactDisplayName/@text\"/>" @@ -307,37 +307,37 @@ void XSLT::setXSLT( const TQString &_document ) "</xsl:attribute>" "<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/contactDisplayName/@text\"/></span>" ); } - else if ( *it == TQString::fromLatin1( "FROM_METACONTACT_DISPLAYNAME" ) ) + else if ( *it == TQString::tqfromLatin1( "FROM_METACONTACT_DISPLAYNAME" ) ) { - trans += TQString::fromLatin1( "<span>" + trans += TQString::tqfromLatin1( "<span>" "<xsl:attribute name=\"dir\">" "<xsl:value-of select=\"from/contact/metaContactDisplayName/@dir\"/>" "</xsl:attribute>" "<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/metaContactDisplayName/@text\"/></span>" ); } - else if ( *it == TQString::fromLatin1( "TO_METACONTACT_DISPLAYNAME" ) ) + else if ( *it == TQString::tqfromLatin1( "TO_METACONTACT_DISPLAYNAME" ) ) { - trans += TQString::fromLatin1( "<span>" + trans += TQString::tqfromLatin1( "<span>" "<xsl:attribute name=\"dir\">" "<xsl:value-of select=\"to/contact/metaContactDisplayName/@dir\"/>" "</xsl:attribute>" "<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/metaContactDisplayName/@text\"/></span>" ); } - else if ( *it == TQString::fromLatin1( "FROM_CONTACT_ID" ) ) + else if ( *it == TQString::tqfromLatin1( "FROM_CONTACT_ID" ) ) { - trans += TQString::fromLatin1( "<span><xsl:attribute name=\"title\">" + trans += TQString::tqfromLatin1( "<span><xsl:attribute name=\"title\">" "<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/contactDisplayName/@text\"/></xsl:attribute>" "<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/@contactId\"/></span>" ); } - else if ( *it == TQString::fromLatin1( "TO_CONTACT_ID" ) ) + else if ( *it == TQString::tqfromLatin1( "TO_CONTACT_ID" ) ) { - trans += TQString::fromLatin1( "<span><xsl:attribute name=\"title\">" + trans += TQString::tqfromLatin1( "<span><xsl:attribute name=\"title\">" "<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/contactDisplayName/@text\"/></xsl:attribute>" "<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/@contactId\"/></span>" ); } - else if ( *it == TQString::fromLatin1( "BODY" ) ) + else if ( *it == TQString::tqfromLatin1( "BODY" ) ) { - trans += TQString::fromLatin1( "<xsl:value-of disable-output-escaping=\"yes\" select=\"body\"/>" ); + trans += TQString::tqfromLatin1( "<xsl:value-of disable-output-escaping=\"yes\" select=\"body\"/>" ); } else { @@ -349,7 +349,7 @@ void XSLT::setXSLT( const TQString &_document ) } //kdDebug( 14010 ) << k_funcinfo << "Translated text: " << trans << endl; // Add "<kopete-i18n>" and "</kopete-i18n>" to length, hence the '+ 27' - document.replace( uint( pos ), orig.length() + 27, trans ); + document.tqreplace( uint( pos ), orig.length() + 27, trans ); } #ifdef RAWXSL @@ -379,7 +379,7 @@ void XSLT::setXSLT( const TQString &_document ) //We have a flag. Enable it; TQCString flagData( (const char*)child->content ); - if( flagData.contains( "Flag:" ) ) + if( flagData.tqcontains( "Flag:" ) ) { flags += flagData.mid(5); } @@ -387,7 +387,7 @@ void XSLT::setXSLT( const TQString &_document ) } if( !flags.isEmpty() ) - setProperty("flags", flags.join( TQString::fromLatin1("|") ) ); + setProperty("flags", flags.join( TQString::tqfromLatin1("|") ) ); } else { diff --git a/klinkstatus/src/utils/xsl.h b/klinkstatus/src/utils/xsl.h index 7fb6af70..93d6a74b 100644 --- a/klinkstatus/src/utils/xsl.h +++ b/klinkstatus/src/utils/xsl.h @@ -32,14 +32,15 @@ class XSLTPrivate; * This class provides an easy to use interface to basic * libxslt transformations. */ -class XSLT : public QObject +class XSLT : public TQObject { Q_OBJECT + TQ_OBJECT - Q_PROPERTY( Flags flags READ flags WRITE setFlags ) - Q_PROPERTY( bool isValid READ isValid ) + TQ_PROPERTY( Flags flags READ flagsProperty WRITE setFlagsProperty ) + TQ_PROPERTY( bool isValid READ isValid ) - Q_SETS( Flags ) + TQ_SETS( Flags ) public: /** @@ -56,7 +57,7 @@ public: * * Constructs a new XSLT parser using the provided XSLT document */ - XSLT( const TQString &xsltDocument, TQObject *parent = 0L ); + XSLT( const TQString &xsltDocument, TQObject *tqparent = 0L ); virtual ~XSLT(); @@ -104,6 +105,9 @@ public: */ void setFlags( unsigned int flags ); + inline XSLT::Flags flagsProperty() const { return (XSLT::Flags)flags(); } + inline void setFlagsProperty( XSLT::Flags newflags ) { setFlags((XSLT::Flags)newflags); } + private: XSLTPrivate *d; }; |