summaryrefslogtreecommitdiffstats
path: root/libkmime/kmime_parsers.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkmime/kmime_parsers.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkmime/kmime_parsers.cpp')
-rw-r--r--libkmime/kmime_parsers.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/libkmime/kmime_parsers.cpp b/libkmime/kmime_parsers.cpp
index 181ce6772..6527c9912 100644
--- a/libkmime/kmime_parsers.cpp
+++ b/libkmime/kmime_parsers.cpp
@@ -15,7 +15,7 @@
*/
#include "kmime_parsers.h"
-#include <qregexp.h>
+#include <tqregexp.h>
using namespace KMime::Parser;
@@ -23,7 +23,7 @@ namespace KMime {
namespace Parser {
-MultiPart::MultiPart(const QCString &src, const QCString &boundary)
+MultiPart::MultiPart(const TQCString &src, const TQCString &boundary)
{
s_rc=src;
b_oundary=boundary;
@@ -32,7 +32,7 @@ MultiPart::MultiPart(const QCString &src, const QCString &boundary)
bool MultiPart::parse()
{
- QCString b="--"+b_oundary, part;
+ TQCString b="--"+b_oundary, part;
int pos1=0, pos2=0, blen=b.length();
p_arts.clear();
@@ -95,16 +95,16 @@ bool MultiPart::parse()
//============================================================================================
-NonMimeParser::NonMimeParser(const QCString &src) :
+NonMimeParser::NonMimeParser(const TQCString &src) :
s_rc(src), p_artNr(-1), t_otalNr(-1)
{}
/**
* try to guess the mimetype from the file-extension
*/
-QCString NonMimeParser::guessMimeType(const QCString& fileName)
+TQCString NonMimeParser::guessMimeType(const TQCString& fileName)
{
- QCString tmp, mimeType;
+ TQCString tmp, mimeType;
int pos;
if(!fileName.isEmpty()) {
@@ -137,7 +137,7 @@ QCString NonMimeParser::guessMimeType(const QCString& fileName)
//============================================================================================
-UUEncoded::UUEncoded(const QCString &src, const QCString &subject) :
+UUEncoded::UUEncoded(const TQCString &src, const TQCString &subject) :
NonMimeParser(src), s_ubject(subject)
{}
@@ -150,9 +150,9 @@ bool UUEncoded::parse()
while (success) {
int beginPos=currentPos, uuStart=currentPos, endPos=0, lineCount=0, MCount=0, pos=0, len=0;
bool containsBegin=false, containsEnd=false;
- QCString tmp,fileName;
+ TQCString tmp,fileName;
- if( (beginPos=s_rc.find(QRegExp("begin [0-9][0-9][0-9]"),currentPos))>-1 && (beginPos==0 || s_rc.at(beginPos-1)=='\n') ) {
+ if( (beginPos=s_rc.find(TQRegExp("begin [0-9][0-9][0-9]"),currentPos))>-1 && (beginPos==0 || s_rc.at(beginPos-1)=='\n') ) {
containsBegin=true;
uuStart=s_rc.find('\n', beginPos);
if(uuStart==-1) {//no more line breaks found, we give up
@@ -189,8 +189,8 @@ bool UUEncoded::parse()
}
if( (!containsBegin || !containsEnd) && s_ubject) { // message may be split up => parse subject
- QRegExp rx("[0-9]+/[0-9]+");
- pos=rx.search(QString(s_ubject), 0);
+ TQRegExp rx("[0-9]+/[0-9]+");
+ pos=rx.search(TQString(s_ubject), 0);
len=rx.matchedLength();
if(pos!=-1) {
tmp=s_ubject.mid(pos, len);
@@ -239,15 +239,15 @@ bool UUEncoded::parse()
//============================================================================================
-YENCEncoded::YENCEncoded(const QCString &src) :
+YENCEncoded::YENCEncoded(const TQCString &src) :
NonMimeParser(src)
{}
-bool YENCEncoded::yencMeta(QCString& src, const QCString& name, int* value)
+bool YENCEncoded::yencMeta(TQCString& src, const TQCString& name, int* value)
{
bool found = false;
- QCString sought=name + "=";
+ TQCString sought=name + "=";
int iPos=src.find( sought);
if (iPos>-1) {
@@ -282,7 +282,7 @@ bool YENCEncoded::parse()
while (success) {
int beginPos=currentPos, yencStart=currentPos;
bool containsPart=false;
- QCString fileName,mimeType;
+ TQCString fileName,mimeType;
if ((beginPos=s_rc.find("=ybegin ", currentPos))>-1 && ( beginPos==0 || s_rc.at( beginPos-1)=='\n') ) {
yencStart=s_rc.find( '\n', beginPos);
@@ -304,7 +304,7 @@ bool YENCEncoded::parse()
// Try to identify yenc meta data
// Filenames can contain any embedded chars until end of line
- QCString meta=s_rc.mid(beginPos, yencStart-beginPos);
+ TQCString meta=s_rc.mid(beginPos, yencStart-beginPos);
int namePos=meta.find("name=");
if (namePos== -1) {
success=false;
@@ -356,7 +356,7 @@ bool YENCEncoded::parse()
bool lineStart=true;
int lineLength=0;
bool containsEnd=false;
- QByteArray binary = QByteArray(yencSize);
+ TQByteArray binary = TQByteArray(yencSize);
while (pos<len) {
int ch=s_rc.at(pos);
if (ch<0)