From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kpf/src/Response.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'kpf/src/Response.cpp') diff --git a/kpf/src/Response.cpp b/kpf/src/Response.cpp index f9ce46d8..a52de893 100644 --- a/kpf/src/Response.cpp +++ b/kpf/src/Response.cpp @@ -21,9 +21,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include -#include +#include +#include +#include #include @@ -79,7 +79,7 @@ namespace KPF QCString Response::text(const Request & request) const { - QString s; + TQString s; // XXX: Ensure that all codes we know about are enumerated here. switch (code_) @@ -89,8 +89,8 @@ namespace KPF case 304: if (request.protocol() >= 1.0) { - s = QString(request.protocolString()) - + QString(" %1 %2\r\n").arg(code_).arg(responseName(code_)); + s = TQString(request.protocolString()) + + TQString(" %1 %2\r\n").arg(code_).arg(responseName(code_)); } break; @@ -102,8 +102,8 @@ namespace KPF case 500: case 501: case 505: - s = QString(request.protocolString()) - + QString(" %1 %2\r\n").arg(code_).arg(responseName(code_)) + s = TQString(request.protocolString()) + + TQString(" %1 %2\r\n").arg(code_).arg(responseName(code_)) + data(code_, request); break; @@ -118,13 +118,13 @@ namespace KPF QString Response::data(uint code, const Request & request) const { - QString contentType = "Content-Type: text/html; charset=utf-8\r\n"; + TQString contentType = "Content-Type: text/html; charset=utf-8\r\n"; KConfig config(Config::name()); config.setGroup("General"); - QString html; + TQString html; if ( @@ -134,26 +134,26 @@ namespace KPF { config.setGroup("ErrorMessageOverrideFiles"); - QString filename = config.readPathEntry(QString::number(code)); + TQString filename = config.readPathEntry(TQString::number(code)); if (!filename.isEmpty()) { - QFile f(filename); + TQFile f(filename); if (f.open(IO_ReadOnly)) { - QRegExp regexpMessage ("ERROR_MESSAGE"); - QRegExp regexpCode ("ERROR_CODE"); - QRegExp regexpResource ("RESOURCE"); + TQRegExp regexpMessage ("ERROR_MESSAGE"); + TQRegExp regexpCode ("ERROR_CODE"); + TQRegExp regexpResource ("RESOURCE"); - QTextStream str(&f); + TQTextStream str(&f); while (!str.atEnd()) { - QString line(str.readLine()); + TQString line(str.readLine()); line.replace(regexpMessage, responseName(code)); - line.replace(regexpCode, QString::number(code)); + line.replace(regexpCode, TQString::number(code)); line.replace(regexpResource, request.path()); html = line + "\r\n"; @@ -177,8 +177,8 @@ namespace KPF html += "\r\n\r\n"; } - QString contentLength = - QString("Content-Length: %1\r\n").arg(html.length()); + TQString contentLength = + TQString("Content-Length: %1\r\n").arg(html.length()); return (contentType + contentLength + "\r\n" + html); } -- cgit v1.2.1