summaryrefslogtreecommitdiffstats
path: root/klinkstatus/src
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /klinkstatus/src
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klinkstatus/src')
-rw-r--r--klinkstatus/src/actionmanager.cpp34
-rw-r--r--klinkstatus/src/actionmanager.h6
-rw-r--r--klinkstatus/src/engine/linkchecker.cpp60
-rw-r--r--klinkstatus/src/engine/linkchecker.h20
-rw-r--r--klinkstatus/src/engine/linkfilter.cpp2
-rw-r--r--klinkstatus/src/engine/linkfilter.h8
-rw-r--r--klinkstatus/src/engine/linkstatus.cpp16
-rw-r--r--klinkstatus/src/engine/linkstatus.h56
-rw-r--r--klinkstatus/src/engine/linkstatus_impl.h32
-rw-r--r--klinkstatus/src/engine/searchmanager.cpp62
-rw-r--r--klinkstatus/src/engine/searchmanager.h40
-rw-r--r--klinkstatus/src/engine/searchmanager_impl.h10
-rw-r--r--klinkstatus/src/global.cpp56
-rw-r--r--klinkstatus/src/global.h12
-rw-r--r--klinkstatus/src/klinkstatus.cpp22
-rw-r--r--klinkstatus/src/klinkstatus_part.cpp12
-rw-r--r--klinkstatus/src/klinkstatus_part.h6
-rw-r--r--klinkstatus/src/parser/htmlparser.cpp74
-rw-r--r--klinkstatus/src/parser/htmlparser.h20
-rw-r--r--klinkstatus/src/parser/http.cpp12
-rw-r--r--klinkstatus/src/parser/http.h28
-rw-r--r--klinkstatus/src/parser/mstring.cpp34
-rw-r--r--klinkstatus/src/parser/mstring.h64
-rw-r--r--klinkstatus/src/parser/node.cpp14
-rw-r--r--klinkstatus/src/parser/node.h96
-rw-r--r--klinkstatus/src/parser/node_impl.h64
-rw-r--r--klinkstatus/src/parser/url.cpp42
-rw-r--r--klinkstatus/src/parser/url.h14
-rw-r--r--klinkstatus/src/ui/celltooltip.cpp14
-rw-r--r--klinkstatus/src/ui/celltooltip.h6
-rw-r--r--klinkstatus/src/ui/documentrootdialog.cpp30
-rw-r--r--klinkstatus/src/ui/documentrootdialog.h14
-rw-r--r--klinkstatus/src/ui/klshistorycombo.cpp40
-rw-r--r--klinkstatus/src/ui/klshistorycombo.h6
-rw-r--r--klinkstatus/src/ui/resultssearchbar.cpp76
-rw-r--r--klinkstatus/src/ui/resultssearchbar.h10
-rw-r--r--klinkstatus/src/ui/resultview.cpp18
-rw-r--r--klinkstatus/src/ui/resultview.h34
-rw-r--r--klinkstatus/src/ui/sessionwidget.cpp102
-rw-r--r--klinkstatus/src/ui/sessionwidget.h18
-rw-r--r--klinkstatus/src/ui/settings/configidentificationdialog.cpp6
-rw-r--r--klinkstatus/src/ui/settings/configidentificationdialog.h2
-rw-r--r--klinkstatus/src/ui/tablelinkstatus.cpp166
-rw-r--r--klinkstatus/src/ui/tablelinkstatus.h64
-rw-r--r--klinkstatus/src/ui/tabwidgetsession.cpp54
-rw-r--r--klinkstatus/src/ui/tabwidgetsession.h12
-rw-r--r--klinkstatus/src/ui/treeview.cpp110
-rw-r--r--klinkstatus/src/ui/treeview.h40
-rw-r--r--klinkstatus/src/utils/utils.cpp18
-rw-r--r--klinkstatus/src/utils/utils.h8
-rw-r--r--klinkstatus/src/utils/xsl.cpp130
-rw-r--r--klinkstatus/src/utils/xsl.h14
52 files changed, 954 insertions, 954 deletions
diff --git a/klinkstatus/src/actionmanager.cpp b/klinkstatus/src/actionmanager.cpp
index 9f60e7bf..f126d977 100644
--- a/klinkstatus/src/actionmanager.cpp
+++ b/klinkstatus/src/actionmanager.cpp
@@ -25,7 +25,7 @@
#include <kaction.h>
#include <kguiitem.h>
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include "klinkstatus_part.h"
#include "ui/sessionwidget.h"
@@ -63,8 +63,8 @@ public:
SessionWidget* sessionWidget;
};
-ActionManager::ActionManager(QObject *parent, const char *name)
- : QObject(parent, name), d(new ActionManagerPrivate)
+ActionManager::ActionManager(TQObject *parent, const char *name)
+ : TQObject(parent, name), d(new ActionManagerPrivate)
{}
ActionManager::~ActionManager()
@@ -89,34 +89,34 @@ void ActionManager::initPart(KLinkStatusPart* part)
new KAction(i18n("New Link Check"), "filenew",
0,
- d->part, SLOT(slotNewLinkCheck()),
+ d->part, TQT_SLOT(slotNewLinkCheck()),
d->actionCollection, "new_link_check");
new KAction(i18n("Open URL..."), "fileopen",
0,
- d->part, SLOT(slotOpenLink()),
+ d->part, TQT_SLOT(slotOpenLink()),
d->actionCollection, "open_link");
action = new KAction(i18n("Close Tab"), "fileclose",
0,
- d->part, SLOT(slotClose()),
+ d->part, TQT_SLOT(slotClose()),
d->actionCollection, "close_tab");
action->setEnabled(false);
// *************** Settings menu *********************
(void) new KAction(i18n("Configure KLinkStatus..."), "configure",
- 0, d->part, SLOT(slotConfigureKLinkStatus()),
+ 0, d->part, TQT_SLOT(slotConfigureKLinkStatus()),
d->actionCollection, "configure_klinkstatus");
// *************** Help menu *********************
(void) new KAction(i18n("About KLinkStatus"), "klinkstatus",
- 0, d->part, SLOT(slotAbout()),
+ 0, d->part, TQT_SLOT(slotAbout()),
d->actionCollection, "about_klinkstatus");
(void) new KAction(i18n("&Report Bug..."), 0, 0, d->part,
- SLOT(slotReportBug()), d->actionCollection, "report_bug");
+ TQT_SLOT(slotReportBug()), d->actionCollection, "report_bug");
// *************** View menu *********************
}
@@ -133,7 +133,7 @@ void ActionManager::initTabWidget(TabWidgetSession* tabWidgetSession)
// *************** File menu *********************
KAction* action = new KAction(i18n("E&xport Results as HTML..."), "filesave", 0,
- d->tabWidgetSession, SLOT(slotExportAsHTML()),
+ d->tabWidgetSession, TQT_SLOT(slotExportAsHTML()),
d->actionCollection, "file_export_html");
action->setEnabled(false);
@@ -142,38 +142,38 @@ 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, SLOT(slotFollowLastLinkChecked()),
+ d->tabWidgetSession, TQT_SLOT(slotFollowLastLinkChecked()),
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, SLOT(slotHideSearchPanel()),
+ d->tabWidgetSession, TQT_SLOT(slotHideSearchPanel()),
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, SLOT(slotResetSearchOptions()),
+ d->tabWidgetSession, TQT_SLOT(slotResetSearchOptions()),
d->actionCollection, "reset_search_bar");
// *************** Search menu *********************
toggle_action = new KToggleAction(i18n("&Start Search"),
"player_play", "Ctrl+s",
- d->tabWidgetSession, SLOT(slotStartSearch()),
+ d->tabWidgetSession, TQT_SLOT(slotStartSearch()),
d->actionCollection, "start_search");
toggle_action->setEnabled(false);
toggle_action = new KToggleAction(i18n("&Pause Search"),
"player_pause", "Ctrl+p",
- d->tabWidgetSession, SLOT(slotPauseSearch()),
+ d->tabWidgetSession, TQT_SLOT(slotPauseSearch()),
d->actionCollection, "pause_search");
toggle_action->setEnabled(false);
action = new KAction(i18n("St&op Search"),
"player_stop", "Ctrl+c",
- d->tabWidgetSession, SLOT(slotStopSearch()),
+ d->tabWidgetSession, TQT_SLOT(slotStopSearch()),
d->actionCollection, "stop_search");
action->setEnabled(false);
}
@@ -189,7 +189,7 @@ void ActionManager::initSessionWidget(SessionWidget* sessionWidget)
}
-QWidget* ActionManager::container(const char* name)
+TQWidget* ActionManager::container(const char* name)
{
return d->part->factory()->container(name, d->part);
}
diff --git a/klinkstatus/src/actionmanager.h b/klinkstatus/src/actionmanager.h
index a33c37f4..53fc1003 100644
--- a/klinkstatus/src/actionmanager.h
+++ b/klinkstatus/src/actionmanager.h
@@ -20,7 +20,7 @@
#ifndef ACTIONMANAGER_H
#define ACTIONMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
class KAction;
class KActionCollection;
@@ -38,14 +38,14 @@ class ActionManager : public QObject
{
Q_OBJECT
public:
- ActionManager(QObject* parent=0, const char* name=0);
+ ActionManager(TQObject* parent=0, const char* name=0);
virtual ~ActionManager();
static ActionManager* getInstance();
static void setInstance(ActionManager* manager);
virtual KAction* action(const char* name, const char* classname=0);
- virtual QWidget* container(const char* name);
+ virtual TQWidget* container(const char* name);
void initPart(KLinkStatusPart* part);
void initSessionWidget(SessionWidget* sessionWidget);
diff --git a/klinkstatus/src/engine/linkchecker.cpp b/klinkstatus/src/engine/linkchecker.cpp
index bcc503ad..8186bda8 100644
--- a/klinkstatus/src/engine/linkchecker.cpp
+++ b/klinkstatus/src/engine/linkchecker.cpp
@@ -22,10 +22,10 @@
#include "../utils/utils.h"
#include "../parser/htmlparser.h"
-#include <qstring.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
+#include <tqcstring.h>
#include <kio/netaccess.h>
#include <kio/global.h>
@@ -44,8 +44,8 @@
int LinkChecker::count_ = 0;
LinkChecker::LinkChecker(LinkStatus* linkstatus, int time_out,
- QObject *parent, const char *name)
- : QObject(parent, name), search_manager_(0),
+ TQObject *parent, const char *name)
+ : TQObject(parent, name), search_manager_(0),
linkstatus_(linkstatus), t_job_(0), time_out_(time_out), checker_(0), document_charset_(),
redirection_(false), header_checked_(false), finnished_(false),
parsing_(false), is_charset_checked_(false), has_defined_charset_(false)
@@ -97,16 +97,16 @@ void LinkChecker::check()
t_job_->addMetaData("SendUserAgent", "false");
- QObject::connect(t_job_, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotData(KIO::Job *, const QByteArray &)));
- QObject::connect(t_job_, SIGNAL(mimetype(KIO::Job *, const QString &)),
- this, SLOT(slotMimetype(KIO::Job *, const QString &)));
- QObject::connect(t_job_, SIGNAL(result(KIO::Job *)),
- this, SLOT(slotResult(KIO::Job *)));
- QObject::connect(t_job_, SIGNAL(redirection(KIO::Job *, const KURL &)),
- this, SLOT(slotRedirection(KIO::Job *, const KURL &)));
+ TQObject::connect(t_job_, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ TQObject::connect(t_job_, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)),
+ this, TQT_SLOT(slotMimetype(KIO::Job *, const TQString &)));
+ TQObject::connect(t_job_, TQT_SIGNAL(result(KIO::Job *)),
+ this, TQT_SLOT(slotResult(KIO::Job *)));
+ TQObject::connect(t_job_, TQT_SIGNAL(redirection(KIO::Job *, const KURL &)),
+ this, TQT_SLOT(slotRedirection(KIO::Job *, const KURL &)));
- QTimer::singleShot( time_out_ * 1000, this, SLOT(slotTimeOut()) );
+ TQTimer::singleShot( time_out_ * 1000, this, TQT_SLOT(slotTimeOut()) );
t_job_->setInteractive(false);
}
@@ -136,7 +136,7 @@ void LinkChecker::slotTimeOut()
}
}
-void LinkChecker::slotMimetype (KIO::Job* /*job*/, const QString &type)
+void LinkChecker::slotMimetype (KIO::Job* /*job*/, const TQString &type)
{
if(finnished_)
return;
@@ -196,7 +196,7 @@ void LinkChecker::slotMimetype (KIO::Job* /*job*/, const QString &type)
}
}
-void LinkChecker::slotData(KIO::Job* /*job*/, const QByteArray& data)
+void LinkChecker::slotData(KIO::Job* /*job*/, const TQByteArray& data)
{
if(finnished_)
return;
@@ -275,18 +275,18 @@ void LinkChecker::slotData(KIO::Job* /*job*/, const QByteArray& data)
if(!is_charset_checked_)
findDocumentCharset(data);
- QTextCodec* codec = 0;
+ TQTextCodec* codec = 0;
if(has_defined_charset_)
- codec = QTextCodec::codecForName(document_charset_);
+ codec = TQTextCodec::codecForName(document_charset_);
if(!codec)
- codec = QTextCodec::codecForName("iso8859-1"); // default
+ codec = TQTextCodec::codecForName("iso8859-1"); // default
doc_html_ += codec->toUnicode(data);
}
}
}
-void LinkChecker::findDocumentCharset(QString const& doc)
+void LinkChecker::findDocumentCharset(TQString const& doc)
{
Q_ASSERT(!is_charset_checked_);
@@ -513,7 +513,7 @@ HttpResponseHeader LinkChecker::getHttpHeader(KIO::Job* /*job*/, bool remember_c
Q_ASSERT(!finnished_);
Q_ASSERT(t_job_);
- QString header_string = t_job_->queryMetaData("HTTP-Headers");
+ TQString header_string = t_job_->queryMetaData("HTTP-Headers");
// Q_ASSERT(!header_string.isNull() && !header_string.isEmpty());
// kdDebug(23100) << "HTTP header: " << endl << header_string << endl;
// kdDebug(23100) << "Keys: " << HttpResponseHeader(header_string).keys() << endl;
@@ -537,7 +537,7 @@ void LinkChecker::checkRef()
KURL url(linkStatus()->absoluteUrl());
Q_ASSERT(url.hasRef());
- QString ref = url.ref();
+ TQString ref = url.ref();
if(ref == "" || ref == "top") {
linkstatus_->setStatusText("OK");
linkstatus_->setStatus(LinkStatus::SUCCESSFULL);
@@ -545,7 +545,7 @@ void LinkChecker::checkRef()
return;
}
- QString url_base;
+ TQString url_base;
LinkStatus const* ls_parent = 0;
int i_ref = -1;
@@ -576,7 +576,7 @@ void LinkChecker::checkRef(KURL const& url)
{
Q_ASSERT(search_manager_);
- QString url_string = url.url();
+ TQString url_string = url.url();
KHTMLPart* html_part = search_manager_->htmlPart(url_string);
if(!html_part)
{
@@ -585,10 +585,10 @@ void LinkChecker::checkRef(KURL const& url)
html_part = new KHTMLPart();
html_part->setOnlyLocalReferences(true);
- QString tmpFile;
+ TQString tmpFile;
if(KIO::NetAccess::download(url, tmpFile, 0))
{
- QString doc_html = FileManager::read(tmpFile);
+ TQString doc_html = FileManager::read(tmpFile);
html_part->begin();
html_part->write(doc_html);
html_part->end();
@@ -622,7 +622,7 @@ void LinkChecker::checkRef(LinkStatus const* linkstatus_parent)
{
Q_ASSERT(search_manager_);
- QString url_string = linkstatus_parent->absoluteUrl().url();
+ TQString url_string = linkstatus_parent->absoluteUrl().url();
KHTMLPart* html_part = search_manager_->htmlPart(url_string);
if(!html_part)
{
@@ -653,7 +653,7 @@ void LinkChecker::checkRef(LinkStatus const* linkstatus_parent)
finnish();
}
-bool LinkChecker::hasAnchor(KHTMLPart* html_part, QString const& anchor)
+bool LinkChecker::hasAnchor(KHTMLPart* html_part, TQString const& anchor)
{
DOM::HTMLDocument htmlDocument = html_part->htmlDocument();
DOM::HTMLCollection anchors = htmlDocument.anchors();
@@ -686,7 +686,7 @@ void LinkChecker::killJob()
LinkStatus::Status LinkChecker::getHttpStatus() const
{
- QString status_code = QString::number(linkstatus_->httpHeader().statusCode());
+ TQString status_code = TQString::number(linkstatus_->httpHeader().statusCode());
if(status_code[0] == '2')
return LinkStatus::SUCCESSFULL;
diff --git a/klinkstatus/src/engine/linkchecker.h b/klinkstatus/src/engine/linkchecker.h
index a992e5fd..168776d9 100644
--- a/klinkstatus/src/engine/linkchecker.h
+++ b/klinkstatus/src/engine/linkchecker.h
@@ -20,9 +20,9 @@
#ifndef LINKCHECKER_H
#define LINKCHECKER_H
-#include <qobject.h>
-#include <qthread.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqthread.h>
+#include <tqstring.h>
#include <kio/jobclasses.h>
class KHTMLPart;
@@ -42,7 +42,7 @@ class LinkChecker : public QObject
Q_OBJECT
public:
LinkChecker(LinkStatus* linkstatus, int time_out = 50,
- QObject *parent = 0, const char *name = 0);
+ TQObject *parent = 0, const char *name = 0);
~LinkChecker();
//virtual void run();
@@ -51,7 +51,7 @@ public:
LinkStatus const* linkStatus() const;
- static bool hasAnchor(KHTMLPart* html_part, QString const& anchor);
+ static bool hasAnchor(KHTMLPart* html_part, TQString const& anchor);
signals:
@@ -61,9 +61,9 @@ signals:
protected slots:
- void slotData(KIO::Job *, const QByteArray &data);
+ void slotData(KIO::Job *, const TQByteArray &data);
void slotRedirection (KIO::Job *, const KURL &url);
- void slotMimetype(KIO::Job *, const QString &type);
+ void slotMimetype(KIO::Job *, const TQString &type);
void slotResult(KIO::Job* job);
void slotTimeOut();
@@ -85,7 +85,7 @@ private:
*/
bool processRedirection(KURL const& url);
- void findDocumentCharset(QString const& data);
+ void findDocumentCharset(TQString const& data);
private:
@@ -94,12 +94,12 @@ private:
KIO::TransferJob* t_job_;
int time_out_;
LinkChecker* checker_;
- QString document_charset_;
+ TQString document_charset_;
/* A redirection has appened, with the current URL. Several redirections
can happen until the final URL is reached.*/
bool redirection_;
KURL redirection_url_;
- QString doc_html_;
+ TQString doc_html_;
bool header_checked_;
bool finnished_;
bool parsing_;
diff --git a/klinkstatus/src/engine/linkfilter.cpp b/klinkstatus/src/engine/linkfilter.cpp
index 4d15f2e6..1c7a3844 100644
--- a/klinkstatus/src/engine/linkfilter.cpp
+++ b/klinkstatus/src/engine/linkfilter.cpp
@@ -22,7 +22,7 @@
#include "linkstatus.h"
-LinkMatcher::LinkMatcher(QString const& text, ResultView::Status status)
+LinkMatcher::LinkMatcher(TQString const& text, ResultView::Status status)
: m_text(text), m_status(status)
{
}
diff --git a/klinkstatus/src/engine/linkfilter.h b/klinkstatus/src/engine/linkfilter.h
index 84da16cb..6d211aa6 100644
--- a/klinkstatus/src/engine/linkfilter.h
+++ b/klinkstatus/src/engine/linkfilter.h
@@ -28,13 +28,13 @@
class LinkMatcher
{
public:
- LinkMatcher(QString const& text, ResultView::Status status);
+ LinkMatcher(TQString const& text, ResultView::Status status);
~LinkMatcher();
bool matches(LinkStatus const& link) const;
- void setText(const QString& text) { m_text = text; }
- QString text() const { return m_text; }
+ void setText(const TQString& text) { m_text = text; }
+ TQString text() const { return m_text; }
void setStatus(ResultView::Status status) { m_status = status; }
ResultView::Status status() const { return m_status; }
@@ -42,7 +42,7 @@ public:
bool nullFilter() const { return m_text.isEmpty() && m_status == ResultView::none; }
private:
- QString m_text;
+ TQString m_text;
ResultView::Status m_status;
};
diff --git a/klinkstatus/src/engine/linkstatus.cpp b/klinkstatus/src/engine/linkstatus.cpp
index c8b359ed..58841a63 100644
--- a/klinkstatus/src/engine/linkstatus.cpp
+++ b/klinkstatus/src/engine/linkstatus.cpp
@@ -25,7 +25,7 @@
#include <klocale.h>
#include <kcharsets.h>
-#include <qdom.h>
+#include <tqdom.h>
LinkStatus::~LinkStatus()
@@ -94,9 +94,9 @@ void LinkStatus::reset()
base_URI_ = "";
}
-QString const LinkStatus::toString() const
+TQString const LinkStatus::toString() const
{
- QString aux;
+ TQString aux;
if(!is_root_)
{
@@ -174,12 +174,12 @@ void LinkStatus::setMalformed(bool flag)
}
}
-void LinkStatus::save(QDomElement& element) const
+void LinkStatus::save(TQDomElement& element) const
{
- QDomElement child_element = element.ownerDocument().createElement("link");
+ TQDomElement child_element = element.ownerDocument().createElement("link");
// <url>
- QDomElement tmp_1 = element.ownerDocument().createElement("url");
+ TQDomElement tmp_1 = element.ownerDocument().createElement("url");
tmp_1.appendChild(element.ownerDocument().createTextNode(absoluteUrl().prettyURL()));
child_element.appendChild(tmp_1);
@@ -199,9 +199,9 @@ void LinkStatus::save(QDomElement& element) const
// <referers>
tmp_1 = element.ownerDocument().createElement("referrers");
- for(QValueVector<KURL>::const_iterator it = referrers_.begin(); it != referrers_.end(); ++it)
+ for(TQValueVector<KURL>::const_iterator it = referrers_.begin(); it != referrers_.end(); ++it)
{
- QDomElement tmp_2 = element.ownerDocument().createElement("url");
+ TQDomElement tmp_2 = element.ownerDocument().createElement("url");
tmp_2.appendChild(element.ownerDocument().createTextNode(it->prettyURL()));
tmp_1.appendChild(tmp_2);
diff --git a/klinkstatus/src/engine/linkstatus.h b/klinkstatus/src/engine/linkstatus.h
index e7567460..6e924129 100644
--- a/klinkstatus/src/engine/linkstatus.h
+++ b/klinkstatus/src/engine/linkstatus.h
@@ -30,9 +30,9 @@
class TreeView;
class TreeViewItem;
-#include <qstring.h>
-#include <qobject.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
class QDomElement;
#include <vector>
@@ -64,20 +64,20 @@ public:
LinkStatus(Node* node, LinkStatus* parent);
~LinkStatus();
- void save(QDomElement& element) const;
+ void save(TQDomElement& element) const;
void reset();
void setRootUrl(KURL const& url);
void setStatus(Status status);
void setDepth(uint depth);
void setParent(LinkStatus* parent);
- void setOriginalUrl(QString const& url_original);
- void setLabel(QString const& label);
+ void setOriginalUrl(TQString const& url_original);
+ void setLabel(TQString const& label);
void setAbsoluteUrl(KURL const& url_absoluto);
- void setDocHtml(QString const& doc_html);
+ void setDocHtml(TQString const& doc_html);
void setHttpHeader(HttpResponseHeader const& cabecalho_http);
- void setStatusText(QString const& statusText); // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
- void setError(QString const& error);
+ void setStatusText(TQString const& statusText); // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
+ void setError(TQString const& error);
void setIsRoot(bool flag);
void setErrorOccurred(bool houve_error);
void setIsRedirection(bool e_redirection);
@@ -93,9 +93,9 @@ public:
void setHasBaseURI(bool flag = true);
void setHasHtmlDocTitle(bool flag = true);
void setBaseURI(KURL const& base_url);
- void setHtmlDocTitle(QString const& title);
+ void setHtmlDocTitle(TQString const& title);
void setIgnored(bool flag = true);
- void setMimeType(QString const& mimetype);
+ void setMimeType(TQString const& mimetype);
void setIsErrorPage(bool flag);
void setIsLocalRestrict(bool flag);
void setTreeViewItem(TreeViewItem* tree_view_item);
@@ -107,21 +107,21 @@ public:
bool local() const; // linkstatus.paradigma.co.pt == paradigma.co.pt
bool isLocalRestrict() const; // linkstatus.paradigma.co.pt != paradigma.co.pt
LinkStatus const* parent() const;
- QString const& originalUrl() const;
- QString const& label() const;
+ TQString const& originalUrl() const;
+ TQString const& label() const;
KURL const& absoluteUrl() const;
- QString const& docHtml() const;
+ TQString const& docHtml() const;
HttpResponseHeader const& httpHeader() const;
HttpResponseHeader& httpHeader();
- QString statusText() const; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
- QString const& error() const;
+ TQString statusText() const; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
+ TQString const& error() const;
bool isRoot() const;
bool errorOccurred() const;
bool isRedirection() const;
LinkStatus* redirection() const;
Node* node() const;
vector<Node*> const& childrenNodes() const;
- QString const toString() const;
+ TQString const toString() const;
bool checked() const;
int externalDomainDepth() const;
bool onlyCheckHeader() const;
@@ -129,13 +129,13 @@ public:
bool hasBaseURI() const;
bool hasHtmlDocTitle() const;
KURL const& baseURI() const;
- QString const& htmlDocTitle() const;
+ TQString const& htmlDocTitle() const;
bool ignored() const;
bool redirectionExists(KURL const& url) const; // to avoid cyclic links
- QString mimeType() const;
+ TQString mimeType() const;
bool isErrorPage() const;
TreeViewItem* treeViewItem() const;
- QValueVector<KURL> const& referrers() const;
+ TQValueVector<KURL> const& referrers() const;
static LinkStatus* lastRedirection(LinkStatus* ls);
@@ -152,13 +152,13 @@ private:
Status status_;
int depth_;
int external_domain_depth_; // Para se poder escolher explorar domains diferentes ate n depth
- QString original_url_;
- QString label_;
+ TQString original_url_;
+ TQString label_;
KURL absolute_url_;
- QString doc_html_;
+ TQString doc_html_;
HttpResponseHeader http_header_;
- QString status_text_; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
- QString error_;
+ TQString status_text_; // FIXME Legacy. This should be eliminated in favor of LinkStatus::Status
+ TQString error_;
bool is_root_;
bool error_occurred_;
bool is_redirection_;
@@ -172,13 +172,13 @@ private:
bool has_base_URI_;
bool has_html_doc_title_;
KURL base_URI_;
- QString html_doc_title_;
+ TQString html_doc_title_;
bool ignored_;
- QString mimetype_;
+ TQString mimetype_;
bool is_error_page_;
bool is_local_restrict_;
TreeViewItem* tree_view_item_;
- QValueVector<KURL> referrers_;
+ TQValueVector<KURL> referrers_;
};
#include "../parser/url.h"
diff --git a/klinkstatus/src/engine/linkstatus_impl.h b/klinkstatus/src/engine/linkstatus_impl.h
index 3359664c..5a875b2e 100644
--- a/klinkstatus/src/engine/linkstatus_impl.h
+++ b/klinkstatus/src/engine/linkstatus_impl.h
@@ -78,17 +78,17 @@ inline void LinkStatus::setAbsoluteUrl(KURL const& url_absoluto)
absolute_url_ = url_absoluto;
}
-inline void LinkStatus::setOriginalUrl(QString const& url_original)
+inline void LinkStatus::setOriginalUrl(TQString const& url_original)
{
original_url_ = url_original;
}
-inline void LinkStatus::setLabel(QString const& label)
+inline void LinkStatus::setLabel(TQString const& label)
{
label_ = label;
}
-inline void LinkStatus::setDocHtml(QString const& doc_html)
+inline void LinkStatus::setDocHtml(TQString const& doc_html)
{
Q_ASSERT(!doc_html.isEmpty());
doc_html_ = doc_html;
@@ -99,13 +99,13 @@ inline void LinkStatus::setHttpHeader(HttpResponseHeader const& cabecalho_http)
http_header_ = cabecalho_http;
}
-inline void LinkStatus::setStatusText(QString const& status)
+inline void LinkStatus::setStatusText(TQString const& status)
{
Q_ASSERT(!status.isEmpty());
status_text_ = status;
}
-inline void LinkStatus::setError(QString const& error)
+inline void LinkStatus::setError(TQString const& error)
{
Q_ASSERT(!error.isEmpty());
error_ = error;
@@ -186,7 +186,7 @@ inline void LinkStatus::setBaseURI(KURL const& base_url)
base_URI_ = base_url;
}
-inline void LinkStatus::setHtmlDocTitle(QString const& title)
+inline void LinkStatus::setHtmlDocTitle(TQString const& title)
{
if(title.isNull() || title.isEmpty())
{
@@ -204,7 +204,7 @@ inline void LinkStatus::setIgnored(bool flag)
ignored_ = flag;
}
-inline void LinkStatus::setMimeType(QString const& mimetype)
+inline void LinkStatus::setMimeType(TQString const& mimetype)
{
Q_ASSERT(!mimetype.isNull() && !mimetype.isEmpty());
mimetype_ = mimetype;
@@ -266,12 +266,12 @@ inline LinkStatus const* LinkStatus::parent() const
return parent_;
}
-inline QString const& LinkStatus::originalUrl() const
+inline TQString const& LinkStatus::originalUrl() const
{
return original_url_;
}
-inline QString const& LinkStatus::label() const
+inline TQString const& LinkStatus::label() const
{
return label_;
}
@@ -281,7 +281,7 @@ inline KURL const& LinkStatus::absoluteUrl() const
return absolute_url_;
}
-inline QString const& LinkStatus::docHtml() const
+inline TQString const& LinkStatus::docHtml() const
{
return doc_html_;
}
@@ -296,7 +296,7 @@ inline HttpResponseHeader& LinkStatus::httpHeader()
return http_header_;
}
-inline QString LinkStatus::statusText() const
+inline TQString LinkStatus::statusText() const
{
if(errorOccurred())
return error();
@@ -304,7 +304,7 @@ inline QString LinkStatus::statusText() const
return status_text_;
else
{
- QString string_code = QString::number(httpHeader().statusCode());
+ TQString string_code = TQString::number(httpHeader().statusCode());
if(absoluteUrl().hasRef()) // ref URL
return status_text_;
else if(string_code == "200"/* or string_code == "304"*/)
@@ -314,7 +314,7 @@ inline QString LinkStatus::statusText() const
}
}
-inline QString const& LinkStatus::error() const
+inline TQString const& LinkStatus::error() const
{
return error_;
}
@@ -383,7 +383,7 @@ inline KURL const& LinkStatus::baseURI() const
return base_URI_;
}
-inline QString const& LinkStatus::htmlDocTitle() const
+inline TQString const& LinkStatus::htmlDocTitle() const
{
Q_ASSERT(has_html_doc_title_);
return html_doc_title_;
@@ -394,7 +394,7 @@ inline bool LinkStatus::ignored() const
return ignored_;
}
-inline QString LinkStatus::mimeType() const
+inline TQString LinkStatus::mimeType() const
{
Q_ASSERT(!mimetype_.isNull());
return mimetype_;
@@ -410,7 +410,7 @@ inline TreeViewItem* LinkStatus::treeViewItem() const
return tree_view_item_;
}
-inline QValueVector<KURL> const& LinkStatus::referrers() const
+inline TQValueVector<KURL> const& LinkStatus::referrers() const
{
return referrers_;
}
diff --git a/klinkstatus/src/engine/searchmanager.cpp b/klinkstatus/src/engine/searchmanager.cpp
index 81562a7a..c64c3a89 100644
--- a/klinkstatus/src/engine/searchmanager.cpp
+++ b/klinkstatus/src/engine/searchmanager.cpp
@@ -24,9 +24,9 @@
#include <khtml_part.h>
#include <kprotocolmanager.h>
-#include <qstring.h>
-#include <qvaluevector.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
+#include <tqdom.h>
#include <iostream>
#include <unistd.h>
@@ -37,8 +37,8 @@
SearchManager::SearchManager(int max_simultaneous_connections, int time_out,
- QObject *parent, const char *name)
- : QObject(parent, name),
+ TQObject *parent, const char *name)
+ : TQObject(parent, name),
max_simultaneous_connections_(max_simultaneous_connections), has_document_root_(false),
depth_(-1), current_depth_(0), external_domain_depth_(0),
current_node_(0), current_index_(0), links_being_checked_(0),
@@ -148,7 +148,7 @@ void SearchManager::startSearch(KURL const& root, SearchMode const& modo)
searching_ = true;
- //Q_ASSERT(domain_ != QString::null);
+ //Q_ASSERT(domain_ != TQString::null);
checkRoot();
}
@@ -191,11 +191,11 @@ void SearchManager::checkRoot()
LinkChecker* checker = new LinkChecker(&root_, time_out_, this, "link_checker");
checker->setSearchManager(this);
- connect(checker, SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)),
- this, SLOT(slotRootChecked(const LinkStatus *, LinkChecker *)));
+ connect(checker, TQT_SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)),
+ this, TQT_SLOT(slotRootChecked(const LinkStatus *, LinkChecker *)));
/*
- connect(checker, SIGNAL(jobFinnished(LinkChecker *)),
- this, SLOT(slotLinkCheckerFinnished(LinkChecker *)));
+ connect(checker, TQT_SIGNAL(jobFinnished(LinkChecker *)),
+ this, TQT_SLOT(slotLinkCheckerFinnished(LinkChecker *)));
*/
checker->check();
}
@@ -335,7 +335,7 @@ bool SearchManager::existUrl(KURL const& url, KURL const& url_parent) const
Q_ASSERT(tmp);
if(tmp->absoluteUrl() == url)
{ // URL exists
- QValueVector<KURL> referrers(tmp->referrers());
+ TQValueVector<KURL> referrers(tmp->referrers());
// Add new referrer
for(uint i = 0; i != referrers.size(); ++i)
@@ -352,7 +352,7 @@ bool SearchManager::existUrl(KURL const& url, KURL const& url_parent) const
return false;
}
-LinkStatus const* SearchManager::linkStatus(QString const& s_url) const
+LinkStatus const* SearchManager::linkStatus(TQString const& s_url) const
{
Q_ASSERT(!s_url.isEmpty());
@@ -483,7 +483,7 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links)
LinkStatus* ls(links[i]);
Q_ASSERT(ls);
- QString protocol = ls->absoluteUrl().protocol();
+ TQString protocol = ls->absoluteUrl().protocol();
++links_being_checked_;
Q_ASSERT(links_being_checked_ <= max_simultaneous_connections_);
@@ -524,11 +524,11 @@ void SearchManager::checkLinksSimultaneously(vector<LinkStatus*> const& links)
LinkChecker* checker = new LinkChecker(ls, time_out_, this, "link_checker");
checker->setSearchManager(this);
- connect(checker, SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)),
- this, SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *)));
+ connect(checker, TQT_SIGNAL(transactionFinished(const LinkStatus *, LinkChecker *)),
+ this, TQT_SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *)));
/*
- connect(checker, SIGNAL(jobFinnished(LinkChecker *)),
- this, SLOT(slotLinkCheckerFinnished(LinkChecker *)));
+ connect(checker, TQT_SIGNAL(jobFinnished(LinkChecker *)),
+ this, TQT_SLOT(slotLinkCheckerFinnished(LinkChecker *)));
*/
checker->check();
}
@@ -669,8 +669,8 @@ bool SearchManager::localDomain(KURL const& url) const
}
else
{
- vector<QString> referencia = tokenizeWordsSeparatedBy(domain_, QChar('/'));
- vector<QString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), QChar('/'));
+ vector<TQString> referencia = tokenizeWordsSeparatedBy(domain_, TQChar('/'));
+ vector<TQString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), TQChar('/'));
if(a_comparar.size() < referencia.size())
return false;
@@ -713,8 +713,8 @@ bool SearchManager::isLocalRestrict(KURL const& url) const
if(url_root.hasHost())
{
- vector<QString> referencia = tokenizeWordsSeparatedBy(domain_, QChar('/'));
- vector<QString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), QChar('/'));
+ vector<TQString> referencia = tokenizeWordsSeparatedBy(domain_, TQChar('/'));
+ vector<TQString> a_comparar = tokenizeWordsSeparatedBy(url.host() + url.directory(), TQChar('/'));
if(a_comparar.size() < referencia.size())
return false;
@@ -757,10 +757,10 @@ bool SearchManager::generalDomain() const
}
else
{
- vector<QString> palavras = tokenizeWordsSeparatedByDots(domain_);
+ vector<TQString> palavras = tokenizeWordsSeparatedByDots(domain_);
Q_ASSERT(palavras.size() >= 1); // host might be localhost
- QString primeira_palavra = palavras[0];
+ TQString primeira_palavra = palavras[0];
if(primeira_palavra == "www")
{
Q_ASSERT(palavras.size() >= 3);
@@ -811,7 +811,7 @@ void SearchManager::slotLinkCheckerFinnished(LinkChecker * checker)
checker = 0;
}
-KHTMLPart* SearchManager::htmlPart(QString const& key_url) const
+KHTMLPart* SearchManager::htmlPart(TQString const& key_url) const
{
if(!html_parts_.contains(key_url))
return 0;
@@ -819,7 +819,7 @@ KHTMLPart* SearchManager::htmlPart(QString const& key_url) const
return html_parts_[key_url];
}
-void SearchManager::addHtmlPart(QString const& key_url, KHTMLPart* html_part)
+void SearchManager::addHtmlPart(TQString const& key_url, KHTMLPart* html_part)
{
Q_ASSERT(!key_url.isEmpty());
Q_ASSERT(html_part);
@@ -843,10 +843,10 @@ void SearchManager::removeHtmlParts()
html_parts_.clear();
}
-void SearchManager::save(QDomElement& element) const
+void SearchManager::save(TQDomElement& element) const
{
// <url>
- QDomElement child_element = element.ownerDocument().createElement("url");
+ TQDomElement child_element = element.ownerDocument().createElement("url");
child_element.appendChild(element.ownerDocument().createTextNode(root_.absoluteUrl().prettyURL()));
element.appendChild(child_element);
@@ -859,7 +859,7 @@ void SearchManager::save(QDomElement& element) const
// <depth>
child_element = element.ownerDocument().createElement("depth");
child_element.appendChild(element.ownerDocument().
- createTextNode(searchMode() == domain ? QString("Unlimited") : QString::number(depth_)));
+ createTextNode(searchMode() == domain ? TQString("Unlimited") : TQString::number(depth_)));
element.appendChild(child_element);
// <check_parent_folders>
@@ -899,13 +899,13 @@ void SearchManager::save(QDomElement& element) const
}
}
-QString SearchManager::toXML() const
+TQString SearchManager::toXML() const
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.appendChild(doc.createProcessingInstruction( "xml",
"version=\"1.0\" encoding=\"UTF-8\""));
- QDomElement root = doc.createElement("klinkstatus");
+ TQDomElement root = doc.createElement("klinkstatus");
doc.appendChild(root);
save(root);
diff --git a/klinkstatus/src/engine/searchmanager.h b/klinkstatus/src/engine/searchmanager.h
index 135d267a..4dc68352 100644
--- a/klinkstatus/src/engine/searchmanager.h
+++ b/klinkstatus/src/engine/searchmanager.h
@@ -23,11 +23,11 @@
#include <kurl.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qregexp.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqregexp.h>
+#include <tqmap.h>
class QDomElement;
#include <vector>
@@ -39,7 +39,7 @@ class QDomElement;
using namespace std;
-typedef QMap<QString, KHTMLPart*> KHTMLPartMap;
+typedef TQMap<TQString, KHTMLPart*> KHTMLPartMap;
class SearchManager: public QObject
{
@@ -54,16 +54,16 @@ public:
};
SearchManager(int max_simultaneous_connections = 3, int time_out = 50,
- QObject *parent = 0, const char *name = 0);
+ TQObject *parent = 0, const char *name = 0);
~SearchManager();
- QString toXML() const;
- void save(QDomElement& element) const;
+ TQString toXML() const;
+ void save(TQDomElement& element) const;
KHTMLPartMap const& htmlParts() const { return html_parts_; }
- KHTMLPart* htmlPart(QString const& key_url) const;
- void addHtmlPart(QString const& key_url, KHTMLPart* html_part);
+ KHTMLPart* htmlPart(TQString const& key_url) const;
+ void addHtmlPart(TQString const& key_url, KHTMLPart* html_part);
void removeHtmlParts();
void startSearch(KURL const& root);
@@ -78,11 +78,11 @@ public:
void setSearchMode(SearchMode modo);
void setDepth(int depth);
void setExternalDomainDepth(int depth);
- void setDomain(QString const& domain);
+ void setDomain(TQString const& domain);
void setCheckParentDirs(bool flag);
void setCheckExternalLinks(bool flag);
void setCheckRegularExpressions(bool flag);
- void setRegularExpression(QString const& reg_exp, bool case_sensitive);
+ void setRegularExpression(TQString const& reg_exp, bool case_sensitive);
void setTimeOut(int time_out);
void cleanItems();
@@ -94,9 +94,9 @@ public:
SearchMode const& searchMode() const;
bool checkRegularExpressions() const { return check_regular_expressions_; }
bool existUrl(KURL const& url, KURL const& url_parent) const;
- LinkStatus const* linkStatus(QString const& s_url) const;
+ LinkStatus const* linkStatus(TQString const& s_url) const;
int checkedLinks() const;
- QTime timeElapsed() const;
+ TQTime timeElapsed() const;
bool checkParentDirs() const;
bool checkExternalLinks() const;
LinkStatus const* linkStatusRoot() const;
@@ -104,7 +104,7 @@ public:
int timeOut() const;
bool sendIdentification() const { return send_identification_; }
- QString const& userAgent() const { return user_agent_; }
+ TQString const& userAgent() const { return user_agent_; }
private:
@@ -165,19 +165,19 @@ private:
int links_being_checked_;
int finished_connections_;
int maximum_current_connections_;
- QRegExp reg_exp_;
- QString domain_;
+ TQRegExp reg_exp_;
+ TQString domain_;
bool general_domain_;
bool checked_general_domain_;
int time_out_;
int current_connections_;
bool send_identification_; // user-agent
- QString user_agent_;
+ TQString user_agent_;
bool canceled_;
bool searching_;
int checked_links_;
- QTime time_;
+ TQTime time_;
int ignored_links_;
bool check_parent_dirs_;
bool check_external_links_;
diff --git a/klinkstatus/src/engine/searchmanager_impl.h b/klinkstatus/src/engine/searchmanager_impl.h
index eaa5e572..e472ccbb 100644
--- a/klinkstatus/src/engine/searchmanager_impl.h
+++ b/klinkstatus/src/engine/searchmanager_impl.h
@@ -38,11 +38,11 @@ inline int SearchManager::checkedLinks() const
return checked_links_;
}
-inline QTime SearchManager::timeElapsed() const
+inline TQTime SearchManager::timeElapsed() const
{
int ms = time_.elapsed();
//kdDebug(23100) << "Time elapsed (ms): " << ms << endl;
- return QTime(0, 0).addMSecs(ms);
+ return TQTime(0, 0).addMSecs(ms);
}
inline void SearchManager::startSearch(KURL const& root)
@@ -65,7 +65,7 @@ inline void SearchManager::setExternalDomainDepth(int depth)
external_domain_depth_ = depth;
}
-inline void SearchManager::setDomain(QString const& domain)
+inline void SearchManager::setDomain(TQString const& domain)
{
Q_ASSERT(domain.find("http://") == -1);
domain_ = domain;
@@ -88,9 +88,9 @@ inline void SearchManager::setCheckRegularExpressions(bool flag)
check_regular_expressions_ = flag;
}
-inline void SearchManager::setRegularExpression(QString const& reg_exp, bool case_sensitive)
+inline void SearchManager::setRegularExpression(TQString const& reg_exp, bool case_sensitive)
{
- reg_exp_ = QRegExp(reg_exp, case_sensitive);
+ reg_exp_ = TQRegExp(reg_exp, case_sensitive);
}
inline void SearchManager::setTimeOut(int time_out)
diff --git a/klinkstatus/src/global.cpp b/klinkstatus/src/global.cpp
index 10395f7b..cfbfe910 100644
--- a/klinkstatus/src/global.cpp
+++ b/klinkstatus/src/global.cpp
@@ -11,8 +11,8 @@
//
#include "global.h"
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqtimer.h>
#include <dcopclient.h>
#include <dcopref.h>
@@ -40,8 +40,8 @@ Global* Global::self()
return m_self_;
}
-Global::Global(QObject *parent, const char *name)
- : QObject(parent, name), loop_started_(false)
+Global::Global(TQObject *parent, const char *name)
+ : TQObject(parent, name), loop_started_(false)
{
m_self_ = this;
dcop_client_ = kapp->dcopClient();
@@ -55,7 +55,7 @@ Global::~Global()
bool Global::isKLinkStatusEmbeddedInQuanta()
{
- QCString app_id = "quanta-" + QCString().setNum(getpid());
+ TQCString app_id = "quanta-" + TQCString().setNum(getpid());
return self()->dcop_client_->isApplicationRegistered(app_id);
}
@@ -72,7 +72,7 @@ bool Global::isQuantaAvailableViaDCOP()
else
{
self()->execCommand("ps h -o pid -C quanta -C quanta_be");
- QStringList ps_list = QStringList::split("\n", self()->script_output_);
+ TQStringList ps_list = TQStringList::split("\n", self()->script_output_);
for(uint i = 0; i != ps_list.size(); ++i)
{
@@ -87,25 +87,25 @@ bool Global::isQuantaAvailableViaDCOP()
}
}
-QCString Global::quantaDCOPAppId()
+TQCString Global::quantaDCOPAppId()
{
DCOPClient* client = kapp->dcopClient();
- QCString app_id;
+ TQCString app_id;
if(client->isApplicationRegistered("quanta")) // quanta is unnique application
app_id = "quanta";
else if(self()->isKLinkStatusEmbeddedInQuanta()) // klinkstatus is running as a part inside quanta
{
- QCString app = "quanta-";
- QCString pid = QCString().setNum(getpid());
+ TQCString app = "quanta-";
+ TQCString pid = TQCString().setNum(getpid());
app_id = app + pid;
}
else
{
self()->execCommand("ps h -o pid -C quanta -C quanta_be");
- QStringList ps_list = QStringList::split("\n", self()->script_output_);
+ TQStringList ps_list = TQStringList::split("\n", self()->script_output_);
for(uint i = 0; i != ps_list.size(); ++i)
{
@@ -129,32 +129,32 @@ KURL Global::urlWithQuantaPreviewPrefix(KURL const& url)
Q_ASSERT(isKLinkStatusEmbeddedInQuanta());
DCOPRef quanta(Global::quantaDCOPAppId(),"WindowManagerIf");
- QString string_url_with_prefix = quanta.call("urlWithPreviewPrefix", url.url());
+ TQString string_url_with_prefix = quanta.call("urlWithPreviewPrefix", url.url());
//kdDebug(23100) << "string_url_with_prefix: " << string_url_with_prefix << endl;
return KURL(string_url_with_prefix);
}
-void Global::openQuanta(QStringList const& args)
+void Global::openQuanta(TQStringList const& args)
{
- QString command(args.join(" "));
+ TQString command(args.join(" "));
Global::execCommand("quanta " + command);
}
-void Global::execCommand(QString const& command)
+void Global::execCommand(TQString const& command)
{
//We create a KProcess that executes the "ps" *nix command to get the PIDs of the
//other instances of quanta actually running
self()->process_PS_ = new KProcess();
- *(self()->process_PS_) << QStringList::split(" ",command);
+ *(self()->process_PS_) << TQStringList::split(" ",command);
- connect( self()->process_PS_, SIGNAL(receivedStdout(KProcess*,char*,int)),
- self(), SLOT(slotGetScriptOutput(KProcess*,char*,int)));
- connect( self()->process_PS_, SIGNAL(receivedStderr(KProcess*,char*,int)),
- self(), SLOT(slotGetScriptError(KProcess*,char*,int)));
- connect( self()->process_PS_, SIGNAL(processExited(KProcess*)),
- self(), SLOT(slotProcessExited(KProcess*)));
+ connect( self()->process_PS_, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ self(), TQT_SLOT(slotGetScriptOutput(KProcess*,char*,int)));
+ connect( self()->process_PS_, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ self(), TQT_SLOT(slotGetScriptError(KProcess*,char*,int)));
+ connect( self()->process_PS_, TQT_SIGNAL(processExited(KProcess*)),
+ self(), TQT_SLOT(slotProcessExited(KProcess*)));
//if KProcess fails I think a message box is needed... I will fix it
if (!self()->process_PS_->start(KProcess::NotifyOnExit,KProcess::All))
@@ -163,9 +163,9 @@ void Global::execCommand(QString const& command)
else
{
//To avoid lock-ups, start a timer.
- QTimer* timer = new QTimer(self());
- connect(timer, SIGNAL(timeout()),
- self(), SLOT(slotProcessTimeout()));
+ TQTimer* timer = new TQTimer(self());
+ connect(timer, TQT_SIGNAL(timeout()),
+ self(), TQT_SLOT(slotProcessTimeout()));
timer->start(120*1000, true);
self()->loop_started_ = true;
kapp->enter_loop();
@@ -175,9 +175,9 @@ void Global::execCommand(QString const& command)
void Global::slotGetScriptOutput(KProcess* /*process*/, char* buf, int buflen)
{
- QCString tmp( buf, buflen + 1 );
- script_output_ = QString::null;
- script_output_ = QString::fromLocal8Bit(tmp).remove(" ");
+ TQCString tmp( buf, buflen + 1 );
+ script_output_ = TQString::null;
+ script_output_ = TQString::fromLocal8Bit(tmp).remove(" ");
}
void Global::slotGetScriptError(KProcess*, char* buf, int buflen)
diff --git a/klinkstatus/src/global.h b/klinkstatus/src/global.h
index 2ee2f0c0..6f94c482 100644
--- a/klinkstatus/src/global.h
+++ b/klinkstatus/src/global.h
@@ -12,7 +12,7 @@
#ifndef GLOBAL_H
#define GLOBAL_H
-#include <qobject.h>
+#include <tqobject.h>
class QCString;
class DCOPClient;
@@ -32,15 +32,15 @@ public:
static bool isKLinkStatusEmbeddedInQuanta();
static bool isQuantaRunningAsUnique();
static bool isQuantaAvailableViaDCOP();
- static QCString quantaDCOPAppId();
+ static TQCString quantaDCOPAppId();
static KURL urlWithQuantaPreviewPrefix(KURL const& url);
//static void setLoopStarted(bool flag);
- static void openQuanta(QStringList const& args);
+ static void openQuanta(TQStringList const& args);
private:
- Global(QObject *parent = 0, const char *name = 0);
- static void execCommand(QString const& command);
+ Global(TQObject *parent = 0, const char *name = 0);
+ static void execCommand(TQString const& command);
private slots:
void slotGetScriptOutput(KProcess* process, char* buffer, int buflen);
@@ -53,7 +53,7 @@ private:
DCOPClient* dcop_client_;
bool loop_started_;
- QString script_output_;
+ TQString script_output_;
KProcess* process_PS_;
};
diff --git a/klinkstatus/src/klinkstatus.cpp b/klinkstatus/src/klinkstatus.cpp
index 7d984f0f..8628cd57 100644
--- a/klinkstatus/src/klinkstatus.cpp
+++ b/klinkstatus/src/klinkstatus.cpp
@@ -97,7 +97,7 @@ void KLinkStatus::load(const KURL& url)
void KLinkStatus::setupActions()
{
- // KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ // KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
// The above causes a segfault when using File->Quit.
// Here's Waldo's explanation:
/* I had a look. The problem is due to the SessionWidget destructor calling
@@ -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, SLOT(close()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(close()), actionCollection());
- //m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection());
- //m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection());
+ //m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection());
+ //m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection());
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
}
void KLinkStatus::setupPartActions()
@@ -137,7 +137,7 @@ void KLinkStatus::removeDuplicatedActions()
KAction* part_about_action = part_action_collection->action("about_klinkstatus");
KAction* part_report_action = part_action_collection->action("report_bug");
- QWidget* container = part_about_action->container(0); // call this only once or segfault
+ TQWidget* container = part_about_action->container(0); // call this only once or segfault
part_about_action->unplug(container);
part_report_action->unplug(container);
part_action_collection->remove(part_about_action);
@@ -184,8 +184,8 @@ void KLinkStatus::optionsConfigureKeys()
//KKeyDialog::configure(actionCollection());
KKeyDialog dlg( false, this );
- QPtrList<KXMLGUIClient> clients = guiFactory()->clients();
- for( QPtrListIterator<KXMLGUIClient> it( clients );
+ TQPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for( TQPtrListIterator<KXMLGUIClient> it( clients );
it.current(); ++it )
{
dlg.insert( (*it)->actionCollection() );
@@ -199,8 +199,8 @@ void KLinkStatus::optionsConfigureToolbars()
// use the standard toolbar editor
KEditToolbar dlg(factory());
- connect(&dlg, SIGNAL(newToolbarConfig()),
- this, SLOT(applyNewToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()),
+ this, TQT_SLOT(applyNewToolbarConfig()));
dlg.exec();
}
diff --git a/klinkstatus/src/klinkstatus_part.cpp b/klinkstatus/src/klinkstatus_part.cpp
index cf04df7a..6d8df6a8 100644
--- a/klinkstatus/src/klinkstatus_part.cpp
+++ b/klinkstatus/src/klinkstatus_part.cpp
@@ -35,7 +35,7 @@
#include <kaccel.h>
#include <kkeydialog.h>
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include "global.h"
#include "cfg/klsconfig.h"
@@ -55,9 +55,9 @@ const char KLinkStatusPart::version_[] = "0.3.2";
typedef KParts::GenericFactory<KLinkStatusPart> KLinkStatusFactory;
K_EXPORT_COMPONENT_FACTORY( libklinkstatuspart, KLinkStatusFactory )
-KLinkStatusPart::KLinkStatusPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList & /*string_list*/)
+KLinkStatusPart::KLinkStatusPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList & /*string_list*/)
: KParts::ReadOnlyPart(parent, name), m_dlgAbout(0)
{
setInstance(KLinkStatusFactory::instance());
@@ -132,7 +132,7 @@ void KLinkStatusPart::slotNewLinkCheck()
void KLinkStatusPart::slotOpenLink()
{
- QString file_name = KFileDialog::getOpenURL().url();
+ TQString file_name = KFileDialog::getOpenURL().url();
if (file_name.isEmpty() == false)
{
@@ -153,7 +153,7 @@ void KLinkStatusPart::slotConfigureKLinkStatus()
dialog->addPage(new ConfigIdentificationDialog(0), i18n("Identification"),
"agent", i18n("Configure the way KLinkstatus reports itself"));
dialog->show();
- connect(dialog, SIGNAL(settingsChanged()), tabwidget_, SLOT(slotLoadSettings()));
+ connect(dialog, TQT_SIGNAL(settingsChanged()), tabwidget_, TQT_SLOT(slotLoadSettings()));
}
void KLinkStatusPart::slotAbout()
diff --git a/klinkstatus/src/klinkstatus_part.h b/klinkstatus/src/klinkstatus_part.h
index b32c8675..857a6a93 100644
--- a/klinkstatus/src/klinkstatus_part.h
+++ b/klinkstatus/src/klinkstatus_part.h
@@ -38,9 +38,9 @@ class KLinkStatusPart: public KParts::ReadOnlyPart
{
Q_OBJECT
public:
- KLinkStatusPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QStringList& args);
+ KLinkStatusPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQStringList& args);
virtual ~KLinkStatusPart();
/** Reimplemented to disable and enable Save action */
diff --git a/klinkstatus/src/parser/htmlparser.cpp b/klinkstatus/src/parser/htmlparser.cpp
index 6bc93761..557d0d25 100644
--- a/klinkstatus/src/parser/htmlparser.cpp
+++ b/klinkstatus/src/parser/htmlparser.cpp
@@ -24,7 +24,7 @@
#include <kdebug.h>
-HtmlParser::HtmlParser(QString const& documento)
+HtmlParser::HtmlParser(TQString const& documento)
: is_content_type_set_(false), document_(documento)
{
Q_ASSERT(!documento.isEmpty());
@@ -75,16 +75,16 @@ NodeTITLE const& HtmlParser::title() const
return node_TITLE_;
}
-vector<QString> const& HtmlParser::parseNodesOfType(QString const& element)
+vector<TQString> const& HtmlParser::parseNodesOfType(TQString const& element)
{
HtmlParser::parseNodesOfType(element, document_, aux_);
return aux_;
}
-void HtmlParser::parseNodesOfType(QString const& tipo, QString const& document, vector<QString>& nodes)
+void HtmlParser::parseNodesOfType(TQString const& tipo, TQString const& document, vector<TQString>& nodes)
{
- QString node;
- QString doc(document);
+ TQString node;
+ TQString doc(document);
int inicio = 0, fim = 0;
nodes.clear();
@@ -100,7 +100,7 @@ void HtmlParser::parseNodesOfType(QString const& tipo, QString const& document,
//if( (doc[inicio] != ' ' && doc[inicio] != '\n' && doc[inicio] != '\r') )
if(!::isSpace(doc[inicio]))
{
- doc.remove(0, QString("<" + tipo).length());
+ doc.remove(0, TQString("<" + tipo).length());
continue;
}
@@ -118,7 +118,7 @@ void HtmlParser::parseNodesOfType(QString const& tipo, QString const& document,
continue;
}
- int tag_begining_go_back = (tipo.length() + QString("<").length());
+ int tag_begining_go_back = (tipo.length() + TQString("<").length());
node = doc.mid(inicio - tag_begining_go_back,
fim - inicio + tag_begining_go_back);
nodes.push_back(node);
@@ -126,7 +126,7 @@ void HtmlParser::parseNodesOfType(QString const& tipo, QString const& document,
}
}
-int HtmlParser::endOfTag(QString const& s, int index, QChar end_of_tag)
+int HtmlParser::endOfTag(TQString const& s, int index, TQChar end_of_tag)
{
if( (uint)index >= s.length() )
return -1;
@@ -167,9 +167,9 @@ vector<Node*> const& HtmlParser::nodes() const
void HtmlParser::parseNodesOfTypeA()
{
- vector<QString> const& aux = parseNodesOfType("A");
+ vector<TQString> const& aux = parseNodesOfType("A");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::size_type i = 0; i != aux.size(); ++i)
{
nodes_.push_back( new NodeA(aux[i]) );
}
@@ -177,9 +177,9 @@ void HtmlParser::parseNodesOfTypeA()
void HtmlParser::parseNodesOfTypeAREA()
{
- vector<QString> const& aux = parseNodesOfType("AREA");
+ vector<TQString> const& aux = parseNodesOfType("AREA");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::size_type i = 0; i != aux.size(); ++i)
{
nodes_.push_back( new NodeAREA(aux[i]) );
}
@@ -187,72 +187,72 @@ void HtmlParser::parseNodesOfTypeAREA()
void HtmlParser::parseNodesOfTypeLINK()
{
- vector<QString> const& aux = parseNodesOfType("LINK");
+ vector<TQString> const& aux = parseNodesOfType("LINK");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::size_type i = 0; i != aux.size(); ++i)
nodes_.push_back( new NodeLINK(aux[i]) );
}
void HtmlParser::parseNodesOfTypeMETA()
{
- vector<QString> const& aux = parseNodesOfType("META");
+ vector<TQString> const& aux = parseNodesOfType("META");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::size_type i = 0; i != aux.size(); ++i)
{
NodeMETA* node = new NodeMETA(aux[i]);
nodes_.push_back(node);
- if(!is_content_type_set_ && node->atributoHTTP_EQUIV().lower() == QString("Content-Type").lower()) {
+ if(!is_content_type_set_ && node->atributoHTTP_EQUIV().lower() == TQString("Content-Type").lower()) {
is_content_type_set_ = true;
node_META_content_type_.setNode(aux[i]);
}
}
}
-QString HtmlParser::findCharsetInMetaElement(QString const& html)
+TQString HtmlParser::findCharsetInMetaElement(TQString const& html)
{
- vector<QString> metaTags;
+ vector<TQString> metaTags;
parseNodesOfType("META", html, metaTags);
- for(vector<QString>::size_type i = 0; i != metaTags.size(); ++i)
+ for(vector<TQString>::size_type i = 0; i != metaTags.size(); ++i)
{
NodeMETA node(metaTags[i]);
- if(node.atributoHTTP_EQUIV().lower() == QString("Content-Type").lower()) {
+ if(node.atributoHTTP_EQUIV().lower() == TQString("Content-Type").lower()) {
return node.charset();
}
}
- return QString();
+ return TQString();
}
void HtmlParser::parseNodesOfTypeIMG()
{
- vector<QString> const& aux = parseNodesOfType("IMG");
+ vector<TQString> const& aux = parseNodesOfType("IMG");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::size_type i = 0; i != aux.size(); ++i)
nodes_.push_back( new NodeIMG(aux[i]) );
}
void HtmlParser::parseNodesOfTypeFRAME()
{
- vector<QString> const& aux = parseNodesOfType("FRAME");
+ vector<TQString> const& aux = parseNodesOfType("FRAME");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::size_type i = 0; i != aux.size(); ++i)
nodes_.push_back( new NodeFRAME(aux[i]) );
}
void HtmlParser::parseNodesOfTypeIFRAME()
{
- vector<QString> const& aux = parseNodesOfType("IFRAME");
+ vector<TQString> const& aux = parseNodesOfType("IFRAME");
- for(vector<QString>::size_type i = 0; i != aux.size(); ++i)
+ for(vector<TQString>::size_type i = 0; i != aux.size(); ++i)
nodes_.push_back( new NodeFRAME(aux[i]) );
}
void HtmlParser::parseNodesOfTypeBASE()
{
- QString node;
- QString doc = document_;
+ TQString node;
+ TQString doc = document_;
int inicio = 0, fim = 0;
inicio = findSeparableWord(doc, "<BASE");
@@ -269,8 +269,8 @@ void HtmlParser::parseNodesOfTypeBASE()
void HtmlParser::parseNodesOfTypeTITLE()
{
- QString node;
- QString doc = document_;
+ TQString node;
+ TQString doc = document_;
int inicio = 0, fim = 0;
inicio = findSeparableWord(doc, "<TITLE>");
@@ -289,8 +289,8 @@ void HtmlParser::parseNodesOfTypeTITLE()
void HtmlParser::stripComments()
{
- QString begin_comment = "<!--";
- QString end_comment = "-->";
+ TQString begin_comment = "<!--";
+ TQString end_comment = "-->";
uint const begin_comment_length = begin_comment.length();
int inicio = -1;
@@ -319,8 +319,8 @@ void HtmlParser::stripComments()
void HtmlParser::stripScriptContent()
{
int inicio = -1;
- QString const begin_script = "<script";
- QString const end_script = "</script>";
+ TQString const begin_script = "<script";
+ TQString const end_script = "</script>";
uint const begin_script_length = begin_script.length();
do
@@ -425,7 +425,7 @@ int main()
//ifstream stream("/var/www/html/qt-doc/functions.html");
ifstream stream("/var/www/html/index.html");
- QString content;
+ TQString content;
while(stream)
{
char c;
diff --git a/klinkstatus/src/parser/htmlparser.h b/klinkstatus/src/parser/htmlparser.h
index cf487ebf..c9e5ef10 100644
--- a/klinkstatus/src/parser/htmlparser.h
+++ b/klinkstatus/src/parser/htmlparser.h
@@ -21,7 +21,7 @@
#ifndef HTML_PARSER_H
#define HTML_PARSER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <vector>
@@ -42,7 +42,7 @@ class HtmlParser
public:
HtmlParser();
- HtmlParser(QString const& documento);
+ HtmlParser(TQString const& documento);
~HtmlParser();
vector<Node*> const& nodes() const;
@@ -58,18 +58,18 @@ public:
* Convenience function for performance as it only parse in order
* to get the charset.
*/
- static QString findCharsetInMetaElement(QString const& html);
+ static TQString findCharsetInMetaElement(TQString const& html);
// test:
void mostra() const;
private:
- vector<QString> const& parseNodesOfType(QString const& element);
+ vector<TQString> const& parseNodesOfType(TQString const& element);
/**
* Vector nodes passed for performance.
*/
- static void parseNodesOfType(QString const& element, QString const& doc, vector<QString>& nodes);
+ static void parseNodesOfType(TQString const& element, TQString const& doc, vector<TQString>& nodes);
void parseNodesOfTypeA();
void parseNodesOfTypeAREA();
@@ -89,20 +89,20 @@ private:
e.g.
endOfTag("<img src=\"bad > luck\">") => 22 (not 15)
*/
- static int endOfTag(QString const& s, int index = 0, QChar end_of_tag = '>');
+ static int endOfTag(TQString const& s, int index = 0, TQChar end_of_tag = '>');
private:
- vector<QString> aux_; // for what the hell is this? looks ugly... maybe I was drunk, can't remember
+ vector<TQString> aux_; // for what the hell is this? looks ugly... maybe I was drunk, can't remember
vector<Node*> nodes_;
NodeBASE node_BASE_;
NodeTITLE node_TITLE_;
NodeMETA node_META_content_type_;
bool is_content_type_set_;
- QString document_;
- QString script_; // Fica aqui guardado (JavaScript, etc)
- QString comments_;
+ TQString document_;
+ TQString script_; // Fica aqui guardado (JavaScript, etc)
+ TQString comments_;
};
diff --git a/klinkstatus/src/parser/http.cpp b/klinkstatus/src/parser/http.cpp
index 1133c937..6e086739 100644
--- a/klinkstatus/src/parser/http.cpp
+++ b/klinkstatus/src/parser/http.cpp
@@ -29,7 +29,7 @@
void HttpResponseHeader::parseLocation()
{
- QString cabecalho(toString());
+ TQString cabecalho(toString());
int location = findWord(cabecalho, "Location: ");
Q_ASSERT(location != -1);
@@ -55,25 +55,25 @@ void HttpResponseHeader::parseLocation()
location_ = cabecalho.mid(location, fim_de_linha - location);
}
-QString HttpResponseHeader::charset() const
+TQString HttpResponseHeader::charset() const
{
return HttpResponseHeader::charset(value("content-type"));
}
-QString HttpResponseHeader::charset(QString const& contentTypeHttpHeaderLine)
+TQString HttpResponseHeader::charset(TQString const& contentTypeHttpHeaderLine)
{
- QString _charset;
+ TQString _charset;
if(contentTypeHttpHeaderLine.isEmpty())
return _charset;
int index = contentTypeHttpHeaderLine.find("charset=");
if(index != -1)
- index += QString("charset=").length();
+ index += TQString("charset=").length();
else {
index = contentTypeHttpHeaderLine.find("charset:");
if(index != -1)
- index += QString("charset:").length();
+ index += TQString("charset:").length();
}
if(index != -1) {
diff --git a/klinkstatus/src/parser/http.h b/klinkstatus/src/parser/http.h
index 5878cfd1..b955d25d 100644
--- a/klinkstatus/src/parser/http.h
+++ b/klinkstatus/src/parser/http.h
@@ -21,8 +21,8 @@
#ifndef HTTP_H
#define HTTP_H
-#include <qhttp.h>
-#include <qstring.h>
+#include <tqhttp.h>
+#include <tqstring.h>
class HttpResponseHeader: public QHttpResponseHeader
@@ -30,39 +30,39 @@ class HttpResponseHeader: public QHttpResponseHeader
public:
HttpResponseHeader();
- HttpResponseHeader(const QHttpResponseHeader & header);
- HttpResponseHeader(QString const& str);
+ HttpResponseHeader(const TQHttpResponseHeader & header);
+ HttpResponseHeader(TQString const& str);
virtual ~HttpResponseHeader();
void parseLocation();
- QString const& location() const;
- QString charset() const;
+ TQString const& location() const;
+ TQString charset() const;
/**
* Parses the charset from this kind of server response:
* Content-Type: text/html; charset=EUC-JP
* Return an empty string in case it doesn't find nothing.
*/
- static QString charset(QString const& contentTypeHttpHeaderLine);
+ static TQString charset(TQString const& contentTypeHttpHeaderLine);
private:
- QString location_;
+ TQString location_;
};
inline HttpResponseHeader::HttpResponseHeader()
- : QHttpResponseHeader()
+ : TQHttpResponseHeader()
{
}
-inline HttpResponseHeader::HttpResponseHeader(const QHttpResponseHeader & /*header*/)
- : QHttpResponseHeader()
+inline HttpResponseHeader::HttpResponseHeader(const TQHttpResponseHeader & /*header*/)
+ : TQHttpResponseHeader()
{
}
-inline HttpResponseHeader::HttpResponseHeader(QString const& str)
- : QHttpResponseHeader()
+inline HttpResponseHeader::HttpResponseHeader(TQString const& str)
+ : TQHttpResponseHeader()
{
parse(str);
}
@@ -71,7 +71,7 @@ inline HttpResponseHeader::~HttpResponseHeader()
{
}
-inline QString const& HttpResponseHeader::location() const
+inline TQString const& HttpResponseHeader::location() const
{
return location_;
}
diff --git a/klinkstatus/src/parser/mstring.cpp b/klinkstatus/src/parser/mstring.cpp
index 114d6dc6..aa2cdec7 100644
--- a/klinkstatus/src/parser/mstring.cpp
+++ b/klinkstatus/src/parser/mstring.cpp
@@ -26,7 +26,7 @@
using namespace std;
-int findWord(QString const& s, QString const& palavra, uint a_partir_do_indice)
+int findWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice)
{
int indice = s.find(palavra, a_partir_do_indice, false);
@@ -36,7 +36,7 @@ int findWord(QString const& s, QString const& palavra, uint a_partir_do_indice)
return (indice + palavra.length());
}
-int findChar(QString const& s, QChar letra, 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);
if(index == -1)
@@ -48,10 +48,10 @@ int findChar(QString const& s, QChar letra, uint a_partir_do_indice)
/**
The string palavra, must not have any spaces.
*/
-int findSeparableWord(QString const& s_, QString const& palavra, uint a_partir_do_indice)
+int findSeparableWord(TQString const& s_, TQString const& palavra, uint a_partir_do_indice)
{
bool encontrou = true;
- QString s(s_);
+ TQString s(s_);
uint indice_palavra = 0;
int indice = a_partir_do_indice;
@@ -88,7 +88,7 @@ int findSeparableWord(QString const& s_, QString const& palavra, uint a_partir_d
return -1;
}
-int nextNonSpaceChar(QString const& s, uint i)
+int nextNonSpaceChar(TQString const& s, uint i)
{
++i;
// while( (s[i] == ' ' || s[i] == '\t' || s[i] == '\r' || s[i] == '\n')
@@ -107,7 +107,7 @@ int nextNonSpaceChar(QString const& s, uint i)
e.g.
nextSpaceChar("o biltre") => 1
*/
-int nextSpaceChar(QString const& s, uint i)
+int nextSpaceChar(TQString const& s, uint i)
{
//while( (s[i] != ' ' && s[i] != '\r' && s[i] != '\n' && s[i] != '\t') &&
//i < s.size() )
@@ -121,7 +121,7 @@ int nextSpaceChar(QString const& s, uint i)
return -1;
}
-int nextCharDifferentThan(QChar c, QString const& s, uint i)
+int nextCharDifferentThan(TQChar c, TQString const& s, uint i)
{
while(i < s.length() && s[i] == c)
++i;
@@ -132,10 +132,10 @@ int nextCharDifferentThan(QChar c, QString const& s, uint i)
return -1;
}
-vector<QString> tokenize(QString s)
+vector<TQString> tokenize(TQString s)
{
Q_ASSERT(!s.isEmpty());
- vector<QString> v;
+ vector<TQString> v;
while(true)
{
@@ -154,22 +154,22 @@ vector<QString> tokenize(QString s)
}
else
{
- QString palavra = s.mid(inicio, fim - inicio);
+ TQString palavra = s.mid(inicio, fim - inicio);
v.push_back(palavra);
s.remove(0, fim);
}
}
}
-vector<QString> tokenizeWordsSeparatedByDots(QString s)
+vector<TQString> tokenizeWordsSeparatedByDots(TQString s)
{
- vector<QString> v;
+ vector<TQString> v;
while(true)
{
int inicio = 0;
if(s[0] == '.')
- inicio = nextCharDifferentThan(QChar('.'), s, 0);
+ inicio = nextCharDifferentThan(TQChar('.'), s, 0);
if(inicio == -1)
return v;
@@ -181,16 +181,16 @@ vector<QString> tokenizeWordsSeparatedByDots(QString s)
}
else
{
- QString palavra = s.mid(inicio, fim - inicio);
+ TQString palavra = s.mid(inicio, fim - inicio);
v.push_back(palavra);
s.remove(0, fim);
}
}
}
-vector<QString> tokenizeWordsSeparatedBy(QString s, QChar criteria)
+vector<TQString> tokenizeWordsSeparatedBy(TQString s, TQChar criteria)
{
- vector<QString> v;
+ vector<TQString> v;
while(true)
{
@@ -208,7 +208,7 @@ vector<QString> tokenizeWordsSeparatedBy(QString s, QChar criteria)
}
else
{
- QString palavra = s.mid(inicio, fim - inicio);
+ TQString palavra = s.mid(inicio, fim - inicio);
v.push_back(palavra);
s.remove(0, fim);
}
diff --git a/klinkstatus/src/parser/mstring.h b/klinkstatus/src/parser/mstring.h
index cd359c7d..198850db 100644
--- a/klinkstatus/src/parser/mstring.h
+++ b/klinkstatus/src/parser/mstring.h
@@ -21,7 +21,7 @@
#ifndef STRING_H
#define STRING_H
-#include <qstring.h>
+#include <tqstring.h>
#include <vector>
#include <cctype>
@@ -37,14 +37,14 @@ typedef unsigned int uint;
e.g.
findWord("Biltre larvado", "biltre") => 6
*/
-int findWord(QString const& s, QString const& palavra, uint a_partir_do_indice = 0);
+int findWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice = 0);
/**
Similar to std::string::find but return the next index of the first char
it finds.
Case insensitive.
*/
-int findChar(QString const& s, QChar letra, uint a_partir_do_indice = 0);
+int findChar(TQString const& s, TQChar letra, uint a_partir_do_indice = 0);
/**
Same as findWord but non space chars are eliminated.
@@ -55,70 +55,70 @@ int findChar(QString const& s, QChar letra, uint a_partir_do_indice = 0);
findWord("<\na href=""></a>", "<a") => -1
findSeparableWord("<\na href=""></a>", "<a") => 3
*/
-int findSeparableWord(QString const& s, QString const& palavra, uint a_partir_do_indice = 0);
+int findSeparableWord(TQString const& s, TQString const& palavra, uint a_partir_do_indice = 0);
/**
Space means Unicode characters with decimal values
9 (TAB), 10 (LF), 11 (VT), 12 (FF), 13 (CR), and 32 (Space).
*/
-bool isSpace(QChar c);
+bool isSpace(TQChar c);
/**
Return -1 if unsuccessful.
*/
-int nextNonSpaceChar(QString const& s, uint i);
-int nextNonSpaceCharReverse(QString const& s, uint i);
-int nextSpaceChar(QString const& s, uint i);
+int nextNonSpaceChar(TQString const& s, uint i);
+int nextNonSpaceCharReverse(TQString const& s, uint i);
+int nextSpaceChar(TQString const& s, uint i);
-int nextCharDifferentThan(QChar c, QString const& s, uint i);
+int nextCharDifferentThan(TQChar c, TQString const& s, uint i);
/** Return a vector with the words */
-std::vector<QString> tokenize(QString s);
-std::vector<QString> tokenizeWordsSeparatedByDots(QString s);
-std::vector<QString> tokenizeWordsSeparatedBy(QString s, QChar criteria);
+std::vector<TQString> tokenize(TQString s);
+std::vector<TQString> tokenizeWordsSeparatedByDots(TQString s);
+std::vector<TQString> tokenizeWordsSeparatedBy(TQString s, TQChar criteria);
/**
Returns a string that has whitespace removed from the start and the end,
and which has each sequence of internal whitespace replaced with a single space.
*/
-QString simplifyWhiteSpace(QString const& s);
+TQString simplifyWhiteSpace(TQString const& s);
/**
If char 'caractere' is the last in the string 's' it is removed
*/
-void removeLastCharIfExists(QString& s, QChar caractere);
+void removeLastCharIfExists(TQString& s, TQChar caractere);
-QString upperCase(QString const& s);
-QString lowerCase(QString const& s);
+TQString upperCase(TQString const& s);
+TQString lowerCase(TQString const& s);
/**
Remove whitespaces from the end of the string
*/
-void stripWhiteSpaceFromTheEnd(QString& s);
+void stripWhiteSpaceFromTheEnd(TQString& s);
/**
Returns a string that has whitespace removed from the start and the end.
*/
-void stripWhiteSpace(QString& s);
+void stripWhiteSpace(TQString& s);
/**
Case insensitive comparisons
*/
-bool equal(QString const& s1, QString const& s2);
-bool notEqual(QString const& s1, QString const& s2);
+bool equal(TQString const& s1, TQString const& s2);
+bool notEqual(TQString const& s1, TQString const& s2);
-bool equal(QChar c1, QChar c2);
-bool notEqual(QChar c1, QChar c2);
+bool equal(TQChar c1, TQChar c2);
+bool notEqual(TQChar c1, TQChar c2);
//_________________________________________________________________________
-inline bool isSpace(QChar c)
+inline bool isSpace(TQChar c)
{
return c.isSpace();
}
-inline bool equal(QString const& s1, QString const& s2)
+inline bool equal(TQString const& s1, TQString const& s2)
{
if(s1 == s2)
return true;
@@ -126,44 +126,44 @@ inline bool equal(QString const& s1, QString const& s2)
return s1.lower() == s2.lower();
}
-inline bool notEqual(QString const& s1, QString const& s2)
+inline bool notEqual(TQString const& s1, TQString const& s2)
{
return !(equal(s1, s2));
}
-inline bool equal(QChar c1, QChar c2)
+inline bool equal(TQChar c1, TQChar c2)
{
return c1.lower() == c2.lower();
}
-inline bool notEqual(QChar c1, QChar c2)
+inline bool notEqual(TQChar c1, TQChar c2)
{
return !(equal(c1, c2));
}
-inline QString upperCase(QString const& s)
+inline TQString upperCase(TQString const& s)
{
return s.upper();
}
-inline QString lowerCase(QString const& s)
+inline TQString lowerCase(TQString const& s)
{
return s.lower();
}
-inline QString simplifyWhiteSpace(QString const& s)
+inline TQString simplifyWhiteSpace(TQString const& s)
{
return s.simplifyWhiteSpace();
}
-inline void removeLastCharIfExists(QString& s, QChar caractere)
+inline void removeLastCharIfExists(TQString& s, TQChar caractere)
{
int index = s.length() - 1;
if(s[index] == caractere)
s.remove(index);
}
-inline void stripWhiteSpace(QString& s)
+inline void stripWhiteSpace(TQString& s)
{
s = s.stripWhiteSpace();
}
diff --git a/klinkstatus/src/parser/node.cpp b/klinkstatus/src/parser/node.cpp
index 068184ae..cb5fdec4 100644
--- a/klinkstatus/src/parser/node.cpp
+++ b/klinkstatus/src/parser/node.cpp
@@ -28,9 +28,9 @@
Node________________________________________________________________________
*/
-QString Node::getAttribute(QString const& atributo)
+TQString Node::getAttribute(TQString const& atributo)
{
- QString attribute_;
+ TQString attribute_;
int fim = - 1;
bool tem_aspas_ou_plicas = false;
@@ -140,7 +140,7 @@ void NodeLink::parseLinkLabel()
fim_tag = content_.find(">", fim_tag);
if(fim_tag != -1)
- proximo_caractere = QChar(content_[++fim_tag]);
+ proximo_caractere = TQChar(content_[++fim_tag]);
}
while(fim_tag != -1 && proximo_caractere == '<'/*If the label starts by <*/);
@@ -198,10 +198,10 @@ void NodeMETA::parseAttributeURL()
}
}
-QString NodeMETA::charset() const
+TQString NodeMETA::charset() const
{
- QString charset;
- QString content(atributoCONTENT());
+ TQString charset;
+ TQString content(atributoCONTENT());
if(content.isEmpty())
return charset;
@@ -209,7 +209,7 @@ QString NodeMETA::charset() const
int index = content.find("charset=");
if(index != -1)
{
- index += QString("charset=").length();
+ index += TQString("charset=").length();
charset = content.mid(index, content.length() - index);
charset = charset.stripWhiteSpace();
}
diff --git a/klinkstatus/src/parser/node.h b/klinkstatus/src/parser/node.h
index 1d0b1fc3..0452c219 100644
--- a/klinkstatus/src/parser/node.h
+++ b/klinkstatus/src/parser/node.h
@@ -23,7 +23,7 @@
#include "mstring.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
#include <kcharsets.h>
@@ -55,18 +55,18 @@ public:
};
Node();
- Node(QString const& content);
+ Node(TQString const& content);
virtual ~Node();
- QString getAttribute(QString const& atributo);
- virtual QString const& url() const = 0;
- virtual QString const& linkLabel() const = 0; // URL label
- virtual void setNode(QString const& content);
+ TQString getAttribute(TQString const& atributo);
+ virtual TQString const& url() const = 0;
+ virtual TQString const& linkLabel() const = 0; // URL label
+ virtual void setNode(TQString const& content);
virtual void parse() = 0;
void setMalformed(bool flag = true);
virtual void setLinkType(LinkType const& lt);
- QString const& content() const;
+ TQString const& content() const;
bool malformed() const;
LinkType linkType() const;
Element element() const;
@@ -78,8 +78,8 @@ protected:
Element element_;
LinkType linktype_;
- QString link_label_;
- QString content_;
+ TQString link_label_;
+ TQString content_;
bool is_redirection_;
bool malformed_;
};
@@ -89,16 +89,16 @@ class NodeLink: public Node
{
public:
NodeLink();
- NodeLink(QString const& content);
+ NodeLink(TQString const& content);
~NodeLink()
{}
;
virtual void parse();
- virtual QString const& url() const;
- virtual QString const& linkLabel() const; // URL label
- virtual QString mailto() const;
+ virtual TQString const& url() const;
+ virtual TQString const& linkLabel() const; // URL label
+ virtual TQString mailto() const;
virtual bool isLink() const;
private:
@@ -106,17 +106,17 @@ private:
void parseLinkLabel();
private:
- QString attribute_href_;
+ TQString attribute_href_;
};
class NodeA: public NodeLink
{
public:
- NodeA(QString const& content);
+ NodeA(TQString const& content);
~NodeA()
{}
;
- QString const& attributeNAME() const;
+ TQString const& attributeNAME() const;
virtual void parse();
@@ -124,16 +124,16 @@ private:
void parseAttributeNAME();
private:
- QString attribute_name_;
+ TQString attribute_name_;
};
class NodeAREA: public NodeLink
{
public:
- NodeAREA(QString const& content);
+ NodeAREA(TQString const& content);
~NodeAREA() {};
- QString const& attributeTITLE() const;
+ TQString const& attributeTITLE() const;
virtual void parse();
@@ -141,14 +141,14 @@ private:
void parseAttributeTITLE();
private:
- QString attribute_title_;
+ TQString attribute_title_;
};
class NodeLINK: public NodeLink
{
public:
- NodeLINK(QString const& content);
+ NodeLINK(TQString const& content);
~NodeLINK()
{}
;
@@ -158,18 +158,18 @@ class NodeMETA: public Node
{
public:
NodeMETA();
- NodeMETA(QString const& content);
+ NodeMETA(TQString const& content);
~NodeMETA()
{}
;
- virtual QString const& url() const;
- virtual const QString& linkLabel() const;
+ virtual TQString const& url() const;
+ virtual const TQString& linkLabel() const;
virtual bool isLink() const;
- QString const& atributoHTTP_EQUIV() const;
- QString const& atributoNAME() const;
- QString const& atributoCONTENT() const;
- QString charset() const;
+ TQString const& atributoHTTP_EQUIV() const;
+ TQString const& atributoNAME() const;
+ TQString const& atributoCONTENT() const;
+ TQString charset() const;
bool isRedirection() const;
virtual void parse();
@@ -187,24 +187,24 @@ private:
void parseAttributeCONTENT();
private:
- QString attribute_http_equiv_;
- QString attribute_url_;
- QString attribute_name_;
- QString attribute_content_;
+ TQString attribute_http_equiv_;
+ TQString attribute_url_;
+ TQString attribute_name_;
+ TQString attribute_content_;
};
class NodeIMG: public Node
{
public:
- NodeIMG(QString const& content);
+ NodeIMG(TQString const& content);
~NodeIMG()
{}
;
virtual void parse();
- virtual QString const& url() const;
- virtual QString const& linkLabel() const; // Image label
+ virtual TQString const& url() const;
+ virtual TQString const& linkLabel() const; // Image label
virtual bool isLink() const;
private:
@@ -213,36 +213,36 @@ private:
void parseAttributeALT();
private:
- QString attribute_src_;
- QString attribute_title_;
- QString attribute_alt_;
+ TQString attribute_src_;
+ TQString attribute_title_;
+ TQString attribute_alt_;
};
class NodeFRAME: public Node
{
public:
- NodeFRAME(QString const& content);
+ NodeFRAME(TQString const& content);
~NodeFRAME()
{}
;
virtual void parse();
- virtual QString const& url() const;
- virtual QString const& linkLabel() const;
+ virtual TQString const& url() const;
+ virtual TQString const& linkLabel() const;
virtual bool isLink() const;
private:
void parseAttributeSRC();
private:
- QString attribute_src_;
+ TQString attribute_src_;
};
class NodeBASE: public NodeLink
{
public:
NodeBASE();
- NodeBASE(QString const& content);
+ NodeBASE(TQString const& content);
~NodeBASE()
{}
;
@@ -254,23 +254,23 @@ class NodeTITLE: public Node
{
public:
NodeTITLE();
- NodeTITLE(QString const& content);
+ NodeTITLE(TQString const& content);
~NodeTITLE()
{}
;
- virtual QString const& url() const;
- virtual QString const& linkLabel() const;
+ virtual TQString const& url() const;
+ virtual TQString const& linkLabel() const;
virtual void parse();
virtual bool isLink() const;
- QString const& attributeTITLE() const;
+ TQString const& attributeTITLE() const;
private:
void parseAttributeTITLE();
private:
- QString attribute_title_;
+ TQString attribute_title_;
};
diff --git a/klinkstatus/src/parser/node_impl.h b/klinkstatus/src/parser/node_impl.h
index 51249075..97224bd5 100644
--- a/klinkstatus/src/parser/node_impl.h
+++ b/klinkstatus/src/parser/node_impl.h
@@ -27,17 +27,17 @@ inline Node::~Node()
//kdDebug(23100) << "/";
}
-inline Node::Node(QString const& content)
+inline Node::Node(TQString const& content)
: content_(content), is_redirection_(false), malformed_(false)
{}
-inline void Node::setNode(QString const& content)
+inline void Node::setNode(TQString const& content)
{
content_ = content;
parse();
}
-inline QString const& Node::content() const
+inline TQString const& Node::content() const
{
return content_;
}
@@ -78,7 +78,7 @@ inline NodeLink::NodeLink()
: Node()
{}
-inline NodeLink::NodeLink(QString const& content)
+inline NodeLink::NodeLink(TQString const& content)
: Node(content)
{
parse();
@@ -89,21 +89,21 @@ inline void NodeLink::parse()
parseAttributeHREF();
}
-inline QString const& NodeLink::url() const
+inline TQString const& NodeLink::url() const
{
return attribute_href_;
}
-inline QString const& NodeLink::linkLabel() const
+inline TQString const& NodeLink::linkLabel() const
{
return link_label_;
}
-inline QString NodeLink::mailto() const
+inline TQString NodeLink::mailto() const
{
Q_ASSERT(linktype_ == Node::mailto);
- QString href = KCharsets::resolveEntities(attribute_href_);
+ TQString href = KCharsets::resolveEntities(attribute_href_);
int inicio = findWord(href, "MAILTO:");
Q_ASSERT(inicio != -1);
@@ -121,14 +121,14 @@ inline bool NodeLink::isLink() const
// class NodeA_______________________________________________________
-inline NodeA::NodeA(QString const& content)
+inline NodeA::NodeA(TQString const& content)
: NodeLink(content)
{
element_ = A;
parse();
}
-inline QString const& NodeA::attributeNAME() const
+inline TQString const& NodeA::attributeNAME() const
{
return attribute_name_;
}
@@ -146,14 +146,14 @@ inline void NodeA::parseAttributeNAME()
// class NodeAREA_______________________________________________________
-inline NodeAREA::NodeAREA(QString const& content)
+inline NodeAREA::NodeAREA(TQString const& content)
: NodeLink(content)
{
element_ = AREA;
parse();
}
-inline QString const& NodeAREA::attributeTITLE() const
+inline TQString const& NodeAREA::attributeTITLE() const
{
return attribute_title_;
}
@@ -171,7 +171,7 @@ inline void NodeAREA::parseAttributeTITLE()
// class NodeLINK________________________________________
-inline NodeLINK::NodeLINK(QString const& content)
+inline NodeLINK::NodeLINK(TQString const& content)
: NodeLink(content)
{
element_ = LINK;
@@ -185,19 +185,19 @@ inline NodeMETA::NodeMETA()
element_ = META;
}
-inline NodeMETA::NodeMETA(QString const& content)
+inline NodeMETA::NodeMETA(TQString const& content)
: Node(content)
{
element_ = META;
parse();
}
-inline QString const& NodeMETA::url() const
+inline TQString const& NodeMETA::url() const
{
return attribute_url_;
}
-inline const QString& NodeMETA::linkLabel() const
+inline const TQString& NodeMETA::linkLabel() const
{
return link_label_;
}
@@ -214,17 +214,17 @@ inline bool NodeMETA::isLink() const
return false;
}
-inline QString const& NodeMETA::atributoHTTP_EQUIV() const
+inline TQString const& NodeMETA::atributoHTTP_EQUIV() const
{
return attribute_http_equiv_;
}
-inline QString const& NodeMETA::atributoNAME() const
+inline TQString const& NodeMETA::atributoNAME() const
{
return attribute_name_;
}
-inline QString const& NodeMETA::atributoCONTENT() const
+inline TQString const& NodeMETA::atributoCONTENT() const
{
return attribute_content_;
}
@@ -263,7 +263,7 @@ inline void NodeMETA::parseAttributeCONTENT()
// class NodeIMG________________________________________
-inline NodeIMG::NodeIMG(QString const& content)
+inline NodeIMG::NodeIMG(TQString const& content)
: Node(content)
{
element_ = IMG;
@@ -277,12 +277,12 @@ inline void NodeIMG::parse()
parseAttributeALT();
}
-inline QString const& NodeIMG::url() const
+inline TQString const& NodeIMG::url() const
{
return attribute_src_;
}
-inline QString const& NodeIMG::linkLabel() const
+inline TQString const& NodeIMG::linkLabel() const
{
if(!attribute_title_.isEmpty())
return attribute_title_;
@@ -311,7 +311,7 @@ inline void NodeIMG::parseAttributeALT()
// class NodeFRAME________________________________________
-inline NodeFRAME::NodeFRAME(QString const& content)
+inline NodeFRAME::NodeFRAME(TQString const& content)
: Node(content)
{
element_ = FRAME;
@@ -323,12 +323,12 @@ inline void NodeFRAME::parse()
parseAttributeSRC();
}
-inline QString const& NodeFRAME::url() const
+inline TQString const& NodeFRAME::url() const
{
return attribute_src_;
}
-inline QString const& NodeFRAME::linkLabel() const
+inline TQString const& NodeFRAME::linkLabel() const
{
return link_label_;
}
@@ -349,7 +349,7 @@ inline NodeBASE::NodeBASE()
element_ = BASE;
}
-inline NodeBASE::NodeBASE(QString const& content)
+inline NodeBASE::NodeBASE(TQString const& content)
: NodeLink(content)
{
element_ = BASE;
@@ -369,21 +369,21 @@ inline NodeTITLE::NodeTITLE()
parse();
}
-inline NodeTITLE::NodeTITLE(QString const& content)
+inline NodeTITLE::NodeTITLE(TQString const& content)
: Node(content)
{
element_ = TITLE;
parse();
}
-inline QString const& NodeTITLE::url() const
+inline TQString const& NodeTITLE::url() const
{
- return QString::null;
+ return TQString::null;
}
-inline QString const& NodeTITLE::linkLabel() const
+inline TQString const& NodeTITLE::linkLabel() const
{
- return QString::null;
+ return TQString::null;
}
inline void NodeTITLE::parse()
@@ -396,7 +396,7 @@ inline bool NodeTITLE::isLink() const
return false;
}
-inline QString const& NodeTITLE::attributeTITLE() const
+inline TQString const& NodeTITLE::attributeTITLE() const
{
return attribute_title_;
}
diff --git a/klinkstatus/src/parser/url.cpp b/klinkstatus/src/parser/url.cpp
index f7f1f6f8..966bd509 100644
--- a/klinkstatus/src/parser/url.cpp
+++ b/klinkstatus/src/parser/url.cpp
@@ -27,9 +27,9 @@
#include <kcharsets.h>
-Node::LinkType Url::resolveLinkType(QString const& url)
+Node::LinkType Url::resolveLinkType(TQString const& url)
{
- QString aux(url);
+ TQString aux(url);
aux = KURL::decode_string(aux);
if(aux.isNull())
@@ -45,11 +45,11 @@ Node::LinkType Url::resolveLinkType(QString const& url)
return Node::relative;
}
-KURL Url::normalizeUrl(QString const& string_url, LinkStatus const& link_parent, QString const& document_root)
+KURL Url::normalizeUrl(TQString const& string_url, LinkStatus const& link_parent, TQString const& document_root)
{
- QString _string_url = string_url.stripWhiteSpace();
+ TQString _string_url = string_url.stripWhiteSpace();
- QString s_url;
+ TQString s_url;
KURL base_url;
// resolve base url
@@ -101,9 +101,9 @@ KURL Url::normalizeUrl(QString const& string_url, LinkStatus const& link_parent,
}
}
-KURL Url::normalizeUrl(QString const& string_url)
+KURL Url::normalizeUrl(TQString const& string_url)
{
- QString qs_url(KCharsets::resolveEntities(string_url.stripWhiteSpace()));
+ TQString qs_url(KCharsets::resolveEntities(string_url.stripWhiteSpace()));
if(qs_url[0] == '/')
{
@@ -145,7 +145,7 @@ bool Url::existUrl(KURL const& url, vector<LinkStatus*> const& v)
alunos.iscte.pt, iscte.pt => false.
*/
// FIXME - Rename this function to sameDomain
-bool Url::equalHost(QString const& host1, QString const& host2, bool restrict)
+bool Url::equalHost(TQString const& host1, TQString const& host2, bool restrict)
{
//Q_ASSERT(!host1.isEmpty());
//Q_ASSERT(!host2.isEmpty()); // this fails if href="javascript:......."
@@ -155,13 +155,13 @@ bool Url::equalHost(QString const& host1, QString const& host2, bool restrict)
if(host1 == host2)
return true;
- QString host1_(KNetwork::KResolver::normalizeDomain(host1));
- QString host2_(KNetwork::KResolver::normalizeDomain(host2));
+ TQString host1_(KNetwork::KResolver::normalizeDomain(host1));
+ TQString host2_(KNetwork::KResolver::normalizeDomain(host2));
removeLastCharIfExists(host1_, '/');
removeLastCharIfExists(host2_, '/');
- vector<QString> v1 = tokenizeWordsSeparatedByDots(host1_);
- vector<QString> v2 = tokenizeWordsSeparatedByDots(host2_);
+ vector<TQString> v1 = tokenizeWordsSeparatedByDots(host1_);
+ vector<TQString> v2 = tokenizeWordsSeparatedByDots(host2_);
uint const size1 = v1.size();
uint const size2 = v2.size();
@@ -172,8 +172,8 @@ bool Url::equalHost(QString const& host1, QString const& host2, bool restrict)
return false;
}
- vector<QString>::size_type aux = 0;
- vector<QString>::size_type aux2 = 0;
+ vector<TQString>::size_type aux = 0;
+ vector<TQString>::size_type aux2 = 0;
if(v1[0] == "www")
aux = 1;
if(v2[0] == "www")
@@ -198,9 +198,9 @@ bool Url::equalHost(QString const& host1, QString const& host2, bool restrict)
}
/* This should be done by parsing but I wan't to know when some new scheme comes along :) */
-bool Url::hasProtocol(QString const& url)
+bool Url::hasProtocol(TQString const& url)
{
- QString s_url(url);
+ TQString s_url(url);
s_url.stripWhiteSpace();
if(s_url[0] == '/')
@@ -248,7 +248,7 @@ bool Url::hasProtocol(QString const& url)
/**
http://linkstatus.paradigma.co.pt/en/index.html&bix=bix -> /en/index.html&bix=bix
*/
-QString Url::convertToLocal(LinkStatus const* ls)
+TQString Url::convertToLocal(LinkStatus const* ls)
{
KURL url = ls->absoluteUrl();
KURL base_url = ls->rootUrl();
@@ -309,21 +309,21 @@ bool Url::parentDir(KURL const& url1, KURL const& url2)
if(!equalHost(url1.host(), url2.host()))
return false;
- vector<QString> tokens_1 = tokenizeWordsSeparatedBy(url1.directory(true, false), QChar('/'));
- vector<QString> tokens_2 = tokenizeWordsSeparatedBy(url2.directory(true, false), QChar('/'));
+ vector<TQString> tokens_1 = tokenizeWordsSeparatedBy(url1.directory(true, false), TQChar('/'));
+ vector<TQString> tokens_2 = tokenizeWordsSeparatedBy(url2.directory(true, false), TQChar('/'));
if(tokens_1.size() == 0)
return false;
//if(tokens_2.size() > tokens_1.size() or tokens_2.size() == 0)
//return true;
- vector<QString>::size_type size = 0;
+ vector<TQString>::size_type size = 0;
if(tokens_1.size() < tokens_2.size())
size = tokens_1.size();
else
size = tokens_2.size();
- for(vector<QString>::size_type i = 0; i != size; ++i)
+ for(vector<TQString>::size_type i = 0; i != size; ++i)
{
if(tokens_2[i] != tokens_1[i])
return true;
diff --git a/klinkstatus/src/parser/url.h b/klinkstatus/src/parser/url.h
index 6f22743d..8e13d812 100644
--- a/klinkstatus/src/parser/url.h
+++ b/klinkstatus/src/parser/url.h
@@ -25,7 +25,7 @@
#include "node.h"
#include <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <vector>
@@ -36,14 +36,14 @@ class LinkStatus;
namespace Url
{
-Node::LinkType resolveLinkType(QString const& url);
-KURL normalizeUrl(QString const& string_url, LinkStatus const& link_parent, QString const& document_root);
-KURL normalizeUrl(QString const& string_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);
bool validUrl(KURL const& url);
bool existUrl(KURL const& url, vector<LinkStatus*> const& v);
-bool equalHost(QString const& host1, QString const& host2, bool restrict = false);
-bool hasProtocol(QString const& url);
-QString convertToLocal(LinkStatus const* ls);
+bool equalHost(TQString const& host1, TQString const& host2, bool restrict = false);
+bool hasProtocol(TQString const& url);
+TQString convertToLocal(LinkStatus const* ls);
bool localDomain(KURL const& url1, KURL const& url2, bool restrict = true);
bool parentDir(KURL const& url1, KURL const& url2);
bool externalLink(KURL const& url1, KURL const& url2, bool restrict = true);
diff --git a/klinkstatus/src/ui/celltooltip.cpp b/klinkstatus/src/ui/celltooltip.cpp
index b449cbce..b02b7f83 100644
--- a/klinkstatus/src/ui/celltooltip.cpp
+++ b/klinkstatus/src/ui/celltooltip.cpp
@@ -21,19 +21,19 @@
#include "celltooltip.h"
#include "tablelinkstatus.h"
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <iostream>
using namespace std;
-CellToolTip::CellToolTip ( TableLinkstatus * table, QToolTipGroup * group)
- : QToolTip(table->viewport(), group), table_(table)
+CellToolTip::CellToolTip ( TableLinkstatus * table, TQToolTipGroup * group)
+ : TQToolTip(table->viewport(), group), table_(table)
{}
-void CellToolTip::maybeTip ( const QPoint & p )
+void CellToolTip::maybeTip ( const TQPoint & p )
{
- QPoint cp = table_->viewportToContents(p);
+ TQPoint cp = table_->viewportToContents(p);
int row = table_->rowAt(cp.y());
int col = table_->columnAt(cp.x());
@@ -43,9 +43,9 @@ void CellToolTip::maybeTip ( const QPoint & p )
if(col == 0 || !table_->textFitsInCell(row, col))
{
TableItem* item = table_->myItem(row, col);
- QString tip_string = item->toolTip();
+ TQString tip_string = item->toolTip();
- QRect cr = table_->cellGeometry( row, col );
+ TQRect cr = table_->cellGeometry( row, col );
cr.moveTopLeft( table_->contentsToViewport( cr.topLeft() ) );
tip(cr, tip_string);
diff --git a/klinkstatus/src/ui/celltooltip.h b/klinkstatus/src/ui/celltooltip.h
index 33136ceb..24303adb 100644
--- a/klinkstatus/src/ui/celltooltip.h
+++ b/klinkstatus/src/ui/celltooltip.h
@@ -21,7 +21,7 @@
#ifndef CELLTOOLTIP_H
#define CELLTOOLTIP_H
-#include <qtooltip.h>
+#include <tqtooltip.h>
class TableLinkstatus;
@@ -30,11 +30,11 @@ class CellToolTip: public QToolTip
{
public:
- CellToolTip ( TableLinkstatus * table, QToolTipGroup * group = 0 );
+ CellToolTip ( TableLinkstatus * table, TQToolTipGroup * group = 0 );
protected:
- virtual void maybeTip ( const QPoint & p );
+ virtual void maybeTip ( const TQPoint & p );
private:
diff --git a/klinkstatus/src/ui/documentrootdialog.cpp b/klinkstatus/src/ui/documentrootdialog.cpp
index c2ed3e7d..8c55519e 100644
--- a/klinkstatus/src/ui/documentrootdialog.cpp
+++ b/klinkstatus/src/ui/documentrootdialog.cpp
@@ -23,21 +23,21 @@
#include <klocale.h>
#include <kurl.h>
-#include <qstring.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-DocumentRootDialog::DocumentRootDialog(QWidget *parent, QString const& url)
+DocumentRootDialog::DocumentRootDialog(TQWidget *parent, TQString const& url)
: KDialogBase(parent, "DocumentRootDialog", true, "Choose a Document Root",
KDialogBase::Ok, KDialogBase::Ok, true),
m_url(url)
{
- QWidget* page = new QWidget(this);
+ TQWidget* page = new TQWidget(this);
setMainWidget(page);
- QVBoxLayout* topLayout = new QVBoxLayout(page, 0, spacingHint());
+ TQVBoxLayout* topLayout = new TQVBoxLayout(page, 0, spacingHint());
- QLabel* label = new QLabel(i18n("As you are using a protocol different than HTTP, \nthere is no way to guess where the document root is, \nin order to resolve relative URLs like the ones started with \"/\".\n\nPlease specify one:"), page);
+ TQLabel* label = new TQLabel(i18n("As you are using a protocol different than HTTP, \nthere is no way to guess where the document root is, \nin order to resolve relative URLs like the ones started with \"/\".\n\nPlease specify one:"), page);
topLayout->addWidget(label);
m_urlRequester = new KURLRequester(page);
@@ -53,12 +53,12 @@ DocumentRootDialog::DocumentRootDialog(QWidget *parent, QString const& url)
m_urlRequester->setMode(KFile::Directory);
// enableButtonOK(false);
- connect(m_urlRequester, SIGNAL(textChanged (const QString &)),
- this, SLOT(slotTextChanged (const QString &)));
- connect(m_urlRequester, SIGNAL(returnPressed (const QString &)),
- this, SLOT(slotReturnPressed (const QString &)));
- connect(m_urlRequester, SIGNAL(urlSelected (const QString &)),
- this, SLOT(slotTextChanged (const QString &)));
+ connect(m_urlRequester, TQT_SIGNAL(textChanged (const TQString &)),
+ this, TQT_SLOT(slotTextChanged (const TQString &)));
+ connect(m_urlRequester, TQT_SIGNAL(returnPressed (const TQString &)),
+ this, TQT_SLOT(slotReturnPressed (const TQString &)));
+ connect(m_urlRequester, TQT_SIGNAL(urlSelected (const TQString &)),
+ this, TQT_SLOT(slotTextChanged (const TQString &)));
}
DocumentRootDialog::~DocumentRootDialog()
@@ -66,12 +66,12 @@ DocumentRootDialog::~DocumentRootDialog()
saveDialogSize("klinkstatus", true);
}
-void DocumentRootDialog::slotReturnPressed( const QString & )
+void DocumentRootDialog::slotReturnPressed( const TQString & )
{
slotOk();
}
-void DocumentRootDialog::slotTextChanged( const QString & s)
+void DocumentRootDialog::slotTextChanged( const TQString & s)
{
KURL url(s);
enableButtonOK(!s.isEmpty() && url.isValid());
diff --git a/klinkstatus/src/ui/documentrootdialog.h b/klinkstatus/src/ui/documentrootdialog.h
index 52696727..09657851 100644
--- a/klinkstatus/src/ui/documentrootdialog.h
+++ b/klinkstatus/src/ui/documentrootdialog.h
@@ -31,27 +31,27 @@ class DocumentRootDialog : public KDialogBase
{
Q_OBJECT
public:
- DocumentRootDialog(QWidget *parent, QString const& url);
+ DocumentRootDialog(TQWidget *parent, TQString const& url);
~DocumentRootDialog();
- void setUrl(const QString& theValue) { m_url = theValue; }
- QString url() const { return m_url; }
+ void setUrl(const TQString& theValue) { m_url = theValue; }
+ TQString url() const { return m_url; }
protected:
- virtual void closeEvent (QCloseEvent*) {}
+ virtual void closeEvent (TQCloseEvent*) {}
protected slots:
virtual void reject() {}
virtual void slotOk();
private slots:
- void slotTextChanged(const QString &);
- void slotReturnPressed(const QString &);
+ void slotTextChanged(const TQString &);
+ void slotReturnPressed(const TQString &);
private:
KURLRequester* m_urlRequester;
- QString m_url;
+ TQString m_url;
};
#endif
diff --git a/klinkstatus/src/ui/klshistorycombo.cpp b/klinkstatus/src/ui/klshistorycombo.cpp
index 36deb385..10fc7900 100644
--- a/klinkstatus/src/ui/klshistorycombo.cpp
+++ b/klinkstatus/src/ui/klshistorycombo.cpp
@@ -24,7 +24,7 @@
bool KLSHistoryCombo::items_saved_ = false;
-KLSHistoryCombo::KLSHistoryCombo(QWidget *parent, const char *name)
+KLSHistoryCombo::KLSHistoryCombo(TQWidget *parent, const char *name)
: KHistoryCombo(parent, name)
{
setMaxCount(KLSConfig::maxCountComboUrl());
@@ -32,8 +32,8 @@ KLSHistoryCombo::KLSHistoryCombo(QWidget *parent, const char *name)
setDuplicatesEnabled(false);
setAutoCompletion(false);
- connect(this, SIGNAL(activated(const QString& )),
- this, SLOT(addToHistory(const QString& )));
+ connect(this, TQT_SIGNAL(activated(const TQString& )),
+ this, TQT_SLOT(addToHistory(const TQString& )));
}
KLSHistoryCombo::~KLSHistoryCombo()
@@ -49,7 +49,7 @@ void KLSHistoryCombo::saveItems()
if(items_saved_)
return;
- QStringList items = historyItems();
+ TQStringList items = historyItems();
KLSConfig::setComboUrlHistory(items);
KLSConfig::writeConfig();
@@ -61,7 +61,7 @@ void KLSHistoryCombo::loadItems()
{
clear();
- QStringList items = KLSConfig::comboUrlHistory();
+ TQStringList items = KLSConfig::comboUrlHistory();
bool block = signalsBlocked();
blockSignals( true );
@@ -74,17 +74,17 @@ void KLSHistoryCombo::loadItems()
setCompletionMode(KGlobalSettings::completionMode());
}
-bool KLSHistoryCombo::eventFilter( QObject *o, QEvent *ev )
+bool KLSHistoryCombo::eventFilter( TQObject *o, TQEvent *ev )
{
// Handle Ctrl+Del/Backspace etc better than the Qt widget, which always
// jumps to the next whitespace.
- QLineEdit *edit = lineEdit();
+ TQLineEdit *edit = lineEdit();
if ( o == edit )
{
int type = ev->type();
- if ( type == QEvent::KeyPress )
+ if ( type == TQEvent::KeyPress )
{
- QKeyEvent *e = static_cast<QKeyEvent *>( ev );
+ TQKeyEvent *e = static_cast<TQKeyEvent *>( ev );
if ( e->key() == Key_Return || e->key() == Key_Enter )
{
@@ -106,7 +106,7 @@ bool KLSHistoryCombo::eventFilter( QObject *o, QEvent *ev )
}
}
- else if ( type == QEvent::MouseButtonDblClick )
+ else if ( type == TQEvent::MouseButtonDblClick )
{
edit->selectAll();
return true;
@@ -121,17 +121,17 @@ bool KLSHistoryCombo::eventFilter( QObject *o, QEvent *ev )
the next [/#?:], which makes more sense for URLs. The list of
chars that will stop the cursor are '/', '.', '?', '#', ':'.
*/
-void KLSHistoryCombo::selectWord(QKeyEvent *e)
+void KLSHistoryCombo::selectWord(TQKeyEvent *e)
{
- QLineEdit* edit = lineEdit();
- QString text = edit->text();
+ TQLineEdit* edit = lineEdit();
+ TQString text = edit->text();
int pos = edit->cursorPosition();
int pos_old = pos;
int count = 0;
// TODO: make these a parameter when in kdelibs/kdeui...
- QValueList<QChar> chars;
- chars << QChar('/') << QChar('.') << QChar('?') << QChar('#') << QChar(':');
+ TQValueList<TQChar> chars;
+ chars << TQChar('/') << TQChar('.') << TQChar('?') << TQChar('#') << TQChar(':');
bool allow_space_break = true;
if( e->key() == Key_Left || e->key() == Key_Backspace )
@@ -152,9 +152,9 @@ void KLSHistoryCombo::selectWord(QKeyEvent *e)
else if( e->key() == Key_Backspace )
{
edit->cursorForward(false, 1-count);
- QString text = edit->text();
+ TQString text = edit->text();
int pos_to_right = edit->text().length() - pos_old;
- QString cut = text.left(edit->cursorPosition()) + text.right(pos_to_right);
+ TQString cut = text.left(edit->cursorPosition()) + text.right(pos_to_right);
edit->setText(cut);
edit->setCursorPosition(pos_old-count+1);
}
@@ -181,10 +181,10 @@ void KLSHistoryCombo::selectWord(QKeyEvent *e)
else if( e->key() == Key_Delete )
{
edit->cursorForward(false, -count-1);
- QString text = edit->text();
+ TQString text = edit->text();
int pos_to_right = text.length() - pos - 1;
- QString cut = text.left(pos_old) +
- (pos_to_right > 0 ? text.right(pos_to_right) : QString() );
+ TQString cut = text.left(pos_old) +
+ (pos_to_right > 0 ? text.right(pos_to_right) : TQString() );
edit->setText(cut);
edit->setCursorPosition(pos_old);
}
diff --git a/klinkstatus/src/ui/klshistorycombo.h b/klinkstatus/src/ui/klshistorycombo.h
index ab990a1e..1215c3d9 100644
--- a/klinkstatus/src/ui/klshistorycombo.h
+++ b/klinkstatus/src/ui/klshistorycombo.h
@@ -24,7 +24,7 @@ class KLSHistoryCombo : public KHistoryCombo
Q_OBJECT
public:
- KLSHistoryCombo(QWidget* parent, const char* name);
+ KLSHistoryCombo(TQWidget* parent, const char* name);
~KLSHistoryCombo();
void init();
@@ -32,8 +32,8 @@ public:
void saveItems();
protected:
- virtual bool eventFilter(QObject* o, QEvent* ev);
- void selectWord(QKeyEvent* e);
+ virtual bool eventFilter(TQObject* o, TQEvent* ev);
+ void selectWord(TQKeyEvent* e);
private:
static bool items_saved_;
diff --git a/klinkstatus/src/ui/resultssearchbar.cpp b/klinkstatus/src/ui/resultssearchbar.cpp
index 7f772b54..11ec6134 100644
--- a/klinkstatus/src/ui/resultssearchbar.cpp
+++ b/klinkstatus/src/ui/resultssearchbar.cpp
@@ -27,15 +27,15 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qapplication.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qlayout.h>
+#include <tqapplication.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
class ResultsSearchBar::ResultsSearchBarPrivate
@@ -45,50 +45,50 @@ public:
: layout(0), searchLine(0), searchCombo(0), delay(400), m_lastComboIndex(0)
{}
- QString searchText;
- QTimer timer;
- QHBoxLayout* layout;
+ TQString searchText;
+ TQTimer timer;
+ TQHBoxLayout* layout;
KLineEdit* searchLine;
KComboBox* searchCombo;
int delay;
int m_lastComboIndex;
};
-ResultsSearchBar::ResultsSearchBar(QWidget* parent, const char* name)
- : QWidget(parent, name), d(new ResultsSearchBar::ResultsSearchBarPrivate)
+ResultsSearchBar::ResultsSearchBar(TQWidget* parent, const char* name)
+ : TQWidget(parent, name), d(new ResultsSearchBar::ResultsSearchBarPrivate)
{
- setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed));
+ setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed));
- d->layout = new QHBoxLayout(this);
+ d->layout = new TQHBoxLayout(this);
d->layout->setMargin(2);
d->layout->setSpacing(5);
- QToolButton* clearButton = new QToolButton(this);
- clearButton->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase"));
+ TQToolButton* clearButton = new TQToolButton(this);
+ clearButton->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase"));
clearButton->setAutoRaise(true);
d->layout->addWidget(clearButton);
- QLabel* searchLabel = new QLabel(this);
+ TQLabel* searchLabel = new TQLabel(this);
searchLabel->setText(i18n("S&earch:"));
d->layout->addWidget(searchLabel);
d->searchLine = new KLineEdit(this, "searchline");
- connect(d->searchLine, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotSearchStringChanged(const QString &)));
+ connect(d->searchLine, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotSearchStringChanged(const TQString &)));
searchLabel->setBuddy(d->searchLine);
d->layout->addWidget(d->searchLine);
- QLabel* statusLabel = new QLabel(this);
+ TQLabel* statusLabel = new TQLabel(this);
statusLabel->setText( i18n("Status:") );
d->layout->addWidget(statusLabel);
d->searchCombo = new KComboBox(this, "searchcombo");
- QPixmap iconAll = KGlobal::iconLoader()->loadIcon("exec", KIcon::Small);
- QPixmap iconGood = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
- QPixmap iconBroken = KGlobal::iconLoader()->loadIcon("no", KIcon::Small);
- QPixmap iconMalformed = KGlobal::iconLoader()->loadIcon("bug", KIcon::Small);
- QPixmap iconUndetermined = KGlobal::iconLoader()->loadIcon("help", KIcon::Small);
+ TQPixmap iconAll = KGlobal::iconLoader()->loadIcon("exec", KIcon::Small);
+ TQPixmap iconGood = KGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
+ TQPixmap iconBroken = KGlobal::iconLoader()->loadIcon("no", KIcon::Small);
+ TQPixmap iconMalformed = KGlobal::iconLoader()->loadIcon("bug", KIcon::Small);
+ TQPixmap iconUndetermined = KGlobal::iconLoader()->loadIcon("help", KIcon::Small);
d->searchCombo->insertItem(iconAll, i18n("All Links"));
d->searchCombo->insertItem(iconGood, i18n("Good Links"));
@@ -97,17 +97,17 @@ ResultsSearchBar::ResultsSearchBar(QWidget* parent, const char* name)
d->searchCombo->insertItem(iconUndetermined, i18n("Undetermined Links"));
d->layout->addWidget(d->searchCombo);
- QToolTip::add(clearButton, i18n("Clear filter"));
- QToolTip::add( d->searchLine, i18n("Enter the terms to filter the result link list"));
- QToolTip::add( d->searchCombo, i18n("Choose what kind of link status to show in result list"));
+ TQToolTip::add(clearButton, i18n("Clear filter"));
+ TQToolTip::add( d->searchLine, i18n("Enter the terms to filter the result link list"));
+ TQToolTip::add( d->searchCombo, i18n("Choose what kind of link status to show in result list"));
- connect(clearButton, SIGNAL( clicked() ),
- this, SLOT(slotClearSearch()) );
+ connect(clearButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT(slotClearSearch()) );
- connect(d->searchCombo, SIGNAL(activated(int)),
- this, SLOT(slotSearchComboChanged(int)));
+ connect(d->searchCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotSearchComboChanged(int)));
- connect(&(d->timer), SIGNAL(timeout()), this, SLOT(slotActivateSearch()));
+ connect(&(d->timer), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotActivateSearch()));
}
ResultsSearchBar::~ResultsSearchBar()
@@ -116,7 +116,7 @@ ResultsSearchBar::~ResultsSearchBar()
d = 0;
}
-QString const& ResultsSearchBar::text() const
+TQString const& ResultsSearchBar::text() const
{
return d->searchText;
}
@@ -152,7 +152,7 @@ void ResultsSearchBar::slotSetStatus(int status)
d->searchCombo->setCurrentItem(status);
}
-void ResultsSearchBar::slotSetText(const QString& text)
+void ResultsSearchBar::slotSetText(const TQString& text)
{
d->searchLine->setText(text);
}
@@ -170,7 +170,7 @@ void ResultsSearchBar::slotSearchComboChanged(int index)
d->timer.start(200, true);
}
-void ResultsSearchBar::slotSearchStringChanged(const QString& search)
+void ResultsSearchBar::slotSearchStringChanged(const TQString& search)
{
if(d->timer.isActive())
d->timer.stop();
diff --git a/klinkstatus/src/ui/resultssearchbar.h b/klinkstatus/src/ui/resultssearchbar.h
index 67d30a99..16d254c7 100644
--- a/klinkstatus/src/ui/resultssearchbar.h
+++ b/klinkstatus/src/ui/resultssearchbar.h
@@ -21,7 +21,7 @@
#ifndef RESULTSSEARCHBAR_H
#define RESULTSSEARCHBAR_H
-#include <qstring.h>
+#include <tqstring.h>
#include "resultview.h"
#include "../engine/linkfilter.h"
@@ -34,10 +34,10 @@ class ResultsSearchBar : public QWidget
{
Q_OBJECT
public:
- ResultsSearchBar(QWidget *parent = 0, const char *name = 0);
+ ResultsSearchBar(TQWidget *parent = 0, const char *name = 0);
~ResultsSearchBar();
- QString const& text() const;
+ TQString const& text() const;
int status() const;
void setDelay(int ms);
@@ -52,11 +52,11 @@ signals:
public slots:
void slotClearSearch();
void slotSetStatus(int status);
- void slotSetText(const QString& text);
+ void slotSetText(const TQString& text);
private slots:
- void slotSearchStringChanged(const QString& search);
+ void slotSearchStringChanged(const TQString& search);
void slotSearchComboChanged(int index);
void slotActivateSearch();
diff --git a/klinkstatus/src/ui/resultview.cpp b/klinkstatus/src/ui/resultview.cpp
index 4078bfca..737b901b 100644
--- a/klinkstatus/src/ui/resultview.cpp
+++ b/klinkstatus/src/ui/resultview.cpp
@@ -12,17 +12,17 @@
#include "resultview.h"
#include "../engine/linkstatus.h"
-#include <qpainter.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
#include <klocale.h>
#include <kurl.h>
#include <kiconloader.h>
-const QString ResultView::URL_LABEL = "URL";
-const QString ResultView::STATUS_LABEL = "Status";
-const QString ResultView::MARKUP_LABEL = "Markup";
-const QString ResultView::LINK_LABEL_LABEL = "Label";
+const TQString ResultView::URL_LABEL = "URL";
+const TQString ResultView::STATUS_LABEL = "Status";
+const TQString ResultView::MARKUP_LABEL = "Markup";
+const TQString ResultView::LINK_LABEL_LABEL = "Label";
// ******************************* ResultView ********************************
@@ -40,7 +40,7 @@ ResultView::ResultView()
ResultView::~ResultView()
{}
-void ResultView::setColumns(QStringList const& columns)
+void ResultView::setColumns(TQStringList const& columns)
{
Q_ASSERT(columns.size() != 0);
@@ -129,7 +129,7 @@ LinkStatus const* ResultViewItem::linkStatus() const
return ls_;
}
-QColor const& ResultViewItem::textStatusColor() const
+TQColor const& ResultViewItem::textStatusColor() const
{
if(linkStatus()->errorOccurred())
{
@@ -148,7 +148,7 @@ QColor const& ResultViewItem::textStatusColor() const
else
{
- QString status_code(QString::number(linkStatus()->httpHeader().statusCode()));
+ TQString status_code(TQString::number(linkStatus()->httpHeader().statusCode()));
if(status_code[0] == '0')
{
diff --git a/klinkstatus/src/ui/resultview.h b/klinkstatus/src/ui/resultview.h
index e6d3e789..43a52427 100644
--- a/klinkstatus/src/ui/resultview.h
+++ b/klinkstatus/src/ui/resultview.h
@@ -21,9 +21,9 @@
#ifndef RESULTVIEW_H
#define RESULTVIEW_H
-#include <qvaluevector.h>
-#include <qpopupmenu.h>
-#include <qstringlist.h>
+#include <tqvaluevector.h>
+#include <tqpopupmenu.h>
+#include <tqstringlist.h>
class KURL;
@@ -38,10 +38,10 @@ class ResultView
{
public:
- static const QString URL_LABEL;
- static const QString STATUS_LABEL;
- static const QString MARKUP_LABEL;
- static const QString LINK_LABEL_LABEL;
+ static const TQString URL_LABEL;
+ static const TQString STATUS_LABEL;
+ static const TQString MARKUP_LABEL;
+ static const TQString LINK_LABEL_LABEL;
enum Status {
none = 0,
@@ -60,7 +60,7 @@ public:
virtual void showAll() = 0;
//virtual void ensureCellVisible(int row, int col) = 0;
- virtual void setColumns(QStringList const& columns);
+ virtual void setColumns(TQStringList const& columns);
static bool displayableWithStatus(LinkStatus const* ls, Status const& status);
int numberOfColumns() const { return number_of_columns_; }
@@ -73,11 +73,11 @@ public:
protected:
//virtual bool textFitsInCell(int row, int col) const = 0;
virtual bool isEmpty() const = 0;
- virtual void loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root = false) = 0;
+ virtual void loadContextTableMenu(TQValueVector<KURL> const& referrers, bool is_root = false) = 0;
protected slots:
- //virtual void slotPopupContextMenu(int row, int col, const QPoint& pos) = 0;
+ //virtual void slotPopupContextMenu(int row, int col, const TQPoint& pos) = 0;
virtual void slotCopyUrlToClipboard() const = 0;
virtual void slotCopyParentUrlToClipboard() const = 0;
virtual void slotCopyCellTextToClipboard() const = 0;
@@ -88,13 +88,13 @@ protected slots:
virtual void slotViewParentUrlInBrowser() = 0;
protected:
- QStringList columns_;
+ TQStringList columns_;
int col_status_;
int col_label_;
int col_url_;
int col_markup_; // optional
- QPopupMenu context_table_menu_;
- QPopupMenu* sub_menu_;
+ TQPopupMenu context_table_menu_;
+ TQPopupMenu* sub_menu_;
CellToolTip* cell_tip_;
private:
@@ -112,14 +112,14 @@ public:
virtual void setColumnIndex(int i);
virtual int columnIndex() const;
- virtual QString toolTip() const = 0;
+ virtual TQString toolTip() const = 0;
LinkStatus const* linkStatus() const;
protected:
- QColor const& textStatusColor() const;
- virtual void paint( QPainter *p, const QColorGroup &cg,
- const QRect &cr, bool selected ) = 0;
+ TQColor const& textStatusColor() const;
+ virtual void paint( TQPainter *p, const TQColorGroup &cg,
+ const TQRect &cr, bool selected ) = 0;
virtual void setText() = 0;
virtual void setPixmap() = 0;
diff --git a/klinkstatus/src/ui/sessionwidget.cpp b/klinkstatus/src/ui/sessionwidget.cpp
index da128070..f729ca3e 100644
--- a/klinkstatus/src/ui/sessionwidget.cpp
+++ b/klinkstatus/src/ui/sessionwidget.cpp
@@ -35,18 +35,18 @@
#include <kstandarddirs.h>
#include <kio/netaccess.h>
-#include <qevent.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlistbox.h>
-#include <qstringlist.h>
-#include <qbuttongroup.h>
-#include <qtoolbutton.h>
-#include <qregexp.h>
+#include <tqevent.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlistbox.h>
+#include <tqstringlist.h>
+#include <tqbuttongroup.h>
+#include <tqtoolbutton.h>
+#include <tqregexp.h>
#include "sessionwidget.h"
#include "tablelinkstatus.h"
@@ -66,7 +66,7 @@
SessionWidget::SessionWidget(int max_simultaneous_connections, int time_out,
- QWidget* parent, const char* name, WFlags f)
+ TQWidget* parent, const char* name, WFlags f)
: SessionWidgetBase(parent, name, f), search_manager_(0),
action_manager_(ActionManager::getInstance()),
ready_(true), to_start_(false), to_pause_(false), to_stop_(false),
@@ -81,13 +81,13 @@ SessionWidget::SessionWidget(int max_simultaneous_connections, int time_out,
init();
slotLoadSettings();
- connect(combobox_url, SIGNAL( textChanged ( const QString & ) ),
- this, SLOT( slotEnableCheckButton( const QString & ) ) );
+ connect(combobox_url, TQT_SIGNAL( textChanged ( const TQString & ) ),
+ this, TQT_SLOT( slotEnableCheckButton( const TQString & ) ) );
- connect(tree_view, SIGNAL( clicked ( QListViewItem * ) ),
- this, SLOT( showBottomStatusLabel( QListViewItem * ) ) );
+ connect(tree_view, TQT_SIGNAL( clicked ( TQListViewItem * ) ),
+ this, TQT_SLOT( showBottomStatusLabel( TQListViewItem * ) ) );
- connect(&bottom_status_timer_, SIGNAL(timeout()), this, SLOT(clearBottomStatusLabel()) );
+ connect(&bottom_status_timer_, TQT_SIGNAL(timeout()), this, TQT_SLOT(clearBottomStatusLabel()) );
}
SessionWidget::~SessionWidget()
@@ -105,16 +105,16 @@ void SessionWidget::init()
toolButton_clear_combo->setIconSet(SmallIconSet("locationbar_erase"));
pushbutton_url->setIconSet(KGlobal::iconLoader()->loadIconSet("fileopen", KIcon::Small));
- QPixmap pixMap = KGlobal::iconLoader()->loadIcon("fileopen", KIcon::Small);
+ TQPixmap pixMap = KGlobal::iconLoader()->loadIcon("fileopen", KIcon::Small);
pushbutton_url->setFixedSize(pixMap.width() + 8, pixMap.height() + 8);
- connect(pushbutton_url, SIGNAL(clicked()), this, SLOT(slotChooseUrlDialog()));
+ connect(pushbutton_url, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChooseUrlDialog()));
resultsSearchBar->hide();
start_search_action_ = static_cast<KToggleAction*> (action_manager_->action("start_search"));
- connect(resultsSearchBar, SIGNAL(signalSearch(LinkMatcher)),
- this, SLOT(slotApplyFilter(LinkMatcher)));
+ connect(resultsSearchBar, TQT_SIGNAL(signalSearch(LinkMatcher)),
+ this, TQT_SLOT(slotApplyFilter(LinkMatcher)));
}
void SessionWidget::slotLoadSettings(bool modify_current_widget_settings)
@@ -154,23 +154,23 @@ void SessionWidget::newSearchManager()
this, "search_manager");
Q_ASSERT(search_manager_);
- connect(search_manager_, SIGNAL(signalRootChecked(const LinkStatus *, LinkChecker *)),
- this, SLOT(slotRootChecked(const LinkStatus *, LinkChecker *)));
- connect(search_manager_, SIGNAL(signalLinkChecked(const LinkStatus *, LinkChecker *)),
- this, SLOT(slotLinkChecked(const LinkStatus *, LinkChecker *)));
- connect(search_manager_, SIGNAL(signalSearchFinished()),
- this, SLOT(slotSearchFinished()));
- connect(search_manager_, SIGNAL(signalSearchPaused()),
- this, SLOT(slotSearchPaused()));
- connect(search_manager_, SIGNAL(signalAddingLevelTotalSteps(uint)),
- this, SLOT(slotAddingLevelTotalSteps(uint)));
- connect(search_manager_, SIGNAL(signalAddingLevelProgress()),
- this, SLOT(slotAddingLevelProgress()));
- connect(search_manager_, SIGNAL(signalLinksToCheckTotalSteps(uint)),
- this, SLOT(slotLinksToCheckTotalSteps(uint)));
+ 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(signalSearchFinished()),
+ this, TQT_SLOT(slotSearchFinished()));
+ connect(search_manager_, TQT_SIGNAL(signalSearchPaused()),
+ this, TQT_SLOT(slotSearchPaused()));
+ connect(search_manager_, TQT_SIGNAL(signalAddingLevelTotalSteps(uint)),
+ this, TQT_SLOT(slotAddingLevelTotalSteps(uint)));
+ connect(search_manager_, TQT_SIGNAL(signalAddingLevelProgress()),
+ this, TQT_SLOT(slotAddingLevelProgress()));
+ connect(search_manager_, TQT_SIGNAL(signalLinksToCheckTotalSteps(uint)),
+ this, TQT_SLOT(slotLinksToCheckTotalSteps(uint)));
}
-void SessionWidget::setColumns(QStringList const& colunas)
+void SessionWidget::setColumns(TQStringList const& colunas)
{
tree_view->setColumns(colunas);
}
@@ -192,7 +192,7 @@ SearchManager const* SessionWidget::getSearchManager() const
return search_manager_;
}
-void SessionWidget::slotEnableCheckButton(const QString & s)
+void SessionWidget::slotEnableCheckButton(const TQString & s)
{
if(!(stopped_ && !pendingActions()))
return;
@@ -251,7 +251,7 @@ void SessionWidget::slotCheck()
if(!url.protocol().startsWith("http"))
{
- QString documentRootHint = url.directory().isEmpty() ? "/" : url.directory();
+ TQString documentRootHint = url.directory().isEmpty() ? "/" : url.directory();
DocumentRootDialog dialog(this, documentRootHint);
dialog.exec();
search_manager_->setDocumentRoot(KURL::fromPathOrURL(dialog.url()));
@@ -319,7 +319,7 @@ void SessionWidget::slotCheck()
slotSetTimeElapsed();
}
-void SessionWidget::keyPressEvent ( QKeyEvent* e )
+void SessionWidget::keyPressEvent ( TQKeyEvent* e )
{
if( e->key() == Qt::Key_Return &&
( combobox_url->hasFocus() ||
@@ -488,12 +488,12 @@ void SessionWidget::slotSearchPaused()
emit signalSearchPaused();
}
-void SessionWidget::insertUrlAtCombobox(QString const& url)
+void SessionWidget::insertUrlAtCombobox(TQString const& url)
{
combobox_url->addToHistory(url);
}
-void SessionWidget::showBottomStatusLabel(QListViewItem* item)
+void SessionWidget::showBottomStatusLabel(TQListViewItem* item)
{
kdDebug(23100) << "SessionWidget::showBottomStatusLabel" << endl;
@@ -503,13 +503,13 @@ void SessionWidget::showBottomStatusLabel(QListViewItem* item)
TreeViewItem* _item = tree_view->myItem(item);
if(_item)
{
- QString status = _item->linkStatus()->statusText();
+ TQString status = _item->linkStatus()->statusText();
textlabel_status->setText(status);
if(textlabel_status->sizeHint().width() > textlabel_status->maximumWidth())
- QToolTip::add(textlabel_status, status);
+ TQToolTip::add(textlabel_status, status);
else
- QToolTip::remove(textlabel_status);
+ TQToolTip::remove(textlabel_status);
bottom_status_timer_.stop();
bottom_status_timer_.start(5 * 1000, true);
@@ -683,12 +683,12 @@ void SessionWidget::slotApplyFilter(LinkMatcher link_matcher)
void SessionWidget::slotExportAsHTML( )
{
- KURL url = KFileDialog::getSaveURL(QString::null,"text/html", 0, i18n("Export Results as HTML"));
+ KURL url = KFileDialog::getSaveURL(TQString::null,"text/html", 0, i18n("Export Results as HTML"));
if(url.isEmpty())
return;
- QString filename;
+ TQString filename;
KTempFile tmp; // ### only used for network export
if(url.isLocalFile())
@@ -699,13 +699,13 @@ void SessionWidget::slotExportAsHTML( )
KSaveFile *savefile = new KSaveFile(filename);
if(savefile->status() == 0) // ok
{
- QTextStream *outputStream = savefile->textStream();
- outputStream->setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream *outputStream = savefile->textStream();
+ outputStream->setEncoding(TQTextStream::UnicodeUTF8);
- QString xslt_doc = FileManager::read(locate("appdata", "styles/results_stylesheet.xsl"));
+ TQString xslt_doc = FileManager::read(locate("appdata", "styles/results_stylesheet.xsl"));
XSLT xslt(xslt_doc);
// kdDebug(23100) << search_manager_->toXML() << endl;
- QString html_ouptut = xslt.transform(search_manager_->toXML());
+ TQString html_ouptut = xslt.transform(search_manager_->toXML());
(*outputStream) << html_ouptut << endl;
savefile->close();
diff --git a/klinkstatus/src/ui/sessionwidget.h b/klinkstatus/src/ui/sessionwidget.h
index af525a08..6b5e631d 100644
--- a/klinkstatus/src/ui/sessionwidget.h
+++ b/klinkstatus/src/ui/sessionwidget.h
@@ -29,8 +29,8 @@ class TableItem;
class ActionManager;
class LinkMatcher;
-#include <qtimer.h>
-#include <qstring.h>
+#include <tqtimer.h>
+#include <tqstring.h>
class QStringList;
class QListViewItem;
@@ -49,11 +49,11 @@ class SessionWidget: public SessionWidgetBase
public:
SessionWidget(int max_simultaneous_connections = 3, int time_out = 50,
- QWidget* parent = 0, const char* name = 0, WFlags f = 0);
+ TQWidget* parent = 0, const char* name = 0, WFlags f = 0);
~SessionWidget();
- void setColumns(QStringList const& colunas);
+ void setColumns(TQStringList const& colunas);
void setUrl(KURL const& url);
bool treeDisplay() const { return tree_display_; }
@@ -95,13 +95,13 @@ private slots:
virtual void slotCancel() {} // FIXME hack
//virtual void slotSuggestDomain(bool toogle);
- void slotEnableCheckButton(const QString &);
+ void slotEnableCheckButton(const TQString &);
void slotRootChecked(LinkStatus const* linkstatus, LinkChecker * anal);
void slotLinkChecked(LinkStatus const* linkstatus, LinkChecker * anal);
void slotSearchFinished();
void slotSearchPaused();
/** Shows the status of the clicked URL (row) for 5 seconds */
- void showBottomStatusLabel(QListViewItem* item);
+ void showBottomStatusLabel(TQListViewItem* item);
void clearBottomStatusLabel();
void slotSetTimeElapsed();
void newSearchManager();
@@ -116,9 +116,9 @@ private slots:
private:
- virtual void keyPressEvent ( QKeyEvent* e );
+ virtual void keyPressEvent ( TQKeyEvent* e );
bool validFields();
- void insertUrlAtCombobox(QString const& url);
+ void insertUrlAtCombobox(TQString const& url);
void init();
void saveCurrentCheckSettings();
bool pendingActions() const;
@@ -136,7 +136,7 @@ private:
bool paused_;
bool stopped_;
- QTimer bottom_status_timer_;
+ TQTimer bottom_status_timer_;
int max_simultaneous_connections_;
int time_out_;
bool tree_display_; // tree/flat result display
diff --git a/klinkstatus/src/ui/settings/configidentificationdialog.cpp b/klinkstatus/src/ui/settings/configidentificationdialog.cpp
index 3dcd1239..f2675d81 100644
--- a/klinkstatus/src/ui/settings/configidentificationdialog.cpp
+++ b/klinkstatus/src/ui/settings/configidentificationdialog.cpp
@@ -24,12 +24,12 @@
#include <kpushbutton.h>
#include <klineedit.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "../cfg/klsconfig.h"
-ConfigIdentificationDialog::ConfigIdentificationDialog(QWidget *parent, const char *name)
+ConfigIdentificationDialog::ConfigIdentificationDialog(TQWidget *parent, const char *name)
: ConfigIdentificationDialogUi(parent, name)
{
if(KLSConfig::userAgent().isEmpty())
@@ -37,7 +37,7 @@ ConfigIdentificationDialog::ConfigIdentificationDialog(QWidget *parent, const ch
slotDefaultUA();
}
- connect(buttonDefault, SIGNAL(clicked()), this, SLOT(slotDefaultUA()));
+ connect(buttonDefault, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDefaultUA()));
}
diff --git a/klinkstatus/src/ui/settings/configidentificationdialog.h b/klinkstatus/src/ui/settings/configidentificationdialog.h
index e75a65a6..8bc0fa64 100644
--- a/klinkstatus/src/ui/settings/configidentificationdialog.h
+++ b/klinkstatus/src/ui/settings/configidentificationdialog.h
@@ -30,7 +30,7 @@ class ConfigIdentificationDialog : public ConfigIdentificationDialogUi
{
Q_OBJECT
public:
- ConfigIdentificationDialog(QWidget *parent = 0, const char *name = 0);
+ ConfigIdentificationDialog(TQWidget *parent = 0, const char *name = 0);
~ConfigIdentificationDialog();
private slots:
diff --git a/klinkstatus/src/ui/tablelinkstatus.cpp b/klinkstatus/src/ui/tablelinkstatus.cpp
index 695365a9..66cd06be 100644
--- a/klinkstatus/src/ui/tablelinkstatus.cpp
+++ b/klinkstatus/src/ui/tablelinkstatus.cpp
@@ -23,12 +23,12 @@
#include "../parser/url.h"
#include "../global.h"
-#include <qmemarray.h>
-#include <qtooltip.h>
-#include <qpixmap.h>
-#include <qclipboard.h>
-#include <qpainter.h>
-#include <qprocess.h>
+#include <tqmemarray.h>
+#include <tqtooltip.h>
+#include <tqpixmap.h>
+#include <tqclipboard.h>
+#include <tqpainter.h>
+#include <tqprocess.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -46,18 +46,18 @@
*/
-TableLinkstatus::TableLinkstatus(QWidget * parent, const char * name,
+TableLinkstatus::TableLinkstatus(TQWidget * parent, const char * name,
int column_index_status,
int column_index_label,
int column_index_URL)
- : QTable(parent, name),
+ : TQTable(parent, name),
ResultView(column_index_status, column_index_label, column_index_URL)
//context_table_menu_(this, "context_table_menu")
{
setShowGrid(false);
setSorting(false);
- setSelectionMode(QTable::NoSelection);
- setFocusStyle(QTable::FollowStyle);
+ setSelectionMode(TQTable::NoSelection);
+ setFocusStyle(TQTable::FollowStyle);
setReadOnly(true);
verticalHeader()->hide();
@@ -65,10 +65,10 @@ TableLinkstatus::TableLinkstatus(QWidget * parent, const char * name,
cell_tip_ = new CellToolTip(this);
- sub_menu_ = new QPopupMenu(this, "sub_menu_referrers");
+ sub_menu_ = new TQPopupMenu(this, "sub_menu_referrers");
- connect(this, SIGNAL( contextMenuRequested ( int, int, const QPoint& )),
- this, SLOT( slotPopupContextMenu( int, int, const QPoint&)) );
+ connect(this, TQT_SIGNAL( contextMenuRequested ( int, int, const TQPoint& )),
+ this, TQT_SLOT( slotPopupContextMenu( int, int, const TQPoint&)) );
}
TableLinkstatus::~TableLinkstatus()
@@ -76,14 +76,14 @@ TableLinkstatus::~TableLinkstatus()
delete cell_tip_;
}
-void TableLinkstatus::setColumns(QStringList const& columns)
+void TableLinkstatus::setColumns(TQStringList const& columns)
{
ResultView::setColumns(columns);
removeColunas();
setNumCols(columns.size());
- QHeader* horizontal_header = horizontalHeader();
+ TQHeader* horizontal_header = horizontalHeader();
for(uint i = 0; i != columns.size(); ++i)
{
if(i == 0)
@@ -116,11 +116,11 @@ vector<TableItem*> TableLinkstatus::generateRowOfTableItems(LinkStatus const* li
vector<TableItem*> items;
int column = 1;
- TableItem* item1 = new TableItemStatus(this, QTableItem::Never,
+ TableItem* item1 = new TableItemStatus(this, TQTableItem::Never,
linkstatus, column++);
- TableItem* item2 = new TableItemNome(this, QTableItem::Never,
+ TableItem* item2 = new TableItemNome(this, TQTableItem::Never,
linkstatus, column++);
- TableItem* item3 = new TableItemURL(this, QTableItem::Never,
+ TableItem* item3 = new TableItemURL(this, TQTableItem::Never,
linkstatus, column++);
items.push_back(item1);
items.push_back(item2);
@@ -158,7 +158,7 @@ void TableLinkstatus::insereLinha(vector<TableItem*> items)
void TableLinkstatus::clear()
{
- QMemArray<int> linhas(numRows());
+ TQMemArray<int> linhas(numRows());
for(uint i = 0; i != linhas.size(); ++i)
linhas[i] = i + 1;
@@ -169,7 +169,7 @@ void TableLinkstatus::clear()
void TableLinkstatus::removeColunas()
{
- QMemArray<int> columns(numCols());
+ TQMemArray<int> columns(numCols());
for(uint i = 0; i != columns.size(); ++i)
columns[i] = i + 1;
@@ -204,7 +204,7 @@ void TableLinkstatus::mostraPorStatusCode(int status_code)
for(int i = 0; i != numRows(); ++i)
{
int row = i + 1;
- QTableItem* _item = myItem(row, col_status_);
+ TQTableItem* _item = myItem(row, col_status_);
if(status_code != _item->text().toInt())
hideRow(row);
@@ -222,15 +222,15 @@ void TableLinkstatus::ensureCellVisible(int row, int col)
{
// table viewport is at the bottom
if(rowPos(row - 1) <= (contentsY() + visibleHeight()))
- QTable::ensureCellVisible(row, col);
+ TQTable::ensureCellVisible(row, col);
}
bool TableLinkstatus::textFitsInCell(int row, int col) const
{
- QTableItem* itm(myItem(row, col));
+ TQTableItem* itm(myItem(row, col));
Q_ASSERT(itm);
- QSize size_hint(itm->sizeHint());
+ TQSize size_hint(itm->sizeHint());
int visible_width = 0;
if(col == numCols() - 1)
@@ -251,37 +251,37 @@ bool TableLinkstatus::isEmpty() const
TableItem* TableLinkstatus::myItem(int row, int col) const
{
- TableItem* _item = dynamic_cast<TableItem*> (QTable::item(row, col));
+ TableItem* _item = dynamic_cast<TableItem*> (TQTable::item(row, col));
Q_ASSERT(_item);
return _item;
}
-void TableLinkstatus::slotPopupContextMenu(int r, int w, const QPoint& pos)
+void TableLinkstatus::slotPopupContextMenu(int r, int w, const TQPoint& pos)
{
TableItem* table_item = myItem(r, w);
if(table_item)
{
- QValueVector<KURL> referrers = table_item->linkStatus()->referrers();
+ TQValueVector<KURL> referrers = table_item->linkStatus()->referrers();
loadContextTableMenu(referrers, table_item->linkStatus()->isRoot());
context_table_menu_.popup(pos);
}
}
-void TableLinkstatus::loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root)
+void TableLinkstatus::loadContextTableMenu(TQValueVector<KURL> const& referrers, bool is_root)
{
context_table_menu_.clear();
sub_menu_->clear();
if(!is_root)
{
- sub_menu_->insertItem(i18n("All"), this, SLOT(slotEditReferrersWithQuanta()));
+ sub_menu_->insertItem(i18n("All"), this, TQT_SLOT(slotEditReferrersWithQuanta()));
sub_menu_->insertSeparator();
for(uint i = 0; i != referrers.size(); ++i)
{
sub_menu_->insertItem(referrers[i].prettyURL());
}
- connect(sub_menu_, SIGNAL(activated(int)), this, SLOT(slotEditReferrerWithQuanta(int)));
+ connect(sub_menu_, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotEditReferrerWithQuanta(int)));
context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Edit Referrer with Quanta"),
sub_menu_);
@@ -293,27 +293,27 @@ void TableLinkstatus::loadContextTableMenu(QValueVector<KURL> const& referrers,
}
context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Open URL"),
- this, SLOT(slotViewUrlInBrowser()));
+ this, TQT_SLOT(slotViewUrlInBrowser()));
context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Open Referrer URL"),
- this, SLOT(slotViewParentUrlInBrowser()));
+ this, TQT_SLOT(slotViewParentUrlInBrowser()));
context_table_menu_.insertSeparator();
context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy URL"),
- this, SLOT(slotCopyUrlToClipboard()));
+ this, TQT_SLOT(slotCopyUrlToClipboard()));
context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy Referrer URL"),
- this, SLOT(slotCopyParentUrlToClipboard()));
+ this, TQT_SLOT(slotCopyParentUrlToClipboard()));
context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy Cell Text"),
- this, SLOT(slotCopyCellTextToClipboard()));
+ this, TQT_SLOT(slotCopyCellTextToClipboard()));
}
void TableLinkstatus::slotCopyUrlToClipboard() const
{
TableItem* _item = myItem(currentRow(), currentColumn());
- QString content(_item->linkStatus()->absoluteUrl().prettyURL());
+ TQString content(_item->linkStatus()->absoluteUrl().prettyURL());
QClipboard* cb = kapp->clipboard();
cb->setText(content);
}
@@ -321,14 +321,14 @@ void TableLinkstatus::slotCopyUrlToClipboard() const
void TableLinkstatus::slotCopyParentUrlToClipboard() const
{
TableItem* _item = myItem(currentRow(), currentColumn());
- QString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL());
+ TQString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL());
QClipboard* cb = kapp->clipboard();
cb->setText(content);
}
void TableLinkstatus::slotCopyCellTextToClipboard() const
{
- QString cell_text(text(currentRow(), currentColumn()));
+ TQString cell_text(text(currentRow(), currentColumn()));
QClipboard* cb = kapp->clipboard();
cb->setText(cell_text);
}
@@ -336,7 +336,7 @@ void TableLinkstatus::slotCopyCellTextToClipboard() const
void TableLinkstatus::slotEditReferrersWithQuanta()
{
TableItem* _item = myItem(currentRow(), currentColumn());
- QValueVector<KURL> referrers = _item->linkStatus()->referrers();
+ TQValueVector<KURL> referrers = _item->linkStatus()->referrers();
if(Global::isQuantaAvailableViaDCOP())
{
@@ -345,7 +345,7 @@ void TableLinkstatus::slotEditReferrersWithQuanta()
}
else
{
- QStringList list_urls;
+ TQStringList list_urls;
for(uint i = 0; i != referrers.size(); ++i)
list_urls.append(referrers[i].url());
@@ -369,7 +369,7 @@ void TableLinkstatus::slotEditReferrerWithQuanta(int id)
index -= 2; // The list of referrers starts on index = 2
TableItem* _item = myItem(currentRow(), currentColumn());
- QValueVector<KURL> referrers = _item->linkStatus()->referrers();
+ TQValueVector<KURL> referrers = _item->linkStatus()->referrers();
Q_ASSERT(index >= 0 && (uint)index < referrers.size());
slotEditReferrerWithQuanta(referrers[index]);
@@ -377,7 +377,7 @@ void TableLinkstatus::slotEditReferrerWithQuanta(int id)
void TableLinkstatus::slotEditReferrerWithQuanta(KURL const& url)
{
- QString filePath = url.url();
+ TQString filePath = url.url();
if(Global::isQuantaAvailableViaDCOP())
{
@@ -386,13 +386,13 @@ void TableLinkstatus::slotEditReferrerWithQuanta(KURL const& url)
if(!success)
{
- QString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath);
+ TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath);
KMessageBox::error(parentWidget(), message);
}
}
else
{
- QStringList args(url.url());
+ TQStringList args(url.url());
Global::openQuanta(args);
}
}
@@ -438,10 +438,10 @@ void TableLinkstatus::slotViewParentUrlInBrowser()
*/
-TableItem::TableItem(QTable* table, EditType et,
+TableItem::TableItem(TQTable* table, EditType et,
LinkStatus const* linkstatus,
int column_index, int alignment)
- : QTableItem(table, et, ""), ResultViewItem(linkstatus, column_index),
+ : TQTableItem(table, et, ""), ResultViewItem(linkstatus, column_index),
/*ls_((LinkStatus*)linkstatus),
column_index_(column_index),*/ alignment_(alignment)
{
@@ -483,7 +483,7 @@ LinkStatus const* const TableItem::linkStatus() const
return ls_;
}
-QColor const& TableItem::textStatusColor() const
+TQColor const& TableItem::textStatusColor() const
{
if(linkStatus()->errorOccurred())
{
@@ -503,7 +503,7 @@ QColor const& TableItem::textStatusColor() const
else
{
- QString status_code(QString::number(linkStatus()->httpHeader().statusCode()));
+ TQString status_code(TQString::number(linkStatus()->httpHeader().statusCode()));
if(status_code[0] == '0')
{
@@ -537,7 +537,7 @@ QColor const& TableItem::textStatusColor() const
*/
-TableItemURL::TableItemURL(QTable* table, EditType et,
+TableItemURL::TableItemURL(TQTable* table, EditType et,
LinkStatus const* linkstatus, int column_index)
: TableItem(table, et, linkstatus, column_index)
{
@@ -549,41 +549,41 @@ void TableItemURL::setText()
if(linkStatus()->node() && linkStatus()->malformed())
{
if(linkStatus()->node()->url().isEmpty())
- QTableItem::setText( linkStatus()->node()->content().simplifyWhiteSpace() );
+ TQTableItem::setText( linkStatus()->node()->content().simplifyWhiteSpace() );
else
- QTableItem::setText( linkStatus()->node()->url() );
+ TQTableItem::setText( linkStatus()->node()->url() );
}
else
{
KURL url = linkStatus()->absoluteUrl();
- QTableItem::setText(::convertToLocal(linkStatus()));
+ TQTableItem::setText(::convertToLocal(linkStatus()));
}
}
void TableItemURL::setPixmap()
{}
-QString TableItemURL::toolTip() const
+TQString TableItemURL::toolTip() const
{
return text(); // Pode parecer repeticao mas nao eh... Ver construtor
}
-void TableItemURL::paint( QPainter *p, const QColorGroup &cg,
- const QRect &cr, bool selected )
+void TableItemURL::paint( TQPainter *p, const TQColorGroup &cg,
+ const TQRect &cr, bool selected )
{
// Get a color to draw the text
- QColorGroup m_cg(cg);
- QColor color(textStatusColor());
- m_cg.setColor(QColorGroup::Text, color);
+ TQColorGroup m_cg(cg);
+ TQColor color(textStatusColor());
+ m_cg.setColor(TQColorGroup::Text, color);
- QTableItem::paint(p, m_cg, cr, selected);
+ TQTableItem::paint(p, m_cg, cr, selected);
}
-QColor const& TableItemURL::textStatusColor() const
+TQColor const& TableItemURL::textStatusColor() const
{
// TODO clean this code
- QString status_code(QString::number(linkStatus()->httpHeader().statusCode()));
+ TQString status_code(TQString::number(linkStatus()->httpHeader().statusCode()));
if(linkStatus()->errorOccurred())
{
@@ -614,7 +614,7 @@ QColor const& TableItemURL::textStatusColor() const
*/
-TableItemStatus::TableItemStatus(QTable* table, EditType et,
+TableItemStatus::TableItemStatus(TQTable* table, EditType et,
LinkStatus const* linkstatus, int column_index)
: TableItem(table, et, linkstatus, column_index)
{
@@ -629,7 +629,7 @@ void TableItemStatus::setText()
linkStatus()->status() == "OK" ||
linkStatus()->status() == "304")
{
- QTableItem::setText("");
+ TQTableItem::setText("");
}
else
{
@@ -642,8 +642,8 @@ void TableItemStatus::setText()
}
*/
//Q_ASSERT(linkStatus()->httpHeader().statusCode() != 0); //<------------------------------------------------------------
- //QTableItem::setText( QString::number(linkStatus()->httpHeader().statusCode()) );
- QTableItem::setText( linkStatus()->status() );
+ //TQTableItem::setText( TQString::number(linkStatus()->httpHeader().statusCode()) );
+ TQTableItem::setText( linkStatus()->status() );
}
}
@@ -654,25 +654,25 @@ void TableItemStatus::setPixmap()
if(linkStatus()->error().contains(i18n( "Timeout" )))
{
- QTableItem::setPixmap(SmallIcon("kalarm"));
+ TQTableItem::setPixmap(SmallIcon("kalarm"));
}
else if(linkStatus()->error() == i18n( "Malformed" ))
{
- QTableItem::setPixmap(SmallIcon("bug"));
+ TQTableItem::setPixmap(SmallIcon("bug"));
}
else
{
- QTableItem::setPixmap(SmallIcon("no"));
+ TQTableItem::setPixmap(SmallIcon("no"));
}
}
else if(linkStatus()->status() == "304")
- QTableItem::setPixmap(UserIcon("304"));
+ TQTableItem::setPixmap(UserIcon("304"));
else if(linkStatus()->status() == "OK")
- QTableItem::setPixmap(SmallIcon("ok"));
+ TQTableItem::setPixmap(SmallIcon("ok"));
}
-QString TableItemStatus::toolTip() const
+TQString TableItemStatus::toolTip() const
{
if(linkStatus()->errorOccurred() ||
linkStatus()->absoluteUrl().hasRef() ||
@@ -685,12 +685,12 @@ QString TableItemStatus::toolTip() const
return i18n("%1").arg(linkStatus()->httpHeader().reasonPhrase());
}
-void TableItemStatus::paint( QPainter *p, const QColorGroup &cg,
- const QRect &cr, bool selected )
+void TableItemStatus::paint( TQPainter *p, const TQColorGroup &cg,
+ const TQRect &cr, bool selected )
{
p->fillRect( 0, 0, cr.width(), cr.height(),
- selected ? cg.brush( QColorGroup::Highlight )
- : cg.brush( QColorGroup::Base ) );
+ selected ? cg.brush( TQColorGroup::Highlight )
+ : cg.brush( TQColorGroup::Base ) );
int w = cr.width();
int h = cr.height();
@@ -705,11 +705,11 @@ void TableItemStatus::paint( QPainter *p, const QColorGroup &cg,
}
// Get a color to draw the text
- QColorGroup m_cg(cg);
- QColor color(textStatusColor());
- m_cg.setColor(QColorGroup::Text, color);
+ TQColorGroup m_cg(cg);
+ TQColor color(textStatusColor());
+ m_cg.setColor(TQColorGroup::Text, color);
- //QTableItem::paint(p, m_cg, cr, selected);
+ //TQTableItem::paint(p, m_cg, cr, selected);
if ( selected )
p->setPen( m_cg.highlightedText() );
@@ -725,7 +725,7 @@ void TableItemStatus::paint( QPainter *p, const QColorGroup &cg,
*/
-TableItemNome::TableItemNome(QTable* table, EditType et,
+TableItemNome::TableItemNome(TQTable* table, EditType et,
LinkStatus const* linkstatus, int column_index)
: TableItem(table, et, linkstatus, column_index)
{
@@ -734,15 +734,15 @@ TableItemNome::TableItemNome(QTable* table, EditType et,
void TableItemNome::setText()
{
- QString label(linkStatus()->label());
+ TQString label(linkStatus()->label());
if(!label.isNull())
- QTableItem::setText(label.simplifyWhiteSpace());
+ TQTableItem::setText(label.simplifyWhiteSpace());
}
void TableItemNome::setPixmap()
{}
-QString TableItemNome::toolTip() const
+TQString TableItemNome::toolTip() const
{
return text(); // Pode parecer repeticao mas nao eh... Ver construtor
}
diff --git a/klinkstatus/src/ui/tablelinkstatus.h b/klinkstatus/src/ui/tablelinkstatus.h
index 0b3f2cf2..cb003209 100644
--- a/klinkstatus/src/ui/tablelinkstatus.h
+++ b/klinkstatus/src/ui/tablelinkstatus.h
@@ -21,11 +21,11 @@
#ifndef TABLE_LINKSTATUS_H
#define TABLE_LINKSTATUS_H
-#include <qtable.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qpopupmenu.h>
-#include <qvaluevector.h>
+#include <tqtable.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqpopupmenu.h>
+#include <tqvaluevector.h>
class QStringList;
class KURL;
@@ -43,18 +43,18 @@ int const STATUS_COLUMN_WIDTH = 50;
class TableItem;
-class TableLinkstatus: public QTable, public ResultView
+class TableLinkstatus: public TQTable, public ResultView
{
Q_OBJECT
public:
- TableLinkstatus(QWidget * parent = 0, const char * name = 0,
+ TableLinkstatus(TQWidget * parent = 0, const char * name = 0,
int column_index_status = 1,
int column_index_label = 2,
int column_index_URL = 3);
~TableLinkstatus();
- virtual void setColumns(QStringList const& columns);
+ virtual void setColumns(TQStringList const& columns);
/* Insere uma nova entrada no fim da tabela */
virtual void insertResult(LinkStatus const* linkstatus);
@@ -66,7 +66,7 @@ public:
virtual void showAll();
- /* Specialization of QTable::ensureCellVisible */
+ /* Specialization of TQTable::ensureCellVisible */
virtual void ensureCellVisible(int row, int col);
virtual bool textFitsInCell(int row, int col) const;
@@ -76,7 +76,7 @@ public:
private slots:
- virtual void slotPopupContextMenu(int row, int col, const QPoint& pos);
+ virtual void slotPopupContextMenu(int row, int col, const TQPoint& pos);
virtual void slotCopyUrlToClipboard() const;
virtual void slotCopyParentUrlToClipboard() const;
virtual void slotCopyCellTextToClipboard() const;
@@ -85,7 +85,7 @@ private slots:
virtual void slotEditReferrerWithQuanta(KURL const& url);
virtual void slotViewUrlInBrowser();
virtual void slotViewParentUrlInBrowser();
- virtual void loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root = false);
+ virtual void loadContextTableMenu(TQValueVector<KURL> const& referrers, bool is_root = false);
private:
@@ -98,17 +98,17 @@ private:
int col_label_;
int col_url_;
CellToolTip* cell_tip_;
- QPopupMenu context_table_menu_;
- QPopupMenu* sub_menu_;
+ TQPopupMenu context_table_menu_;
+ TQPopupMenu* sub_menu_;
*/
};
-class TableItem: public QTableItem, public ResultViewItem
+class TableItem: public TQTableItem, public ResultViewItem
{
public:
- TableItem(QTable* table, EditType et,
+ TableItem(TQTable* table, EditType et,
LinkStatus const* linkstatus,
int column_index, int alignment = Qt::AlignLeft);
virtual ~TableItem();
@@ -119,14 +119,14 @@ public:
void setAlignment(int aFlags);
virtual int alignment() const;
- virtual QString toolTip() const = 0;
+ virtual TQString toolTip() const = 0;
//LinkStatus const* const linkStatus() const;
protected:
- //QColor const& textStatusColor() const;
- virtual void paint( QPainter *p, const QColorGroup &cg,
- const QRect &cr, bool selected );
+ //TQColor const& textStatusColor() const;
+ virtual void paint( TQPainter *p, const TQColorGroup &cg,
+ const TQRect &cr, bool selected );
virtual void setText() = 0;
virtual void setPixmap() = 0;
@@ -142,18 +142,18 @@ class TableItemURL: public TableItem
{
public:
- TableItemURL(QTable* table, EditType et,
+ TableItemURL(TQTable* table, EditType et,
LinkStatus const* linkstatus, int column_index = 3);
//virtual ~TableItemURL(){};
- virtual QString toolTip() const;
+ virtual TQString toolTip() const;
protected:
virtual void setText();
virtual void setPixmap();
- virtual void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected );
- QColor const& textStatusColor() const;
+ virtual void paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected );
+ TQColor const& textStatusColor() const;
};
@@ -161,17 +161,17 @@ class TableItemStatus: public TableItem
{
public:
- TableItemStatus(QTable* table, EditType et,
+ TableItemStatus(TQTable* table, EditType et,
LinkStatus const* linkstatus, int column_index = 1);
//virtual ~TableItemStatus(){};
- virtual QString toolTip() const;
+ virtual TQString toolTip() const;
protected:
virtual void setText();
virtual void setPixmap();
- virtual void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected );
+ virtual void paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected );
};
@@ -179,24 +179,24 @@ class TableItemNome: public TableItem
{
public:
- TableItemNome(QTable* table, EditType et,
+ TableItemNome(TQTable* table, EditType et,
LinkStatus const* linkstatus, int column_index = 2);
//virtual ~TableItemNome(){};
- virtual QString toolTip() const;
+ virtual TQString toolTip() const;
protected:
virtual void setText();
virtual void setPixmap();
- //virtual void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected );
+ //virtual void paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected );
};
-inline void TableItem::paint( QPainter *p, const QColorGroup &cg,
- const QRect &cr, bool selected )
+inline void TableItem::paint( TQPainter *p, const TQColorGroup &cg,
+ const TQRect &cr, bool selected )
{
- QTableItem::paint(p, cg, cr, selected);
+ TQTableItem::paint(p, cg, cr, selected);
}
#endif
diff --git a/klinkstatus/src/ui/tabwidgetsession.cpp b/klinkstatus/src/ui/tabwidgetsession.cpp
index 9d9033a7..d692486a 100644
--- a/klinkstatus/src/ui/tabwidgetsession.cpp
+++ b/klinkstatus/src/ui/tabwidgetsession.cpp
@@ -24,13 +24,13 @@
#include "../engine/searchmanager.h"
#include "../actionmanager.h"
-#include <qtoolbutton.h>
-#include <qcursor.h>
-#include <qtooltip.h>
-#include <qpushbutton.h>
-#include <qpixmap.h>
-#include <qiconset.h>
-#include <qstringlist.h>
+#include <tqtoolbutton.h>
+#include <tqcursor.h>
+#include <tqtooltip.h>
+#include <tqpushbutton.h>
+#include <tqpixmap.h>
+#include <tqiconset.h>
+#include <tqstringlist.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -42,10 +42,10 @@
#include <kiconloader.h>
-TabWidgetSession::TabWidgetSession(QWidget* parent, const char* name, WFlags f)
+TabWidgetSession::TabWidgetSession(TQWidget* parent, const char* name, WFlags f)
: KTabWidget(parent, name, f) // tabs_ is initialized with size 17
{
- setFocusPolicy(QTabWidget::NoFocus);
+ setFocusPolicy(TQTabWidget::NoFocus);
setMargin(0);
setTabReorderingEnabled(true);
setHoverCloseButton(true);
@@ -53,23 +53,23 @@ TabWidgetSession::TabWidgetSession(QWidget* parent, const char* name, WFlags f)
tabs_.setAutoDelete(false);
- QToolButton* tabs_new = new QToolButton(this);
- tabs_new->setAccel(QKeySequence("Ctrl+N"));
- connect(tabs_new, SIGNAL(clicked()), this, SLOT(slotNewSession()));
+ TQToolButton* tabs_new = new TQToolButton(this);
+ tabs_new->setAccel(TQKeySequence("Ctrl+N"));
+ connect(tabs_new, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewSession()));
tabs_new->setIconSet(SmallIconSet("tab_new_raised"));
tabs_new->adjustSize();
- QToolTip::add(tabs_new, i18n("Open new tab"));
+ TQToolTip::add(tabs_new, i18n("Open new tab"));
setCornerWidget(tabs_new, TopLeft);
- tabs_close_ = new QToolButton(this);
- tabs_close_->setAccel(QKeySequence("Ctrl+W"));
- connect(tabs_close_, SIGNAL(clicked()), this, SLOT(closeSession()));
+ tabs_close_ = new TQToolButton(this);
+ tabs_close_->setAccel(TQKeySequence("Ctrl+W"));
+ connect(tabs_close_, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeSession()));
tabs_close_->setIconSet(SmallIconSet("tab_remove"));
tabs_close_->adjustSize();
- QToolTip::add(tabs_close_, i18n("Close the current tab"));
+ TQToolTip::add(tabs_close_, i18n("Close the current tab"));
setCornerWidget(tabs_close_, TopRight);
- connect(this, SIGNAL(currentChanged(QWidget*)), this, SLOT(slotCurrentChanged(QWidget*)));
+ connect(this, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(slotCurrentChanged(TQWidget*)));
}
TabWidgetSession::~TabWidgetSession()
@@ -108,7 +108,7 @@ SessionWidget* TabWidgetSession::getEmptySession() const
}
// Remember to use count() and not size()
-QIntDict<SessionWidget> const& TabWidgetSession::sessions() const
+TQIntDict<SessionWidget> const& TabWidgetSession::sessions() const
{
return tabs_;
}
@@ -117,10 +117,10 @@ SessionWidget* TabWidgetSession::newSession()
{
// TODO: settings: number of connections, timeout
SessionWidget* session_widget = newSessionWidget();
- connect(session_widget, SIGNAL(signalUpdateTabLabel(const LinkStatus *, SessionWidget*)),
- this, SLOT(updateTabLabel(const LinkStatus *, SessionWidget*)));
+ connect(session_widget, TQT_SIGNAL(signalUpdateTabLabel(const LinkStatus *, SessionWidget*)),
+ this, TQT_SLOT(updateTabLabel(const LinkStatus *, SessionWidget*)));
- insertTab(session_widget, i18n("Session") + i18n(QString::number(count() + 1).ascii()));
+ insertTab(session_widget, i18n("Session") + i18n(TQString::number(count() + 1).ascii()));
tabs_.insert(count() - 1, session_widget);
Q_ASSERT(tabs_[count() - 1]);
@@ -149,9 +149,9 @@ void TabWidgetSession::closeSession()
SessionWidget* TabWidgetSession::newSessionWidget()
{
SessionWidget* session_widget = new SessionWidget(KLSConfig::maxConnectionsNumber(),
- KLSConfig::timeOut(), this, QString("session_widget-" + count()));
+ KLSConfig::timeOut(), this, TQString("session_widget-" + count()));
- QStringList columns;
+ TQStringList columns;
columns.push_back(TreeView::URL_LABEL);
columns.push_back(TreeView::STATUS_LABEL);
@@ -168,7 +168,7 @@ SessionWidget* TabWidgetSession::newSessionWidget()
void TabWidgetSession::updateTabLabel(LinkStatus const* linkstatus, SessionWidget* page)
{
- QString label;
+ TQString label;
KURL url = linkstatus->absoluteUrl();
if(linkstatus->hasHtmlDocTitle())
@@ -187,7 +187,7 @@ void TabWidgetSession::updateTabLabel(LinkStatus const* linkstatus, SessionWidge
}
changeTab(page, KCharsets::resolveEntities(label));
- setTabIconSet(page, QIconSet(KMimeType::pixmapForURL(url)));
+ setTabIconSet(page, TQIconSet(KMimeType::pixmapForURL(url)));
}
void TabWidgetSession::slotLoadSettings()
@@ -210,7 +210,7 @@ void TabWidgetSession::setUrl(KURL const& url)
currentSession()->setUrl(url);
}
-void TabWidgetSession::slotCurrentChanged(QWidget* /*page*/)
+void TabWidgetSession::slotCurrentChanged(TQWidget* /*page*/)
{
tabs_close_->setEnabled(count() > 1);
diff --git a/klinkstatus/src/ui/tabwidgetsession.h b/klinkstatus/src/ui/tabwidgetsession.h
index 616c8173..90b755b6 100644
--- a/klinkstatus/src/ui/tabwidgetsession.h
+++ b/klinkstatus/src/ui/tabwidgetsession.h
@@ -23,7 +23,7 @@
#include <ktabwidget.h>
#include <kurl.h>
-#include <qintdict.h>
+#include <tqintdict.h>
class QToolButton;
class SessionWidget;
@@ -40,7 +40,7 @@ class TabWidgetSession : public KTabWidget
Q_OBJECT
public:
- TabWidgetSession(QWidget * parent = 0, const char * name = 0, WFlags f = 0);
+ TabWidgetSession(TQWidget * parent = 0, const char * name = 0, WFlags f = 0);
~TabWidgetSession();
/** Set the URL in the current session widget */
@@ -50,7 +50,7 @@ public:
bool emptySessionsExist() const;
/** Returns the first empty session it finds */
SessionWidget* getEmptySession() const;
- QIntDict<SessionWidget> const& sessions() const;
+ TQIntDict<SessionWidget> const& sessions() const;
public slots:
@@ -72,14 +72,14 @@ public slots:
void slotExportAsHTML();
private slots:
- void slotCurrentChanged(QWidget* page);
+ void slotCurrentChanged(TQWidget* page);
private:
SessionWidget* newSessionWidget();
private:
- QIntDict<SessionWidget> tabs_;
- QToolButton* tabs_close_;
+ TQIntDict<SessionWidget> tabs_;
+ TQToolButton* tabs_close_;
};
#endif
diff --git a/klinkstatus/src/ui/treeview.cpp b/klinkstatus/src/ui/treeview.cpp
index 7ad92d8e..14e0e12a 100644
--- a/klinkstatus/src/ui/treeview.cpp
+++ b/klinkstatus/src/ui/treeview.cpp
@@ -28,9 +28,9 @@
#include <dcopclient.h>
#include <kcharsets.h>
-#include <qvaluevector.h>
-#include <qheader.h>
-#include <qclipboard.h>
+#include <tqvaluevector.h>
+#include <tqheader.h>
+#include <tqclipboard.h>
#include "treeview.h"
#include "../global.h"
@@ -39,7 +39,7 @@
#include "../cfg/klsconfig.h"
-TreeView::TreeView(QWidget *parent, const char *name)
+TreeView::TreeView(TQWidget *parent, const char *name)
: KListView(parent, name),
ResultView(),
current_column_(0)
@@ -50,12 +50,12 @@ TreeView::TreeView(QWidget *parent, const char *name)
setShowSortIndicator(true);
//setFocusPolicy( WheelFocus );
setRootIsDecorated(KLSConfig::displayTreeView());
-// setResizeMode(QListView::LastColumn);
+// setResizeMode(TQListView::LastColumn);
- sub_menu_ = new QPopupMenu(this, "sub_menu_referrers");
+ sub_menu_ = new TQPopupMenu(this, "sub_menu_referrers");
- connect(this, SIGNAL( rightButtonClicked ( QListViewItem *, const QPoint &, int )),
- this, SLOT( slotPopupContextMenu( QListViewItem *, const QPoint &, int )) );
+ connect(this, TQT_SIGNAL( rightButtonClicked ( TQListViewItem *, const TQPoint &, int )),
+ this, TQT_SLOT( slotPopupContextMenu( TQListViewItem *, const TQPoint &, int )) );
}
@@ -64,7 +64,7 @@ TreeView::~TreeView()
saveLayout(KLSConfig::self()->config(), "klinkstatus");
}
-void TreeView::setColumns(QStringList const& columns)
+void TreeView::setColumns(TQStringList const& columns)
{
ResultView::setColumns(columns);
removeColunas();
@@ -73,7 +73,7 @@ void TreeView::setColumns(QStringList const& columns)
for(uint i = 0; i != columns.size(); ++i)
{
addColumn(i18n(columns[i]));
- setColumnWidthMode(i, QListView::Manual);
+ setColumnWidthMode(i, TQListView::Manual);
}
setColumnAlignment(col_status_ - 1, Qt::AlignCenter);
@@ -85,10 +85,10 @@ void TreeView::resetColumns()
{
setColumnWidth(col_url_ - 1, (int)(0.45 * width()));
- setResizeMode(QListView::LastColumn); // fit to the window
+ setResizeMode(TQListView::LastColumn); // fit to the window
// resize again
- setColumnWidthMode(col_label_ - 1, QListView::Manual);
- setResizeMode(QListView::NoColumn);
+ setColumnWidthMode(col_label_ - 1, TQListView::Manual);
+ setResizeMode(TQListView::NoColumn);
}
double TreeView::columnsWidth() const
@@ -116,7 +116,7 @@ void TreeView::removeColunas()
void TreeView::show(ResultView::Status const& status)
{
- QListViewItemIterator it(static_cast<KListView*> (this));
+ TQListViewItemIterator it(static_cast<KListView*> (this));
while(it.current())
{
TreeViewItem* item = myItem(it.current());
@@ -155,7 +155,7 @@ void TreeView::show(ResultView::Status const& status)
void TreeView::show(LinkMatcher link_matcher)
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
while(it.current())
{
TreeViewItem* item = myItem(it.current());
@@ -172,7 +172,7 @@ void TreeView::show(LinkMatcher link_matcher)
void TreeView::showAll()
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
while(it.current())
{
it.current()->setVisible(true);
@@ -181,9 +181,9 @@ void TreeView::showAll()
}
}
-void TreeView::ensureRowVisible(const QListViewItem * i, bool tree_display)
+void TreeView::ensureRowVisible(const TQListViewItem * i, bool tree_display)
{
- QScrollBar* vertical_scroll_bar = verticalScrollBar();
+ TQScrollBar* vertical_scroll_bar = verticalScrollBar();
if(tree_display ||
vertical_scroll_bar->value() > (vertical_scroll_bar->maxValue() - vertical_scroll_bar->lineStep()))
@@ -195,21 +195,21 @@ bool TreeView::isEmpty() const
return !childCount();
}
-void TreeView::resizeEvent(QResizeEvent *e)
+void TreeView::resizeEvent(TQResizeEvent *e)
{
KListView::resizeEvent(e);
resetColumns();
clipper()->repaint();
}
-void TreeView::slotPopupContextMenu(QListViewItem* item, const QPoint& pos, int col)
+void TreeView::slotPopupContextMenu(TQListViewItem* item, const TQPoint& pos, int col)
{
current_column_ = col;
TreeViewItem* tree_item = myItem(item);
if(tree_item)
{
- QValueVector<KURL> referrers = tree_item->linkStatus()->referrers();
+ TQValueVector<KURL> referrers = tree_item->linkStatus()->referrers();
loadContextTableMenu(referrers, tree_item->linkStatus()->isRoot());
context_table_menu_.popup(pos);
}
@@ -218,7 +218,7 @@ void TreeView::slotPopupContextMenu(QListViewItem* item, const QPoint& pos, int
void TreeView::slotCopyUrlToClipboard() const
{
TreeViewItem* _item = myItem(currentItem());
- QString content(_item->linkStatus()->absoluteUrl().prettyURL());
+ TQString content(_item->linkStatus()->absoluteUrl().prettyURL());
QClipboard* cb = kapp->clipboard();
cb->setText(content);
}
@@ -226,7 +226,7 @@ void TreeView::slotCopyUrlToClipboard() const
void TreeView::slotCopyParentUrlToClipboard() const
{
TreeViewItem* _item = myItem(currentItem());
- QString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL());
+ TQString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL());
QClipboard* cb = kapp->clipboard();
cb->setText(content);
}
@@ -234,7 +234,7 @@ void TreeView::slotCopyParentUrlToClipboard() const
void TreeView::slotCopyCellTextToClipboard() const
{
TreeViewItem* _item = myItem(currentItem());
- QString cell_text(_item->text(current_column_));
+ TQString cell_text(_item->text(current_column_));
QClipboard* cb = kapp->clipboard();
cb->setText(cell_text);
}
@@ -242,7 +242,7 @@ void TreeView::slotCopyCellTextToClipboard() const
void TreeView::slotEditReferrersWithQuanta()
{
TreeViewItem* _item = myItem(currentItem());
- QValueVector<KURL> referrers = _item->linkStatus()->referrers();
+ TQValueVector<KURL> referrers = _item->linkStatus()->referrers();
if(Global::isQuantaAvailableViaDCOP())
{
@@ -251,7 +251,7 @@ void TreeView::slotEditReferrersWithQuanta()
}
else
{
- QStringList list_urls;
+ TQStringList list_urls;
for(uint i = 0; i != referrers.size(); ++i)
list_urls.append(referrers[i].url());
@@ -275,7 +275,7 @@ void TreeView::slotEditReferrerWithQuanta(int id)
index -= 2; // The list of referrers starts on index = 2
TreeViewItem* _item = myItem(currentItem());
- QValueVector<KURL> referrers = _item->linkStatus()->referrers();
+ TQValueVector<KURL> referrers = _item->linkStatus()->referrers();
Q_ASSERT(index >= 0 && (uint)index < referrers.size());
slotEditReferrerWithQuanta(referrers[index]);
@@ -283,7 +283,7 @@ void TreeView::slotEditReferrerWithQuanta(int id)
void TreeView::slotEditReferrerWithQuanta(KURL const& url)
{
- QString filePath = url.url();
+ TQString filePath = url.url();
if(Global::isQuantaAvailableViaDCOP())
{
@@ -292,13 +292,13 @@ void TreeView::slotEditReferrerWithQuanta(KURL const& url)
if(!success)
{
- QString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath);
+ TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath);
KMessageBox::error(parentWidget(), message);
}
}
else
{
- QStringList args(url.url());
+ TQStringList args(url.url());
Global::openQuanta(args);
}
}
@@ -338,21 +338,21 @@ void TreeView::slotViewParentUrlInBrowser()
}
}
-void TreeView::loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root)
+void TreeView::loadContextTableMenu(TQValueVector<KURL> const& referrers, bool is_root)
{
context_table_menu_.clear();
sub_menu_->clear();
if(!is_root)
{
- sub_menu_->insertItem(i18n("All"), this, SLOT(slotEditReferrersWithQuanta()));
+ sub_menu_->insertItem(i18n("All"), this, TQT_SLOT(slotEditReferrersWithQuanta()));
sub_menu_->insertSeparator();
for(uint i = 0; i != referrers.size(); ++i)
{
sub_menu_->insertItem(referrers[i].prettyURL());
}
- connect(sub_menu_, SIGNAL(activated(int)), this, SLOT(slotEditReferrerWithQuanta(int)));
+ connect(sub_menu_, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotEditReferrerWithQuanta(int)));
context_table_menu_.insertItem(SmallIconSet("edit"), i18n("Edit Referrer with Quanta"),
sub_menu_);
@@ -365,24 +365,24 @@ void TreeView::loadContextTableMenu(QValueVector<KURL> const& referrers, bool is
}
context_table_menu_.insertItem(SmallIconSet("fileopen"), i18n("Open URL"),
- this, SLOT(slotViewUrlInBrowser()));
+ this, TQT_SLOT(slotViewUrlInBrowser()));
context_table_menu_.insertItem(/*SmallIconSet("fileopen"), */i18n("Open Referrer URL"),
- this, SLOT(slotViewParentUrlInBrowser()));
+ this, TQT_SLOT(slotViewParentUrlInBrowser()));
context_table_menu_.insertSeparator();
context_table_menu_.insertItem(SmallIconSet("editcopy"), i18n("Copy URL"),
- this, SLOT(slotCopyUrlToClipboard()));
+ this, TQT_SLOT(slotCopyUrlToClipboard()));
context_table_menu_.insertItem(/*SmallIconSet("editcopy"), */i18n("Copy Referrer URL"),
- this, SLOT(slotCopyParentUrlToClipboard()));
+ this, TQT_SLOT(slotCopyParentUrlToClipboard()));
context_table_menu_.insertItem(/*SmallIconSet("editcopy"), */i18n("Copy Cell Text"),
- this, SLOT(slotCopyCellTextToClipboard()));
+ this, TQT_SLOT(slotCopyCellTextToClipboard()));
}
-TreeViewItem* TreeView::myItem(QListViewItem* item) const
+TreeViewItem* TreeView::myItem(TQListViewItem* item) const
{
TreeViewItem* _item = dynamic_cast<TreeViewItem*> (item);
Q_ASSERT(_item);
@@ -392,7 +392,7 @@ TreeViewItem* TreeView::myItem(QListViewItem* item) const
/* ******************************* TreeViewItem ******************************* */
-TreeViewItem::TreeViewItem(TreeView* parent, QListViewItem* after,
+TreeViewItem::TreeViewItem(TreeView* parent, TQListViewItem* after,
LinkStatus const* linkstatus)
: KListViewItem(parent, after),
last_child_(0), root_(parent)
@@ -400,7 +400,7 @@ TreeViewItem::TreeViewItem(TreeView* parent, QListViewItem* after,
init(linkstatus);
}
-TreeViewItem::TreeViewItem(TreeView* root, QListViewItem* listview_item, QListViewItem* after,
+TreeViewItem::TreeViewItem(TreeView* root, TQListViewItem* listview_item, TQListViewItem* after,
LinkStatus const* linkstatus)
: KListViewItem(listview_item, after),
last_child_(0), root_(root)
@@ -433,18 +433,18 @@ void TreeViewItem::init(LinkStatus const* linkstatus)
}
}
-void TreeViewItem::setLastChild(QListViewItem* last_child)
+void TreeViewItem::setLastChild(TQListViewItem* last_child)
{
Q_ASSERT(last_child);
last_child_ = last_child;
}
-QListViewItem* TreeViewItem::lastChild() const
+TQListViewItem* TreeViewItem::lastChild() const
{
return last_child_;
}
-QString TreeViewItem::key(int column, bool) const
+TQString TreeViewItem::key(int column, bool) const
{
// FIXME magic numbers
switch(column)
@@ -461,14 +461,14 @@ LinkStatus const* TreeViewItem::linkStatus() const
return column_items_[0].linkStatus();
}
-void TreeViewItem::paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align)
+void TreeViewItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align)
{
TreeColumnViewItem item = column_items_[column];
// Get a color to draw the text
- QColorGroup m_cg(cg);
- QColor color(item.textStatusColor());
- m_cg.setColor(QColorGroup::Text, color);
+ TQColorGroup m_cg(cg);
+ TQColor color(item.textStatusColor());
+ m_cg.setColor(TQColorGroup::Text, color);
KListViewItem::paintCell(p, m_cg, column, width, align);
@@ -507,7 +507,7 @@ LinkStatus const* TreeColumnViewItem::linkStatus() const
return ls_;
}
-QColor const& TreeColumnViewItem::textStatusColor() const
+TQColor const& TreeColumnViewItem::textStatusColor() const
{
if(columnIndex() == root_->urlColumnIndex() || columnIndex() == root_->statusColumnIndex())
{
@@ -537,7 +537,7 @@ QColor const& TreeColumnViewItem::textStatusColor() const
}
-QString TreeColumnViewItem::text(int column) const
+TQString TreeColumnViewItem::text(int column) const
{
Q_ASSERT(column > 0);
@@ -559,19 +559,19 @@ QString TreeColumnViewItem::text(int column) const
}
else if(column == root_->statusColumnIndex())
{
- return QString();
+ return TQString();
}
else if(column == root_->labelColumnIndex())
{
- QString label(linkStatus()->label());
+ TQString label(linkStatus()->label());
if(!label.isNull())
return label.simplifyWhiteSpace();
}
- return QString();
+ return TQString();
}
-QPixmap TreeColumnViewItem::pixmap(int column) const
+TQPixmap TreeColumnViewItem::pixmap(int column) const
{
Q_ASSERT(column > 0);
@@ -602,7 +602,7 @@ QPixmap TreeColumnViewItem::pixmap(int column) const
return SmallIcon("help");
}
- return QPixmap();
+ return TQPixmap();
}
diff --git a/klinkstatus/src/ui/treeview.h b/klinkstatus/src/ui/treeview.h
index eef34ff8..4d67c4f4 100644
--- a/klinkstatus/src/ui/treeview.h
+++ b/klinkstatus/src/ui/treeview.h
@@ -23,18 +23,18 @@ class LinkMatcher;
@author Paulo Moura Guedes
TreeView and TreeViewItem and currently a little messes up in its API
because of ResultView. ResultView class was to be the base interface to
-a QTable and a QListView, but the APIs are a little diferent... then I realize
-that a QTable view isn't needed at all so some day I will clean this up.
+a TQTable and a TQListView, but the APIs are a little diferent... then I realize
+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
public:
- TreeView(QWidget *parent = 0, const char *name = 0);
+ TreeView(TQWidget *parent = 0, const char *name = 0);
~TreeView();
- virtual void setColumns(QStringList const& columns);
+ virtual void setColumns(TQStringList const& columns);
virtual void clear();
void removeColunas();
virtual void show(ResultView::Status const& status);
@@ -48,17 +48,17 @@ public:
except if the user scrolls the view up (like Konsole).
If tree_view, it follows always the last link inserted.
*/
- void ensureRowVisible(const QListViewItem * i, bool tree_display);
+ void ensureRowVisible(const TQListViewItem * i, bool tree_display);
virtual bool isEmpty() const;
- TreeViewItem* myItem(QListViewItem* item) const;
+ TreeViewItem* myItem(TQListViewItem* item) const;
protected:
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void resizeEvent(TQResizeEvent *e);
private slots:
- void slotPopupContextMenu(QListViewItem *, const QPoint &, int);
+ void slotPopupContextMenu(TQListViewItem *, const TQPoint &, int);
virtual void slotCopyUrlToClipboard() const;
virtual void slotCopyParentUrlToClipboard() const;
virtual void slotCopyCellTextToClipboard() const;
@@ -67,7 +67,7 @@ private slots:
virtual void slotEditReferrerWithQuanta(KURL const& url);
virtual void slotViewUrlInBrowser();
virtual void slotViewParentUrlInBrowser();
- virtual void loadContextTableMenu(QValueVector<KURL> const& referrers, bool is_root = false);
+ virtual void loadContextTableMenu(TQValueVector<KURL> const& referrers, bool is_root = false);
private:
void resetColumns();
@@ -90,27 +90,27 @@ class TreeViewItem: public KListViewItem
{
public:
- TreeViewItem(TreeView* parent, QListViewItem* after,
+ TreeViewItem(TreeView* parent, TQListViewItem* after,
LinkStatus const* linkstatus);
- TreeViewItem(TreeView* root, QListViewItem* parent_item, QListViewItem* after,
+ TreeViewItem(TreeView* root, TQListViewItem* parent_item, TQListViewItem* after,
LinkStatus const* linkstatus);
virtual ~TreeViewItem();
- void setLastChild(QListViewItem* last_child);
- QListViewItem* lastChild() const;
+ void setLastChild(TQListViewItem* last_child);
+ TQListViewItem* lastChild() const;
- QString key(int column, bool) const;
+ TQString key(int column, bool) const;
LinkStatus const* linkStatus() const;
protected:
- virtual void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align);
+ virtual void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align);
private:
void init(LinkStatus const* linkstatus);
private:
- QValueVector<TreeColumnViewItem> column_items_;
- QListViewItem* last_child_;
+ TQValueVector<TreeColumnViewItem> column_items_;
+ TQListViewItem* last_child_;
TreeView* root_;
};
@@ -129,9 +129,9 @@ public:
//void setColumnIndex(int i);
int columnIndex() const;
LinkStatus const* linkStatus() const;
- QColor const& textStatusColor() const;
- QString text(int column) const;
- QPixmap pixmap(int column) const;
+ TQColor const& textStatusColor() const;
+ TQString text(int column) const;
+ TQPixmap pixmap(int column) const;
private:
TreeView* root_;
diff --git a/klinkstatus/src/utils/utils.cpp b/klinkstatus/src/utils/utils.cpp
index 6259f8d0..25384b4b 100644
--- a/klinkstatus/src/utils/utils.cpp
+++ b/klinkstatus/src/utils/utils.cpp
@@ -20,15 +20,15 @@
#include "utils.h"
-#include <qprocess.h>
-#include <qwidget.h>
+#include <tqprocess.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kmessagebox.h>
#include <kdebug.h>
-QString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = {
+TQString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = {
{ "&euro;", "@" },
{ "&#09;", "\t" },
@@ -129,7 +129,7 @@ QString htmlDocCharset[NUMBER_OF_HTML_CODES][2] = {
};
-void decode(QString& url)
+void decode(TQString& url)
{
if( (int)url.find('&') != -1)
{
@@ -184,18 +184,18 @@ int smallerUnsigned(int a, int b)
namespace FileManager
{
-QString read(QString const& path)
+TQString read(TQString const& path)
{
- QFile file(path);
+ TQFile file(path);
if(!file.open(IO_ReadOnly))
{
kdDebug() << "File " << path << " not found." << endl;
- return QString();
+ return TQString();
}
- QTextStream stream(&file);
- QString fileString = stream.read();
+ TQTextStream stream(&file);
+ TQString fileString = stream.read();
file.close();
diff --git a/klinkstatus/src/utils/utils.h b/klinkstatus/src/utils/utils.h
index 97d81ea0..f44d94c4 100644
--- a/klinkstatus/src/utils/utils.h
+++ b/klinkstatus/src/utils/utils.h
@@ -22,7 +22,7 @@
#define UTILS_H
#include <kurl.h>
-#include <qstring.h>
+#include <tqstring.h>
//#include <string>
@@ -31,14 +31,14 @@ using namespace std;
int const NUMBER_OF_HTML_CODES = 92;
-extern QString htmlDocCharset[NUMBER_OF_HTML_CODES][2];
+extern TQString htmlDocCharset[NUMBER_OF_HTML_CODES][2];
/**
Decode the html charset.
e.g.
decode("mail&#64;server&#46;org") => "mail@server.org"
*/
-void decode(QString& url);
+void decode(TQString& url);
//void decode(string& url);
/**
@@ -57,7 +57,7 @@ int smallerUnsigned(int a, int b);
namespace FileManager
{
-QString read(QString const& path);
+TQString read(TQString const& path);
}
diff --git a/klinkstatus/src/utils/xsl.cpp b/klinkstatus/src/utils/xsl.cpp
index c3b13412..27f61cb8 100644
--- a/klinkstatus/src/utils/xsl.cpp
+++ b/klinkstatus/src/utils/xsl.cpp
@@ -33,12 +33,12 @@
// stdlib.h is required to build on Solaris
#include <stdlib.h>
-#include <qregexp.h>
-#include <qsignal.h>
-#include <qstylesheet.h>
-#include <qthread.h>
-#include <qevent.h>
-#include <qmutex.h>
+#include <tqregexp.h>
+#include <tqsignal.h>
+#include <tqstylesheet.h>
+#include <tqthread.h>
+#include <tqevent.h>
+#include <tqmutex.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -51,7 +51,7 @@
* The thread class that actually performs the XSL processing.
* Using a thread allows async operation.
*/
-class KopeteXSLThread : public QObject, public QThread
+class KopeteXSLThread : public TQObject, public QThread
{
public:
/**
@@ -62,36 +62,36 @@ public:
* @param target Target object to connect to for async operation
* @param slotCompleted Slot to fire on completion in asnc operation
*/
- KopeteXSLThread( const QString &xmlString, xsltStylesheetPtr xslDoc, QObject *target = 0L, const char *slotCompleted = 0L );
+ KopeteXSLThread( const TQString &xmlString, xsltStylesheetPtr xslDoc, TQObject *target = 0L, const char *slotCompleted = 0L );
/**
- * Reimplemented from QThread. Does the processing.
+ * Reimplemented from TQThread. Does the processing.
*/
virtual void run();
/**
* A user event is used to get back to the UI thread to emit the completed signal
*/
- bool event( QEvent *event );
+ bool event( TQEvent *event );
- static QString xsltTransform( const QString &xmlString, xsltStylesheetPtr xslDoc );
+ static TQString xsltTransform( const TQString &xmlString, xsltStylesheetPtr xslDoc );
/**
* Returns the result string
*/
- const QString &result()
+ const TQString &result()
{ return m_resultString; };
private:
- QString m_xml;
+ TQString m_xml;
xsltStylesheetPtr m_xsl;
- QString m_resultString;
- QObject *m_target;
+ TQString m_resultString;
+ TQObject *m_target;
const char *m_slotCompleted;
- QMutex dataMutex;
+ TQMutex dataMutex;
};
-KopeteXSLThread::KopeteXSLThread( const QString &xmlString, xsltStylesheetPtr xslDoc, QObject *target, const char *slotCompleted )
+KopeteXSLThread::KopeteXSLThread( const TQString &xmlString, xsltStylesheetPtr xslDoc, TQObject *target, const char *slotCompleted )
{
m_xml = xmlString;
m_xsl = xslDoc;
@@ -106,17 +106,17 @@ void KopeteXSLThread::run()
m_resultString = xsltTransform( m_xml, m_xsl );
dataMutex.unlock();
// get back to the main thread
- qApp->postEvent( this, new QEvent( QEvent::User ) );
+ qApp->postEvent( this, new TQEvent( TQEvent::User ) );
}
-bool KopeteXSLThread::event( QEvent *event )
+bool KopeteXSLThread::event( TQEvent *event )
{
- if ( event->type() == QEvent::User )
+ if ( event->type() == TQEvent::User )
{
dataMutex.lock();
if( m_target && m_slotCompleted )
{
- QSignal completeSignal( m_target );
+ TQSignal completeSignal( m_target );
completeSignal.connect( m_target, m_slotCompleted );
completeSignal.setValue( m_resultString );
completeSignal.activate();
@@ -125,23 +125,23 @@ bool KopeteXSLThread::event( QEvent *event )
delete this;
return true;
}
- return QObject::event( event );
+ return TQObject::event( event );
}
-QString KopeteXSLThread::xsltTransform( const QString &xmlString, xsltStylesheetPtr styleSheet )
+TQString KopeteXSLThread::xsltTransform( const TQString &xmlString, xsltStylesheetPtr styleSheet )
{
- // Convert QString into a C string
- QCString xmlCString = xmlString.utf8();
+ // Convert TQString into a C string
+ TQCString xmlCString = xmlString.utf8();
- QString resultString;
- QString errorMsg;
+ TQString resultString;
+ TQString errorMsg;
xmlDocPtr xmlDoc = xmlParseMemory( xmlCString, xmlCString.length() );
if ( xmlDoc )
{
if ( styleSheet )
{
- static QCString appPath( QString::fromLatin1("\"%1\"").arg( KApplication::kApplication()->dirs()->findDirs("appdata", QString::fromLatin1("styles/data") ).front() ).utf8() );
+ static TQCString appPath( TQString::fromLatin1("\"%1\"").arg( KApplication::kApplication()->dirs()->findDirs("appdata", TQString::fromLatin1("styles/data") ).front() ).utf8() );
static const char* params[3] = {
"appdata",
@@ -156,7 +156,7 @@ QString KopeteXSLThread::xsltTransform( const QString &xmlString, xsltStylesheet
xmlChar *mem;
int size;
xmlDocDumpMemory( resultDoc, &mem, &size );
- resultString = QString::fromUtf8( QCString( ( char * )( mem ), size + 1 ) );
+ resultString = TQString::fromUtf8( TQCString( ( char * )( mem ), size + 1 ) );
xmlFree( mem );
xmlFreeDoc( resultDoc );
}
@@ -196,8 +196,8 @@ public:
unsigned int flags;
};
-XSLT::XSLT( const QString &document, QObject *parent )
- : QObject( parent ), d(new XSLTPrivate)
+XSLT::XSLT( const TQString &document, TQObject *parent )
+ : TQObject( parent ), d(new XSLTPrivate)
{
d->flags = 0;
d->xslDoc = 0;
@@ -217,12 +217,12 @@ XSLT::~XSLT()
delete d;
}
-void XSLT::setXSLT( const QString &_document )
+void XSLT::setXSLT( const TQString &_document )
{
// Search for '<kopete-i18n>' elements and feed them through i18n().
// After that replace the %VAR% variables with their proper XSLT counterpart.
//
- // FIXME: Preprocessing the document using the QString API is fast and simple,
+ // FIXME: Preprocessing the document using the TQString API is fast and simple,
// but also error-sensitive.
// In fact, there are a couple of known issues with this algorithm that
// depend on the strings in the current styles. If these strings change
@@ -235,47 +235,47 @@ void XSLT::setXSLT( const QString &_document )
// Actually, since we need to parse into a libxml2 document anyway, this whole
// nonsense could be replaced with some simple XPath expressions - JK
//
- QRegExp elementMatch( QString::fromLatin1( "<kopete-i18n>(.*)</kopete-i18n>" ) );
+ TQRegExp elementMatch( TQString::fromLatin1( "<kopete-i18n>(.*)</kopete-i18n>" ) );
elementMatch.setMinimal( true );
- QString document = _document;
+ TQString document = _document;
int pos;
while ( ( pos = elementMatch.search( document ) ) != -1 )
{
- QString orig = elementMatch.cap( 1 );
+ TQString orig = elementMatch.cap( 1 );
//kdDebug( 14010 ) << k_funcinfo << "Original text: " << orig << endl;
// Split on % and go over all parts
// WARNING: If you change the translator comment, also change it in the
// styles/extracti18n Perl script, because the strings have to be
// identical!
- QStringList parts = QStringList::split( '%', i18n(
+ TQStringList parts = TQStringList::split( '%', i18n(
"Translators: The %FOO% placeholders are variables that are substituted "
"in the code, please leave them untranslated", orig.utf8() ), true );
// The first part is always text, as our variables are written like %FOO%
- QStringList::Iterator it = parts.begin();
- QString trans = *it;
+ TQStringList::Iterator it = parts.begin();
+ TQString trans = *it;
bool prependPercent = true;
it = parts.remove( it );
for ( it = parts.begin(); it != parts.end(); ++it )
{
prependPercent = false;
- if ( *it == QString::fromLatin1( "TIME" ) )
+ if ( *it == TQString::fromLatin1( "TIME" ) )
{
- trans += QString::fromLatin1( "<xsl:value-of select=\"@time\"/>" );
+ trans += TQString::fromLatin1( "<xsl:value-of select=\"@time\"/>" );
}
- else if ( *it == QString::fromLatin1( "TIMESTAMP" ) )
+ else if ( *it == TQString::fromLatin1( "TIMESTAMP" ) )
{
- trans += QString::fromLatin1( "<xsl:value-of select=\"@timestamp\"/>" );
+ trans += TQString::fromLatin1( "<xsl:value-of select=\"@timestamp\"/>" );
}
- else if ( *it == QString::fromLatin1( "FORMATTEDTIMESTAMP" ) )
+ else if ( *it == TQString::fromLatin1( "FORMATTEDTIMESTAMP" ) )
{
- trans += QString::fromLatin1( "<xsl:value-of select=\"@formattedTimestamp\"/>" );
+ trans += TQString::fromLatin1( "<xsl:value-of select=\"@formattedTimestamp\"/>" );
}
- else if ( *it == QString::fromLatin1( "FROM_CONTACT_DISPLAYNAME" ) )
+ else if ( *it == TQString::fromLatin1( "FROM_CONTACT_DISPLAYNAME" ) )
{
- trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ trans += TQString::fromLatin1( "<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 QString &_document )
"</xsl:attribute>"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"from/contact/contactDisplayName/@text\"/></span>" );
}
- else if ( *it == QString::fromLatin1( "TO_CONTACT_DISPLAYNAME" ) )
+ else if ( *it == TQString::fromLatin1( "TO_CONTACT_DISPLAYNAME" ) )
{
- trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ trans += TQString::fromLatin1( "<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 QString &_document )
"</xsl:attribute>"
"<xsl:value-of disable-output-escaping=\"yes\" select=\"to/contact/contactDisplayName/@text\"/></span>" );
}
- else if ( *it == QString::fromLatin1( "FROM_METACONTACT_DISPLAYNAME" ) )
+ else if ( *it == TQString::fromLatin1( "FROM_METACONTACT_DISPLAYNAME" ) )
{
- trans += QString::fromLatin1( "<span>"
+ trans += TQString::fromLatin1( "<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 == QString::fromLatin1( "TO_METACONTACT_DISPLAYNAME" ) )
+ else if ( *it == TQString::fromLatin1( "TO_METACONTACT_DISPLAYNAME" ) )
{
- trans += QString::fromLatin1( "<span>"
+ trans += TQString::fromLatin1( "<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 == QString::fromLatin1( "FROM_CONTACT_ID" ) )
+ else if ( *it == TQString::fromLatin1( "FROM_CONTACT_ID" ) )
{
- trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ trans += TQString::fromLatin1( "<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 == QString::fromLatin1( "TO_CONTACT_ID" ) )
+ else if ( *it == TQString::fromLatin1( "TO_CONTACT_ID" ) )
{
- trans += QString::fromLatin1( "<span><xsl:attribute name=\"title\">"
+ trans += TQString::fromLatin1( "<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 == QString::fromLatin1( "BODY" ) )
+ else if ( *it == TQString::fromLatin1( "BODY" ) )
{
- trans += QString::fromLatin1( "<xsl:value-of disable-output-escaping=\"yes\" select=\"body\"/>" );
+ trans += TQString::fromLatin1( "<xsl:value-of disable-output-escaping=\"yes\" select=\"body\"/>" );
}
else
{
@@ -362,7 +362,7 @@ void XSLT::setXSLT( const QString &_document )
d->xslDoc = 0;
d->flags = 0;
- QCString rawDocument = document.utf8();
+ TQCString rawDocument = document.utf8();
d->xslDoc = xmlParseMemory( rawDocument, rawDocument.length() );
if( d->xslDoc )
@@ -371,13 +371,13 @@ void XSLT::setXSLT( const QString &_document )
if( d->styleSheet )
{
// Check for flags
- QStringList flags;
+ TQStringList flags;
for( xmlNodePtr child = d->xslDoc->children; child != d->xslDoc->last; child = child->next )
{
if( child->type == XML_PI_NODE )
{
//We have a flag. Enable it;
- QCString flagData( (const char*)child->content );
+ TQCString flagData( (const char*)child->content );
if( flagData.contains( "Flag:" ) )
{
@@ -387,7 +387,7 @@ void XSLT::setXSLT( const QString &_document )
}
if( !flags.isEmpty() )
- setProperty("flags", flags.join( QString::fromLatin1("|") ) );
+ setProperty("flags", flags.join( TQString::fromLatin1("|") ) );
}
else
{
@@ -406,12 +406,12 @@ void XSLT::setXSLT( const QString &_document )
}
}
-QString XSLT::transform( const QString &xmlString )
+TQString XSLT::transform( const TQString &xmlString )
{
return KopeteXSLThread::xsltTransform( xmlString, d->styleSheet );
}
-void XSLT::transformAsync( const QString &xmlString, QObject *target, const char *slotCompleted )
+void XSLT::transformAsync( const TQString &xmlString, TQObject *target, const char *slotCompleted )
{
( new KopeteXSLThread( xmlString, d->styleSheet, target, slotCompleted ) )->start();
}
diff --git a/klinkstatus/src/utils/xsl.h b/klinkstatus/src/utils/xsl.h
index 9d12c1c1..7fb6af70 100644
--- a/klinkstatus/src/utils/xsl.h
+++ b/klinkstatus/src/utils/xsl.h
@@ -20,7 +20,7 @@
#ifndef XSL_H
#define XSL_H
-#include <qobject.h>
+#include <tqobject.h>
class XSLTPrivate;
@@ -56,7 +56,7 @@ public:
*
* Constructs a new XSLT parser using the provided XSLT document
*/
- XSLT( const QString &xsltDocument, QObject *parent = 0L );
+ XSLT( const TQString &xsltDocument, TQObject *parent = 0L );
virtual ~XSLT();
@@ -65,7 +65,7 @@ public:
*
* @return an ORed set of @ref Flags, or 0 if none
*/
- void setXSLT( const QString &document );
+ void setXSLT( const TQString &document );
/**
* Transforms the XML string using the XSLT document, synchronously
@@ -73,17 +73,17 @@ public:
* @param xmlString The source XML
* @return The result of the transformation
*/
- QString transform( const QString &xmlString );
+ TQString transform( const TQString &xmlString );
/**
* Transforms the XML string using the XSLT document, asynchronously
*
* @param xmlString The source XML
- * @param target The QObject that contains the slot to be executed when processing is complete
- * @param slotCompleted A slot that accepts a QVariant & paramater, that is the result
+ * @param target The TQObject that contains the slot to be executed when processing is complete
+ * @param slotCompleted A slot that accepts a TQVariant & paramater, that is the result
* of the transformation
*/
- void transformAsync( const QString &xmlString, QObject *target, const char *slotCompleted );
+ void transformAsync( const TQString &xmlString, TQObject *target, const char *slotCompleted );
/**
* Check whether the XSLT document is valid