summaryrefslogtreecommitdiffstats
path: root/kmail/kmmsgpart.cpp
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 /kmail/kmmsgpart.cpp
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 'kmail/kmmsgpart.cpp')
-rw-r--r--kmail/kmmsgpart.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/kmail/kmmsgpart.cpp b/kmail/kmmsgpart.cpp
index a96d6aae2..9e71f285d 100644
--- a/kmail/kmmsgpart.cpp
+++ b/kmail/kmmsgpart.cpp
@@ -45,7 +45,7 @@ KMMessagePart::KMMessagePart( TQDataStream & stream )
KPIM::kAsciiToUpper( mOriginalContentTypeStr.data() );
// set the type
- int sep = mOriginalContentTypeStr.find('/');
+ int sep = mOriginalContentTypeStr.tqfind('/');
mType = mOriginalContentTypeStr.left(sep);
mSubtype = mOriginalContentTypeStr.mid(sep+1);
@@ -70,11 +70,11 @@ void KMMessagePart::clear()
mContentDisposition = TQCString();
mBody.truncate( 0 );
mAdditionalCTypeParamStr = TQCString();
- mName = TQString::null;
+ mName = TQString();
mParameterAttribute = TQCString();
- mParameterValue = TQString::null;
+ mParameterValue = TQString();
mCharset = TQCString();
- mPartSpecifier = TQString::null;
+ mPartSpecifier = TQString();
mBodyDecodedSize = 0;
mParent = 0;
mLoadHeaders = false;
@@ -87,7 +87,7 @@ void KMMessagePart::duplicate( const KMMessagePart & msgPart )
{
// copy the data of msgPart
*this = msgPart;
- // detach the explicitely shared QByteArray
+ // detach the explicitely shared TQByteArray
mBody.detach();
}
@@ -103,7 +103,7 @@ int KMMessagePart::decodedSize(void) const
//-----------------------------------------------------------------------------
void KMMessagePart::setBody(const TQCString &aStr)
{
- KMail::Util::setFromQCString( mBody, aStr );
+ KMail::Util::setFromTQCString( mBody, aStr );
int enc = cte();
if (enc == DwMime::kCte7bit || enc == DwMime::kCte8bit || enc == DwMime::kCteBinary)
@@ -422,10 +422,10 @@ void KMMessagePart::magicSetType(bool aAutoDecode)
KMimeMagic::self()->setFollowLinks( true ); // is it necessary ?
const TQByteArray body = ( aAutoDecode ) ? bodyDecodedBinary() : mBody ;
- KMimeMagicResult * result = KMimeMagic::self()->tqfindBufferType( body );
+ KMimeMagicResult * result = KMimeMagic::self()->findBufferType( body );
TQString mimetype = result->mimeType();
- const int sep = mimetype.find('/');
+ const int sep = mimetype.tqfind('/');
mType = mimetype.left(sep).latin1();
mSubtype = mimetype.mid(sep+1).latin1();
}
@@ -438,14 +438,14 @@ TQString KMMessagePart::iconName( int size ) const
KPIM::kAsciiToLower( mimeType.data() );
TQString fileName =
- KMimeType::mimeType( mimeType )->icon( TQString::null, false );
+ KMimeType::mimeType( mimeType )->icon( TQString(), false );
if ( fileName.isEmpty() )
{
fileName = this->fileName();
if ( fileName.isEmpty() ) fileName = this->name();
if ( !fileName.isEmpty() )
{
- fileName = KMimeType::tqfindByPath( "/tmp/"+fileName, 0, true )->icon( TQString::null, true );
+ fileName = KMimeType::findByPath( "/tmp/"+fileName, 0, true )->icon( TQString(), true );
}
}
@@ -568,19 +568,19 @@ TQString KMMessagePart::fileName(void) const
// Standard RFC 2047-encoded
// search the start of the filename
- int startOfFilename = mContentDisposition.find("filename=", 0, false);
+ int startOfFilename = mContentDisposition.tqfind("filename=", 0, false);
if (startOfFilename < 0)
- return TQString::null;
+ return TQString();
startOfFilename += 9;
// search the end of the filename
int endOfFilename;
if ( '"' == mContentDisposition[startOfFilename] ) {
startOfFilename++; // the double quote isn't part of the filename
- endOfFilename = mContentDisposition.find('"', startOfFilename) - 1;
+ endOfFilename = mContentDisposition.tqfind('"', startOfFilename) - 1;
}
else {
- endOfFilename = mContentDisposition.find(';', startOfFilename) - 1;
+ endOfFilename = mContentDisposition.tqfind(';', startOfFilename) - 1;
}
if (endOfFilename < 0)
endOfFilename = 32767;
@@ -591,7 +591,7 @@ TQString KMMessagePart::fileName(void) const
return KMMsgBase::decodeRFC2047String(str);
}
- return TQString::null;
+ return TQString();
}
TQCString KMMessagePart::body() const