summaryrefslogtreecommitdiffstats
path: root/src/parsers/policy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parsers/policy.cpp')
-rw-r--r--src/parsers/policy.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/parsers/policy.cpp b/src/parsers/policy.cpp
index ad31b7f..3b8e8ed 100644
--- a/src/parsers/policy.cpp
+++ b/src/parsers/policy.cpp
@@ -14,9 +14,9 @@
#include <klocale.h>
#include <kdebug.h>
#include <qhtmlstream.h>
-#include <qregexp.h>
+#include <tqregexp.h>
-static void policy_begin(QHtmlStream& stream)
+static void policy_begin(TQHtmlStream& stream)
{
stream
<< block("div") << endl
@@ -26,7 +26,7 @@ static void policy_begin(QHtmlStream& stream)
<< block("tbody");
}
-static void add_button(QHtmlStream& stream, const QString& mode, const QString& text, const QString& package)
+static void add_button(TQHtmlStream& stream, const TQString& mode, const TQString& text, const TQString& package)
{
stream
<< block("form")
@@ -48,7 +48,7 @@ static void add_button(QHtmlStream& stream, const QString& mode, const QString&
<< close() << endl;
}
-static void add_version_link(QHtmlStream& stream, AptProtocol* slave, const QString& package, const QString& version)
+static void add_version_link(TQHtmlStream& stream, AptProtocol* slave, const TQString& package, const TQString& version)
{
KURL url(slave->buildURL("show", package));
url.setHTMLRef(Parsers::mangle_version(version));
@@ -63,25 +63,25 @@ static void add_version_link(QHtmlStream& stream, AptProtocol* slave, const QStr
namespace Parsers
{
-Policy::Policy(const QString& package, bool act)
+Policy::Policy(const TQString& package, bool act)
: m_package(package), m_act(false)
{
m_act = act;
}
-void Policy::operator() (AptProtocol* slave, const QString& type, const QString& value)
+void Policy::operator() (AptProtocol* slave, const TQString& type, const TQString& value)
{
static bool first_version = false, received_sth = false;
- static QString buffer;
- static QHtmlStream* stream;
+ static TQString buffer;
+ static TQHtmlStream* stream;
- static QRegExp rx_notinstalled("(none)");
+ static TQRegExp rx_notinstalled("(none)");
kdDebug() << "policy : " << type << " " << value << endl;
if (type == "begin")
{
- stream = new QHtmlStream(&buffer);
+ stream = new TQHtmlStream(&buffer);
policy_begin(*stream);
}
else if (type == "installed")
@@ -91,7 +91,7 @@ void Policy::operator() (AptProtocol* slave, const QString& type, const QString&
attribute_begin(*stream, i18n("Installed"));
if (rx_notinstalled.match(value) >= 0)
{
- m_installed = QString::null;
+ m_installed = TQString();
*stream << i18n("no");
}
else
@@ -149,8 +149,8 @@ void Policy::operator() (AptProtocol* slave, const QString& type, const QString&
}
else if (type == "version")
{
- QString version = value.section(' ', 0, 0);
- QString pin = value.section(' ', 1, 1);
+ TQString version = value.section(' ', 0, 0);
+ TQString pin = value.section(' ', 1, 1);
if (first_version)
{
@@ -163,7 +163,7 @@ void Policy::operator() (AptProtocol* slave, const QString& type, const QString&
*stream << close() << close();
}*/
- QString version_link;
+ TQString version_link;
version_link = "<a href=\"apt:/show?" + m_package + "#" + mangle_version(version) + "\">"
+ version + "</a>";
@@ -175,8 +175,8 @@ void Policy::operator() (AptProtocol* slave, const QString& type, const QString&
}
else if (type == "location")
{
- QStringList sections = QStringList::split(' ', value);
- QString pin = sections.first();
+ TQStringList sections = TQStringList::split(' ', value);
+ TQString pin = sections.first();
sections.pop_front();
// remove the "Packages" field if it is here
if (sections.last() == "Packages")
@@ -193,7 +193,7 @@ void Policy::operator() (AptProtocol* slave, const QString& type, const QString&
*slave << buffer;
}
- buffer = QString::null;
+ buffer = TQString();
received_sth = false;
delete stream;
}