summaryrefslogtreecommitdiffstats
path: root/kioslaves/imap4/mimeheader.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kioslaves/imap4/mimeheader.cc
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslaves/imap4/mimeheader.cc')
-rw-r--r--kioslaves/imap4/mimeheader.cc52
1 files changed, 26 insertions, 26 deletions
diff --git a/kioslaves/imap4/mimeheader.cc b/kioslaves/imap4/mimeheader.cc
index 1d0b7ab9e..c14fbb705 100644
--- a/kioslaves/imap4/mimeheader.cc
+++ b/kioslaves/imap4/mimeheader.cc
@@ -168,7 +168,7 @@ mimeHeader::addParameter (const TQCString& aParameter, TQDict < TQString > *aLis
TQString *aValue;
TQCString aLabel;
- int pos = aParameter.find ('=');
+ int pos = aParameter.tqfind ('=');
// cout << aParameter.left(pos).data();
aValue = new TQString ();
aValue->setLatin1 (aParameter.right (aParameter.length () - pos - 1));
@@ -180,13 +180,13 @@ mimeHeader::addParameter (const TQCString& aParameter, TQDict < TQString > *aLis
// cout << "=" << aValue->data() << endl;
}
-QString
+TQString
mimeHeader::getDispositionParm (const TQCString& aStr)
{
return getParameter (aStr, &dispositionList);
}
-QString
+TQString
mimeHeader::getTypeParm (const TQCString& aStr)
{
return getParameter (aStr, &typeList);
@@ -261,18 +261,18 @@ mimeHeader::outputHeader (mimeIO & useIO)
useIO.outputMimeLine (TQCString (""));
}
-QString
+TQString
mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict)
{
TQString retVal, *found;
if (aDict)
{
//see if it is a normal parameter
- found = aDict->find (aStr);
+ found = aDict->tqfind (aStr);
if (!found)
{
//might be a continuated or encoded parameter
- found = aDict->find (aStr + "*");
+ found = aDict->tqfind (aStr + "*");
if (!found)
{
//continuated parameter
@@ -284,10 +284,10 @@ mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict)
TQCString search;
search.setNum (part);
search = aStr + "*" + search;
- found = aDict->find (search);
+ found = aDict->tqfind (search);
if (!found)
{
- found = aDict->find (search + "*");
+ found = aDict->tqfind (search + "*");
if (found)
encoded += rfcDecoder::encodeRFC2231String (*found);
}
@@ -298,7 +298,7 @@ mimeHeader::getParameter (const TQCString& aStr, TQDict < TQString > *aDict)
part++;
}
while (found);
- if (encoded.find ('\'') >= 0)
+ if (encoded.tqfind ('\'') >= 0)
{
retVal = rfcDecoder::decodeRFC2231String (encoded.local8Bit ());
}
@@ -335,7 +335,7 @@ mimeHeader::setParameter (const TQCString& aLabel, const TQString& aValue,
{
//see if it needs to get encoded
- if (encoded && aLabel.find ('*') == -1)
+ if (encoded && aLabel.tqfind ('*') == -1)
{
val = rfcDecoder::encodeRFC2231String (aValue);
}
@@ -402,7 +402,7 @@ mimeHeader::setParameter (const TQCString& aLabel, const TQString& aValue,
}
}
-QCString
+TQCString
mimeHeader::outputParameter (TQDict < TQString > *aDict)
{
TQCString retVal;
@@ -412,7 +412,7 @@ mimeHeader::outputParameter (TQDict < TQString > *aDict)
while (it.current ())
{
retVal += (";\n\t" + it.currentKey () + "=").latin1 ();
- if (it.current ()->find (' ') > 0 || it.current ()->find (';') > 0)
+ if (it.current ()->tqfind (' ') > 0 || it.current ()->tqfind (';') > 0)
{
retVal += '"' + it.current ()->utf8 () + '"';
}
@@ -527,7 +527,7 @@ mimeHeader::parseBody (mimeIO & useIO, TQCString & messageBody,
retVal = 1; //continue with next part
break;
}
- else if (mbox && inputStr.find ("From ") == 0)
+ else if (mbox && inputStr.tqfind ("From ") == 0)
{
retVal = 0; // end of mbox
break;
@@ -556,7 +556,7 @@ mimeHeader::parseHeader (mimeIO & useIO)
while (useIO.inputLine (inputStr))
{
int appended;
- if (inputStr.find ("From ") != 0 || !first)
+ if (inputStr.tqfind ("From ") != 0 || !first)
{
first = false;
appended = my_line.appendStr (inputStr);
@@ -584,7 +584,7 @@ mimeHeader *
mimeHeader::bodyPart (const TQString & _str)
{
// see if it is nested a little deeper
- int pt = _str.find('.');
+ int pt = _str.tqfind('.');
if (pt != -1)
{
TQString tempStr = _str;
@@ -643,7 +643,7 @@ void mimeHeader::serialize(TQDataStream& stream)
#ifdef KMAIL_COMPATIBLE
// compatibility subroutines
-QString
+TQString
mimeHeader::bodyDecoded ()
{
kdDebug(7116) << "mimeHeader::bodyDecoded" << endl;
@@ -653,14 +653,14 @@ mimeHeader::bodyDecoded ()
return TQString::tqfromLatin1 (temp.data (), temp.count ());
}
-QByteArray
+TQByteArray
mimeHeader::bodyDecodedBinary ()
{
TQByteArray retVal;
- if (contentEncoding.find ("quoted-printable", 0, false) == 0)
+ if (contentEncoding.tqfind ("quoted-printable", 0, false) == 0)
retVal = KCodecs::quotedPrintableDecode(postMultipartBody);
- else if (contentEncoding.find ("base64", 0, false) == 0)
+ else if (contentEncoding.tqfind ("base64", 0, false) == 0)
KCodecs::base64Decode(postMultipartBody, retVal);
else retVal = postMultipartBody;
@@ -680,9 +680,9 @@ mimeHeader::setBodyEncoded (const TQByteArray & _arr)
TQByteArray setVal;
kdDebug(7116) << "mimeHeader::setBodyEncoded - in size " << _arr.size () << endl;
- if (contentEncoding.find ("quoted-printable", 0, false) == 0)
+ if (contentEncoding.tqfind ("quoted-printable", 0, false) == 0)
setVal = KCodecs::quotedPrintableEncode(_arr);
- else if (contentEncoding.find ("base64", 0, false) == 0)
+ else if (contentEncoding.tqfind ("base64", 0, false) == 0)
KCodecs::base64Encode(_arr, setVal);
else
setVal.duplicate (_arr);
@@ -692,14 +692,14 @@ mimeHeader::setBodyEncoded (const TQByteArray & _arr)
kdDebug(7116) << "mimeHeader::setBodyEncoded - out size " << postMultipartBody.size () << endl;
}
-QString
+TQString
mimeHeader::iconName ()
{
TQString fileName;
// FIXME: bug? Why throw away this data?
fileName =
- KMimeType::mimeType (contentType.lower ())->icon (TQString::null, false);
+ KMimeType::mimeType (contentType.lower ())->icon (TQString(), false);
fileName =
KGlobal::instance ()->iconLoader ()->iconPath (fileName, KIcon::Desktop);
// if (fileName.isEmpty())
@@ -714,16 +714,16 @@ mimeHeader::setNestedMessage (mailHeader * inPart, bool destroy)
nestedMessage = inPart;
}
-QString
+TQString
mimeHeader::headerAsString ()
{
- mimeIOQString myIO;
+ mimeIOTQString myIO;
outputHeader (myIO);
return myIO.getString ();
}
-QString
+TQString
mimeHeader::magicSetType (bool aAutoDecode)
{
TQString mimetype;