summaryrefslogtreecommitdiffstats
path: root/kpf/src/Request.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpf/src/Request.cpp')
-rw-r--r--kpf/src/Request.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kpf/src/Request.cpp b/kpf/src/Request.cpp
index 01735363..442e4993 100644
--- a/kpf/src/Request.cpp
+++ b/kpf/src/Request.cpp
@@ -23,7 +23,7 @@
#include <climits> // For ULONG_MAX
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kurl.h>
#include "Defines.h"
@@ -50,25 +50,25 @@ namespace KPF
}
void
- Request::parseHeaders(const QStringList & buf)
+ Request::parseHeaders(const TQStringList & buf)
{
- for (QStringList::ConstIterator it(buf.begin()); it != buf.end(); ++it)
+ for (TQStringList::ConstIterator it(buf.begin()); it != buf.end(); ++it)
{
- QString line(*it);
+ TQString line(*it);
int colonPos = line.find(':');
if (-1 != colonPos)
{
- QString name(line.left(colonPos).stripWhiteSpace().lower());
- QString value(line.mid(colonPos + 1).stripWhiteSpace());
+ TQString name(line.left(colonPos).stripWhiteSpace().lower());
+ TQString value(line.mid(colonPos + 1).stripWhiteSpace());
handleHeader(name, value);
}
}
}
void
- Request::handleHeader(const QString & name, const QString & value)
+ Request::handleHeader(const TQString & name, const TQString & value)
{
if ("host" == name)
{
@@ -80,21 +80,21 @@ namespace KPF
}
else if ("if-modified-since" == name)
{
- QDateTime dt;
+ TQDateTime dt;
if (parseDate(value, dt))
setIfModifiedSince(dt);
}
else if ("if-unmodified-since" == name)
{
- QDateTime dt;
+ TQDateTime dt;
if (parseDate(value, dt))
setIfUnmodifiedSince(dt);
}
else if ("connection" == name)
{
- QString v(value.lower());
+ TQString v(value.lower());
if ("keep-alive" == v)
{
@@ -108,9 +108,9 @@ namespace KPF
}
void
- Request::setProtocol(const QString & _s)
+ Request::setProtocol(const TQString & _s)
{
- QString s(_s);
+ TQString s(_s);
s.remove(0, 5);
@@ -131,7 +131,7 @@ namespace KPF
}
void
- Request::setMethod(const QString & s)
+ Request::setMethod(const TQString & s)
{
if ("GET" == s)
method_ = Get;
@@ -148,7 +148,7 @@ namespace KPF
}
void
- Request::setPath(const QString & s)
+ Request::setPath(const TQString & s)
{
KURL p(s);
path_ = clean(p.path());
@@ -162,21 +162,21 @@ namespace KPF
}
void
- Request::setHost(const QString & s)
+ Request::setHost(const TQString & s)
{
host_ = s;
haveHost_ = true;
}
void
- Request::setIfModifiedSince(const QDateTime & dt)
+ Request::setIfModifiedSince(const TQDateTime & dt)
{
ifModifiedSince_ = dt;
haveIfModifiedSince_ = true;
}
void
- Request::setIfUnmodifiedSince(const QDateTime & dt)
+ Request::setIfUnmodifiedSince(const TQDateTime & dt)
{
ifUnmodifiedSince_ = dt;
haveIfUnmodifiedSince_ = true;
@@ -251,10 +251,10 @@ namespace KPF
QCString
Request::protocolString() const
{
- QCString s("HTTP/");
- s += QCString().setNum(protocolMajor_);
+ TQCString s("HTTP/");
+ s += TQCString().setNum(protocolMajor_);
s += '.';
- s += QCString().setNum(protocolMinor_);
+ s += TQCString().setNum(protocolMinor_);
return s;
}
@@ -271,7 +271,7 @@ namespace KPF
}
void
- Request::setRange(const QString & s)
+ Request::setRange(const TQString & s)
{
kpfDebug << "Request::setRange(`" << s << "')" << endl;
@@ -346,17 +346,17 @@ namespace KPF
expectContinue_ = false;
haveRange_ = false;
persist_ = false;
- path_ = QString::null;
- host_ = QString::null;
- ifModifiedSince_ = QDateTime();
- ifUnmodifiedSince_ = QDateTime();
+ path_ = TQString::null;
+ host_ = TQString::null;
+ ifModifiedSince_ = TQDateTime();
+ ifUnmodifiedSince_ = TQDateTime();
range_.clear();
}
QString
- Request::clean(const QString & _path) const
+ Request::clean(const TQString & _path) const
{
- QString s(_path);
+ TQString s(_path);
while (s.endsWith("/./"))
s.truncate(s.length() - 2);
@@ -366,7 +366,7 @@ namespace KPF
// Double slash -> slash.
- QRegExp r("\\/\\/+");
+ TQRegExp r("\\/\\/+");
s.replace(r, "/");
return s;