summaryrefslogtreecommitdiffstats
path: root/kmail/kmmessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmmessage.cpp')
-rw-r--r--kmail/kmmessage.cpp242
1 files changed, 121 insertions, 121 deletions
diff --git a/kmail/kmmessage.cpp b/kmail/kmmessage.cpp
index 3af9a252..6501c9e5 100644
--- a/kmail/kmmessage.cpp
+++ b/kmail/kmmessage.cpp
@@ -97,7 +97,7 @@ KMMessage::KMMessage(DwMessage* aMsg)
}
//-----------------------------------------------------------------------------
-KMMessage::KMMessage(KMFolder* parent): KMMsgBase(parent)
+KMMessage::KMMessage(KMFolder* tqparent): KMMsgBase(tqparent)
{
init();
}
@@ -110,7 +110,7 @@ KMMessage::KMMessage(KMMsgInfo& msgInfo): KMMsgBase()
// now overwrite a few from the msgInfo
mMsgSize = msgInfo.msgSize();
mFolderOffset = msgInfo.folderOffset();
- mStatus = msgInfo.status();
+ mtqStatus = msgInfo.status();
mEncryptionState = msgInfo.encryptionState();
mSignatureState = msgInfo.signatureState();
mMDNSentState = msgInfo.mdnSentState();
@@ -145,7 +145,7 @@ void KMMessage::init( DwMessage* aMsg )
mMsgSize = 0;
mMsgLength = 0;
mFolderOffset = 0;
- mStatus = KMMsgStatusNew;
+ mtqStatus = KMMsgStatusNew;
mEncryptionState = KMMsgEncryptionStateUnknown;
mSignatureState = KMMsgSignatureStateUnknown;
mMDNSentState = KMMsgMDNStateUnknown;
@@ -173,7 +173,7 @@ void KMMessage::assign( const KMMessage& other )
mMsgSize = other.mMsgSize;
mMsgLength = other.mMsgLength;
mFolderOffset = other.mFolderOffset;
- mStatus = other.mStatus;
+ mtqStatus = other.mtqStatus;
mEncryptionState = other.mEncryptionState;
mSignatureState = other.mSignatureState;
mMDNSentState = other.mMDNSentState;
@@ -248,10 +248,10 @@ void KMMessage::setTransferInProgress(bool value, bool force)
MessageProperty::setTransferInProgress( getMsgSerNum(), value, force );
if ( !transferInProgress() && sPendingDeletes.tqcontains( this ) ) {
sPendingDeletes.remove( this );
- if ( parent() ) {
- int idx = parent()->find( this );
+ if ( tqparent() ) {
+ int idx = tqparent()->tqfind( this );
if ( idx > 0 ) {
- parent()->removeMsg( idx );
+ tqparent()->removeMsg( idx );
}
}
}
@@ -336,8 +336,8 @@ TQCString KMMessage::headerAsSendableString() const
}
void KMMessage::removePrivateHeaderFields() {
- removeHeaderField("Status");
- removeHeaderField("X-Status");
+ removeHeaderField("tqStatus");
+ removeHeaderField("X-tqStatus");
removeHeaderField("X-KMail-EncryptionState");
removeHeaderField("X-KMail-SignatureState");
removeHeaderField("X-KMail-MDN-Sent");
@@ -355,8 +355,8 @@ void KMMessage::seStatusFields()
{
char str[2] = { 0, 0 };
- setHeaderField("Status", status() & KMMsgStatusNew ? "R" : "RO");
- setHeaderField("X-Status", statusToStr(status()));
+ setHeaderField("tqStatus", status() & KMMsgStatusNew ? "R" : "RO");
+ setHeaderField("X-tqStatus", statusToStr(status()));
str[0] = (char)encryptionState();
setHeaderField("X-KMail-EncryptionState", str);
@@ -383,7 +383,7 @@ TQString KMMessage::headerAsString() const
DwHeaders& header = mMsg->Headers();
header.Assemble();
if ( header.AsString().empty() )
- return TQString::null;
+ return TQString();
return TQString::tqfromLatin1( header.AsString().c_str() );
}
@@ -394,23 +394,23 @@ DwMediaType& KMMessage::dwContentType()
return mMsg->Headers().ContentType();
}
-void KMMessage::fromByteArray( const TQByteArray & ba, bool seStatus ) {
- return fromDwString( DwString( ba.data(), ba.size() ), seStatus );
+void KMMessage::fromByteArray( const TQByteArray & ba, bool setqStatus ) {
+ return fromDwString( DwString( ba.data(), ba.size() ), setqStatus );
}
-void KMMessage::fromString( const TQCString & str, bool aSeStatus ) {
- return fromDwString( KMail::Util::dwString( str ), aSeStatus );
+void KMMessage::fromString( const TQCString & str, bool aSetqStatus ) {
+ return fromDwString( KMail::Util::dwString( str ), aSetqStatus );
}
-void KMMessage::fromDwString(const DwString& str, bool aSeStatus)
+void KMMessage::fromDwString(const DwString& str, bool aSetqStatus)
{
delete mMsg;
mMsg = new DwMessage;
mMsg->FromString( str );
mMsg->Parse();
- if (aSeStatus) {
- seStatus(headerField("Status").latin1(), headerField("X-Status").latin1());
+ if (aSetqStatus) {
+ setqStatus(headerField("tqStatus").latin1(), headerField("X-tqStatus").latin1());
setEncryptionStateChar( headerField("X-KMail-EncryptionState").at(0) );
setSignatureStateChar( headerField("X-KMail-SignatureState").at(0) );
setMDNSentState( static_cast<KMMsgMDNSentState>( headerField("X-KMail-MDN-Sent").at(0).latin1() ) );
@@ -541,7 +541,7 @@ static TQString splitLine( TQString &line)
if ( i == l )
{
TQString result = line.left(j);
- line = TQString::null;
+ line = TQString();
return result;
}
@@ -583,7 +583,7 @@ static TQString flowText(TQString &text, const TQString& indent, int maxLength)
if (i < (int) text.length())
text = text.mid(i);
else
- text = TQString::null;
+ text = TQString();
result += indent + line + '\n';
@@ -667,7 +667,7 @@ TQString KMMessage::smartQuote( const TQString & msg, int maxLineLength )
if ( line.isEmpty())
{
if (!firstPart)
- part.append(TQString::null);
+ part.append(TQString());
continue;
};
@@ -750,14 +750,14 @@ TQString KMMessage::asPlainTextFromObjectTree( partNode *root, bool aStripSignat
bool isHTML = false;
const TQTextCodec * codec = 0;
- if ( !root ) return TQString::null;
+ if ( !root ) return TQString();
parseTextStringFromDwPart( root, parsedString, codec, isHTML );
if ( mOverrideCodec || !codec )
codec = this->codec();
if ( parsedString.isEmpty() )
- return TQString::null;
+ return TQString();
bool clearSigned = false;
TQString result;
@@ -826,7 +826,7 @@ TQString KMMessage::asPlainText( bool aStripSignature, bool allowDecryption ) co
{
partNode *root = partNode::fromMessage( this );
if ( !root )
- return TQString::null;
+ return TQString();
ObjectTreeParser otp;
otp.parseObjectTree( root );
@@ -837,7 +837,7 @@ TQString KMMessage::asPlainText( bool aStripSignature, bool allowDecryption ) co
TQString KMMessage::asQuotedString( const TQString& aHeaderStr,
const TQString& aIndentStr,
- const TQString& selection /* = TQString::null */,
+ const TQString& selection /* = TQString() */,
bool aStripSignature /* = true */,
bool allowDecryption /* = true */) const
{
@@ -845,7 +845,7 @@ TQString KMMessage::asQuotedString( const TQString& aHeaderStr,
asPlainText( aStripSignature, allowDecryption ) : selection ;
// Remove blank lines at the beginning:
- const int firstNonWS = content.find( TQRegExp( "\\S" ) );
+ const int firstNonWS = content.tqfind( TQRegExp( "\\S" ) );
const int lineStart = content.findRev( '\n', firstNonWS );
if ( lineStart >= 0 )
content.remove( 0, static_cast<unsigned int>( lineStart ) );
@@ -864,10 +864,10 @@ TQString KMMessage::asQuotedString( const TQString& aHeaderStr,
//-----------------------------------------------------------------------------
KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
- TQString selection /* = TQString::null */,
+ TQString selection /* = TQString() */,
bool noQuote /* = false */,
bool allowDecryption /* = true */,
- const TQString &tmpl /* = TQString::null */ )
+ const TQString &tmpl /* = TQString() */ )
{
KMMessage* msg = new KMMessage;
TQString mailingListStr, replyToStr, toStr;
@@ -883,11 +883,11 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
msg->setCharset("utf-8");
// determine the mailing list posting address
- if ( parent() && parent()->isMailingListEnabled() &&
- !parent()->mailingListPostAddress().isEmpty() ) {
- mailingListAddresses << parent()->mailingListPostAddress();
+ if ( tqparent() && tqparent()->isMailingListEnabled() &&
+ !tqparent()->mailingListPostAddress().isEmpty() ) {
+ mailingListAddresses << tqparent()->mailingListPostAddress();
}
- if ( headerField("List-Post").find( "mailto:", 0, false ) != -1 ) {
+ if ( headerField("List-Post").tqfind( "mailto:", 0, false ) != -1 ) {
TQString listPost = headerField("List-Post");
TQRegExp rx( "<mailto:([^@>]+)@([^>]+)>", false );
if ( rx.search( listPost, 0 ) != -1 ) // matched
@@ -916,7 +916,7 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
// strip all my addresses from the list of recipients
TQStringList recipients = KPIM::splitEmailAddrList( toStr );
toStr = stripMyAddressesFromAddressList( recipients ).join(", ");
- // ... unless the list tqcontains only my addresses (reply to self)
+ // ... unless the list contains only my addresses (reply to self)
if ( toStr.isEmpty() && !recipients.isEmpty() )
toStr = recipients[0];
@@ -1081,11 +1081,11 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
parser.process( this );
}
}
- // seStatus(KMMsgStatusReplied);
+ // setqStatus(KMMsgStatusReplied);
msg->link(this, KMMsgStatusReplied);
- if ( parent() && parent()->putRepliesInSameFolder() )
- msg->setFcc( parent()->idString() );
+ if ( tqparent() && tqparent()->putRepliesInSameFolder() )
+ msg->setFcc( tqparent()->idString() );
// replies to an encrypted message should be encrypted as well
if ( encryptionState() == KMMsgPartiallyEncrypted ||
@@ -1108,8 +1108,8 @@ TQCString KMMessage::getRefStr() const
if (refStr.isEmpty())
return headerField("Message-Id").latin1();
- i = refStr.find('<');
- j = refStr.find('>');
+ i = refStr.tqfind('<');
+ j = refStr.tqfind('>');
firstRef = refStr.mid(i, j-i+1);
if (!firstRef.isEmpty())
retRefStr = firstRef + ' ';
@@ -1185,7 +1185,7 @@ TQCString KMMessage::createForwardBody()
if (sHeaderStrategy == HeaderStrategy::all()) {
s = "\n\n---------- " + sForwardStr + " ----------\n\n";
s += headerAsString();
- str = asQuotedString(s, "", TQString::null, false, false).utf8();
+ str = asQuotedString(s, "", TQString(), false, false).utf8();
str += "\n-------------------------------------------------------\n";
} else {
s = "\n\n---------- " + sForwardStr + " ----------\n\n";
@@ -1198,7 +1198,7 @@ TQCString KMMessage::createForwardBody()
s += "To: " + to() + "\n";
if (!cc().isEmpty()) s += "Cc: " + cc() + "\n";
s += "\n";
- str = asQuotedString(s, "", TQString::null, false, false).utf8();
+ str = asQuotedString(s, "", TQString(), false, false).utf8();
str += "\n-------------------------------------------------------\n";
}
@@ -1215,7 +1215,7 @@ void KMMessage::sanitizeHeaders( const TQStringList& whiteList )
while (field)
{
nextField = field->Next();
- if ( field->FieldNameStr().find( "ontent" ) == DwString::npos
+ if ( field->FieldNameStr().tqfind( "ontent" ) == DwString::npos
&& !whiteList.tqcontains( TQString::tqfromLatin1( field->FieldNameStr().c_str() ) ) )
header.RemoveField(field);
field = nextField;
@@ -1224,7 +1224,7 @@ void KMMessage::sanitizeHeaders( const TQStringList& whiteList )
}
//-----------------------------------------------------------------------------
-KMMessage* KMMessage::createForward( const TQString &tmpl /* = TQString::null */ )
+KMMessage* KMMessage::createForward( const TQString &tmpl /* = TQString() */ )
{
KMMessage* msg = new KMMessage();
@@ -1245,7 +1245,7 @@ KMMessage* KMMessage::createForward( const TQString &tmpl /* = TQString::null */
TQStringList blacklist = GlobalSettings::self()->mimetypesToStripWhenInlineForwarding();
for ( TQStringList::Iterator it = blacklist.begin(); it != blacklist.end(); ++it ) {
TQString entry = (*it);
- int sep = entry.find( '/' );
+ int sep = entry.tqfind( '/' );
TQCString type = entry.left( sep ).latin1();
TQCString subtype = entry.mid( sep+1 ).latin1();
kdDebug( 5006 ) << "Looking for blacklisted type: " << type << "/" << subtype << endl;
@@ -1276,7 +1276,7 @@ KMMessage* KMMessage::createForward( const TQString &tmpl /* = TQString::null */
msg->initFromMessage( this );
msg->removeHeaderField("Content-Type");
msg->removeHeaderField("Content-Transfer-Encoding");
- // Modify the ContentType directly (tqreplaces setAutomaticFields(true))
+ // Modify the ContentType directly (replaces setAutomaticFields(true))
DwHeaders & header = msg->mMsg->Headers();
header.MimeVersion().FromString("1.0");
DwMediaType & contentType = msg->dwContentType();
@@ -1328,32 +1328,32 @@ static const struct {
const char * text;
} mdnMessageBoxes[] = {
{ "mdnNormalAsk", true,
- I18N_NOOP("This message tqcontains a request to return a notification "
+ I18N_NOOP("This message contains a request to return a notification "
"about your reception of the message.\n"
"You can either ignore the request or let KMail send a "
"\"denied\" or normal response.") },
{ "mdnUnknownOption", false,
- I18N_NOOP("This message tqcontains a request to send a notification "
+ I18N_NOOP("This message contains a request to send a notification "
"about your reception of the message.\n"
- "It tqcontains a processing instruction that is marked as "
+ "It contains a processing instruction that is marked as "
"\"required\", but which is unknown to KMail.\n"
"You can either ignore the request or let KMail send a "
"\"failed\" response.") },
{ "mdnMultipleAddressesInReceiptTo", true,
- I18N_NOOP("This message tqcontains a request to send a notification "
+ I18N_NOOP("This message contains a request to send a notification "
"about your reception of the message,\n"
"but it is requested to send the notification to more "
"than one address.\n"
"You can either ignore the request or let KMail send a "
"\"denied\" or normal response.") },
{ "mdnReturnPathEmpty", true,
- I18N_NOOP("This message tqcontains a request to send a notification "
+ I18N_NOOP("This message contains a request to send a notification "
"about your reception of the message,\n"
"but there is no return-path set.\n"
"You can either ignore the request or let KMail send a "
"\"denied\" or normal response.") },
{ "mdnReturnPathNotInReceiptTo", true,
- I18N_NOOP("This message tqcontains a request to send a notification "
+ I18N_NOOP("This message contains a request to send a notification "
"about your reception of the message,\n"
"but the return-path address differs from the address "
"the notification was requested to be sent to.\n"
@@ -1473,7 +1473,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a,
// SHOULD be obtained (or no MDN sent) if there is no Return-Path
// header in the message [...]
AddrSpecList returnPathList = extractAddrSpecs("Return-Path");
- TQString returnPath = returnPathList.isEmpty() ? TQString::null
+ TQString returnPath = returnPathList.isEmpty() ? TQString()
: returnPathList.front().localPart + '@' + returnPathList.front().domain ;
kdDebug(5006) << "clean return path: " << returnPath << endl;
if ( returnPath.isEmpty() || !receiptTo.tqcontains( returnPath, false ) ) {
@@ -1523,7 +1523,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a,
receipt->initFromMessage( this );
receipt->removeHeaderField("Content-Type");
receipt->removeHeaderField("Content-Transfer-Encoding");
- // Modify the ContentType directly (tqreplaces setAutomaticFields(true))
+ // Modify the ContentType directly (replaces setAutomaticFields(true))
DwHeaders & header = receipt->mMsg->Headers();
header.MimeVersion().FromString("1.0");
DwMediaType & contentType = receipt->dwContentType();
@@ -1533,7 +1533,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a,
receipt->mNeedsAssembly = true;
receipt->setContentTypeParam( "report-type", "disposition-notification" );
- TQString description = tqreplaceHeadersInString( MDN::descriptionFor( d, m ) );
+ TQString description = replaceHeadersInString( MDN::descriptionFor( d, m ) );
// text/plain part:
KMMessagePart firstMsgPart;
@@ -1605,7 +1605,7 @@ KMMessage* KMMessage::createMDN( MDN::ActionMode a,
return receipt;
}
-TQString KMMessage::tqreplaceHeadersInString( const TQString & s ) const {
+TQString KMMessage::replaceHeadersInString( const TQString & s ) const {
TQString result = s;
TQRegExp rx( "\\$\\{([a-z0-9-]+)\\}", false );
Q_ASSERT( rx.isValid() );
@@ -1623,9 +1623,9 @@ TQString KMMessage::tqreplaceHeadersInString( const TQString & s ) const {
idx = 0;
while ( ( idx = rx.search( result, idx ) ) != -1 ) {
- TQString tqreplacement = headerField( rx.cap(1).latin1() );
- result.tqreplace( idx, rx.matchedLength(), tqreplacement );
- idx += tqreplacement.length();
+ TQString replacement = headerField( rx.cap(1).latin1() );
+ result.tqreplace( idx, rx.matchedLength(), replacement );
+ idx += replacement.length();
}
return result;
}
@@ -1693,17 +1693,17 @@ void KMMessage::applyIdentity( uint id )
setHeaderField( "X-KMail-Transport", ident.transport() );
if ( ident.fcc().isEmpty() )
- setFcc( TQString::null );
+ setFcc( TQString() );
else
setFcc( ident.fcc() );
if ( ident.drafts().isEmpty() )
- setDrafts( TQString::null );
+ setDrafts( TQString() );
else
setDrafts( ident.drafts() );
if ( ident.templates().isEmpty() )
- setTemplates( TQString::null );
+ setTemplates( TQString() );
else
setTemplates( ident.templates() );
@@ -1729,8 +1729,8 @@ uint KMMessage::identityUoid() const {
if ( !ok || id == 0 )
id = kmkernel->identityManager()->identityForAddress( to() + ", " + cc() ).uoid();
- if ( id == 0 && parent() )
- id = parent()->identity();
+ if ( id == 0 && tqparent() )
+ id = tqparent()->identity();
return id;
}
@@ -2039,7 +2039,7 @@ TQString KMMessage::sender() const {
if ( asl.empty() )
asl = extractAddrSpecs( "From" );
if ( asl.empty() )
- return TQString::null;
+ return TQString();
return asl.front().asString();
}
@@ -2081,7 +2081,7 @@ TQString KMMessage::replyToId() const
replyTo = headerField("In-Reply-To");
// search the end of the (first) message id in the In-Reply-To header
- rightAngle = replyTo.find( '>' );
+ rightAngle = replyTo.tqfind( '>' );
if (rightAngle != -1)
replyTo.truncate( rightAngle + 1 );
// now search the start of the message id
@@ -2094,14 +2094,14 @@ TQString KMMessage::replyToId() const
// misconfigured Mutt. They look like this <"from foo"@bar.baz>, i.e.
// they contain double quotes and spaces. We only check for '"'.
if (!replyTo.isEmpty() && (replyTo[0] == '<') &&
- ( -1 == replyTo.find( '"' ) ) )
+ ( -1 == replyTo.tqfind( '"' ) ) )
return replyTo;
references = headerField("References");
leftAngle = references.findRev( '<' );
if (leftAngle != -1)
references = references.mid( leftAngle );
- rightAngle = references.find( '>' );
+ rightAngle = references.tqfind( '>' );
if (rightAngle != -1)
references.truncate( rightAngle + 1 );
@@ -2137,16 +2137,16 @@ TQString KMMessage::references() const
if( !references.isEmpty() && references[0] == '<' )
return references;
else
- return TQString::null;
+ return TQString();
}
//-----------------------------------------------------------------------------
TQString KMMessage::replyToAuxIdMD5() const
{
TQString result = references();
- // references tqcontains two items, use the first one
+ // references contains two items, use the first one
// (the second to last reference)
- const int rightAngle = result.find( '>' );
+ const int rightAngle = result.tqfind( '>' );
if( rightAngle != -1 )
result.truncate( rightAngle + 1 );
@@ -2182,7 +2182,7 @@ TQString KMMessage::msgId() const
TQString msgId = headerField("Message-Id");
// search the end of the message id
- const int rightAngle = msgId.find( '>' );
+ const int rightAngle = msgId.tqfind( '>' );
if (rightAngle != -1)
msgId.truncate( rightAngle + 1 );
// now search the start of the message id
@@ -2287,10 +2287,10 @@ TQValueList<TQCString> KMMessage::rawHeaderFields( const TQCString& field ) cons
TQString KMMessage::headerField(const TQCString& aName) const
{
if ( aName.isEmpty() )
- return TQString::null;
+ return TQString();
if ( !mMsg->Headers().FindField( aName ) )
- return TQString::null;
+ return TQString();
return decodeRFC2047String( mMsg->Headers().FieldBody( aName.data() ).AsString().c_str(),
charset() );
@@ -2666,7 +2666,7 @@ TQValueList<int> KMMessage::determineAllowedCtes( const CharFreq& cf,
}
// In the following cases only QP and Base64 are allowed:
- // - the buffer will be OpenPGP/MIME signed and it tqcontains trailing
+ // - the buffer will be OpenPGP/MIME signed and it contains trailing
// whitespace (cf. RFC 3156)
// - a line starts with "From "
if ( ( willBeSigned && cf.hasTrailingWhitespace() ) ||
@@ -2819,7 +2819,7 @@ int KMMessage::numBodyParts() const
parts.append( part );
part = part->Body().FirstBodyPart();
}
- // this is where currPart->msgPart tqcontains a leaf message part
+ // this is where currPart->msgPart contains a leaf message part
count++;
// go up in the tree until reaching a node with next
// (or the last top-level node)
@@ -2871,7 +2871,7 @@ int KMMessage::partNumber( DwBodyPart * aDwBodyPart ) const
parts.append( curpart );
curpart = curpart->Body().FirstBodyPart();
}
- // this is where currPart->msgPart tqcontains a leaf message part
+ // this is where currPart->msgPart contains a leaf message part
if (curpart == aDwBodyPart)
idx = curIdx;
curIdx++;
@@ -2911,7 +2911,7 @@ DwBodyPart * KMMessage::dwBodyPart( int aIdx ) const
parts.append( curpart );
curpart = curpart->Body().FirstBodyPart();
}
- // this is where currPart->msgPart tqcontains a leaf message part
+ // this is where currPart->msgPart contains a leaf message part
if (curIdx==aIdx)
part = curpart;
curIdx++;
@@ -2949,7 +2949,7 @@ DwBodyPart * KMMessage::findDwBodyPart( int type, int subtype ) const
parts.append( curpart );
curpart = curpart->Body().FirstBodyPart();
}
- // this is where curPart->msgPart tqcontains a leaf message part
+ // this is where curPart->msgPart contains a leaf message part
// pending(khz): Find out WHY this look does not travel down *into* an
// embedded "Message/RfF822" message containing a "Multipart/Mixed"
@@ -2998,7 +2998,7 @@ DwBodyPart * KMMessage::findDwBodyPart( const TQCString& type, const TQCString&
parts.append( curpart );
curpart = curpart->Body().FirstBodyPart();
}
- // this is where curPart->msgPart tqcontains a leaf message part
+ // this is where curPart->msgPart contains a leaf message part
// pending(khz): Find out WHY this look does not travel down *into* an
// embedded "Message/RfF822" message containing a "Multipart/Mixed"
@@ -3183,10 +3183,10 @@ bool KMMessage::deleteBodyPart( int partIndex )
if ( !part.isComplete() )
return false;
- DwBody *parentNode = dynamic_cast<DwBody*>( dwpart->Parent() );
- if ( !parentNode )
+ DwBody *tqparentNode = dynamic_cast<DwBody*>( dwpart->Parent() );
+ if ( !tqparentNode )
return false;
- parentNode->RemoveBodyPart( dwpart );
+ tqparentNode->RemoveBodyPart( dwpart );
// add dummy part to show that a attachment has been deleted
KMMessagePart dummyPart;
@@ -3197,14 +3197,14 @@ bool KMMessage::deleteBodyPart( int partIndex )
dummyPart.setContentDescription( comment );
dummyPart.setBodyEncodedBinary( TQByteArray() );
TQCString cd = dummyPart.contentDisposition();
- if ( cd.find( "inline", 0, false ) == 0 ) {
+ if ( cd.tqfind( "inline", 0, false ) == 0 ) {
cd.tqreplace( 0, 10, "attachment" );
dummyPart.setContentDisposition( cd );
} else if ( cd.isEmpty() ) {
dummyPart.setContentDisposition( "attachment" );
}
DwBodyPart* newDwPart = createDWBodyPart( &dummyPart );
- parentNode->AddBodyPart( newDwPart );
+ tqparentNode->AddBodyPart( newDwPart );
getTopLevelPart()->Assemble();
return true;
}
@@ -3251,14 +3251,14 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart)
int iL, i1, i2, iM;
iL = additionalParam.length();
i1 = 0;
- i2 = additionalParam.find(';', i1, false);
+ i2 = additionalParam.tqfind(';', i1, false);
while ( i1 < iL )
{
if( -1 == i2 )
i2 = iL;
if( i1+1 < i2 ) {
parAV = additionalParam.mid( i1, (i2-i1) );
- iM = parAV.find('=');
+ iM = parAV.tqfind('=');
if( -1 < iM )
{
parA = parAV.left( iM );
@@ -3281,7 +3281,7 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart)
ct.AddParameter( param );
}
i1 = i2+1;
- i2 = additionalParam.find(';', i1, false);
+ i2 = additionalParam.tqfind(';', i1, false);
}
}
@@ -3639,7 +3639,7 @@ TQString KMMessage::stripEmailAddr( const TQString& aStr )
//kdDebug(5006) << "KMMessage::stripEmailAddr( " << aStr << " )" << endl;
if ( aStr.isEmpty() )
- return TQString::null;
+ return TQString();
TQString result;
@@ -3710,9 +3710,9 @@ TQString KMMessage::stripEmailAddr( const TQString& aStr )
else if ( !angleAddress.isEmpty() ) {
result += angleAddress;
}
- name = TQString::null;
- comment = TQString::null;
- angleAddress = TQString::null;
+ name = TQString();
+ comment = TQString();
+ angleAddress = TQString();
}
else
name += ch;
@@ -3975,7 +3975,7 @@ TQString KMMessage::expandAliases( const TQString& recipients )
// check whether the address is missing the domain part
// FIXME: looking for '@' might be wrong
- if ( receiver.find('@') == -1 ) {
+ if ( receiver.tqfind('@') == -1 ) {
KConfigGroup general( KMKernel::config(), "General" );
TQString defaultdomain = general.readEntry( "Default domain" );
if( !defaultdomain.isEmpty() ) {
@@ -4014,7 +4014,7 @@ TQString KMMessage::guessEmailAddressFromLoginName( const TQString& loginName )
const KUser user( loginName );
if ( user.isValid() ) {
TQString fullName = user.fullName();
- if ( fullName.find( TQRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 )
+ if ( fullName.tqfind( TQRegExp( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ) ) != -1 )
address = '"' + fullName.tqreplace( '\\', "\\" ).tqreplace( '"', "\\" )
+ "\" <" + address + '>';
else
@@ -4145,11 +4145,11 @@ void KMMessage::setCharset( const TQCString &charset, DwEntity *entity )
//-----------------------------------------------------------------------------
-void KMMessage::seStatus(const KMMsgStatus aStatus, int idx)
+void KMMessage::setqStatus(const KMMsgtqStatus atqStatus, int idx)
{
- if (mStatus == aStatus)
+ if (mtqStatus == atqStatus)
return;
- KMMsgBase::seStatus(aStatus, idx);
+ KMMsgBase::setqStatus(atqStatus, idx);
}
void KMMessage::setEncryptionState(const KMMsgEncryptionState s, int idx)
@@ -4182,11 +4182,11 @@ void KMMessage::setMDNSentState( KMMsgMDNSentState status, int idx )
}
//-----------------------------------------------------------------------------
-void KMMessage::link( const KMMessage *aMsg, KMMsgStatus aStatus )
+void KMMessage::link( const KMMessage *aMsg, KMMsgtqStatus atqStatus )
{
- Q_ASSERT( aStatus == KMMsgStatusReplied
- || aStatus == KMMsgStatusForwarded
- || aStatus == KMMsgStatusDeleted );
+ Q_ASSERT( atqStatus == KMMsgStatusReplied
+ || atqStatus == KMMsgStatusForwarded
+ || atqStatus == KMMsgStatusDeleted );
TQString message = headerField( "X-KMail-Link-Message" );
if ( !message.isEmpty() )
@@ -4196,11 +4196,11 @@ void KMMessage::link( const KMMessage *aMsg, KMMsgStatus aStatus )
type += ',';
message += TQString::number( aMsg->getMsgSerNum() );
- if ( aStatus == KMMsgStatusReplied )
+ if ( atqStatus == KMMsgStatusReplied )
type += "reply";
- else if ( aStatus == KMMsgStatusForwarded )
+ else if ( atqStatus == KMMsgStatusForwarded )
type += "forward";
- else if ( aStatus == KMMsgStatusDeleted )
+ else if ( atqStatus == KMMsgStatusDeleted )
type += "deleted";
setHeaderField( "X-KMail-Link-Message", message );
@@ -4208,10 +4208,10 @@ void KMMessage::link( const KMMessage *aMsg, KMMsgStatus aStatus )
}
//-----------------------------------------------------------------------------
-void KMMessage::getLink(int n, ulong *retMsgSerNum, KMMsgStatus *reStatus) const
+void KMMessage::getLink(int n, ulong *retMsgSerNum, KMMsgtqStatus *retqStatus) const
{
*retMsgSerNum = 0;
- *reStatus = KMMsgStatusUnknown;
+ *retqStatus = KMMsgStatusUnknown;
TQString message = headerField("X-KMail-Link-Message");
TQString type = headerField("X-KMail-Link-Type");
@@ -4221,11 +4221,11 @@ void KMMessage::getLink(int n, ulong *retMsgSerNum, KMMsgStatus *reStatus) const
if ( !message.isEmpty() && !type.isEmpty() ) {
*retMsgSerNum = message.toULong();
if ( type == "reply" )
- *reStatus = KMMsgStatusReplied;
+ *retqStatus = KMMsgStatusReplied;
else if ( type == "forward" )
- *reStatus = KMMsgStatusForwarded;
+ *retqStatus = KMMsgStatusForwarded;
else if ( type == "deleted" )
- *reStatus = KMMsgStatusDeleted;
+ *retqStatus = KMMsgStatusDeleted;
}
}
@@ -4275,7 +4275,7 @@ void KMMessage::updateBodyPart(const TQString partSpecifier, const TQByteArray &
TQString specifier = partSpecifier;
if ( partSpecifier.endsWith(".HEADER") ||
partSpecifier.endsWith(".MIME") ) {
- // get the parent bodypart
+ // get the tqparent bodypart
specifier = partSpecifier.section( '.', 0, -2 );
}
@@ -4292,7 +4292,7 @@ void KMMessage::updateBodyPart(const TQString partSpecifier, const TQByteArray &
{
// update headers
// get rid of EOL
- content.resize( QMAX( content.length(), 2 ) - 2 );
+ content.resize( TQMAX( content.length(), 2 ) - 2 );
// we have to delete the fields first as they might have been created by
// an earlier call to DwHeaders::FieldBody
mLastUpdated->Headers().DeleteAllFields();
@@ -4306,19 +4306,19 @@ void KMMessage::updateBodyPart(const TQString partSpecifier, const TQByteArray &
} else {
// update body
mLastUpdated->Body().FromString( content );
- TQString parentSpec = partSpecifier.section( '.', 0, -2 );
- if ( !parentSpec.isEmpty() )
+ TQString tqparentSpec = partSpecifier.section( '.', 0, -2 );
+ if ( !tqparentSpec.isEmpty() )
{
- DwBodyPart* parent = findDwBodyPart( getFirstDwBodyPart(), parentSpec );
- if ( parent && parent->hasHeaders() && parent->Headers().HasContentType() )
+ DwBodyPart* tqparent = findDwBodyPart( getFirstDwBodyPart(), tqparentSpec );
+ if ( tqparent && tqparent->hasHeaders() && tqparent->Headers().HasContentType() )
{
- const DwMediaType& contentType = parent->Headers().ContentType();
+ const DwMediaType& contentType = tqparent->Headers().ContentType();
if ( contentType.Type() == DwMime::kTypeMessage &&
contentType.Subtype() == DwMime::kSubtypeRfc822 )
{
// an embedded message that is not multipart
// update this directly
- parent->Body().Message()->Body().FromString( content );
+ tqparent->Body().Message()->Body().FromString( content );
}
}
}
@@ -4347,11 +4347,11 @@ void KMMessage::updateInvitationState()
cntType += '/';
cntType += mMsg->Headers().ContentType().SubtypeStr().c_str();
if ( cntType.lower() == "text/calendar" ) {
- seStatus( KMMsgStatusHasInvitation );
+ setqStatus( KMMsgStatusHasInvitation );
return;
}
}
- seStatus( KMMsgStatusHasNoInvitation );
+ setqStatus( KMMsgStatusHasNoInvitation );
return;
}
@@ -4364,7 +4364,7 @@ void KMMessage::updateAttachmentState( DwBodyPart* part )
if ( !part )
{
// kdDebug(5006) << "updateAttachmentState - no part!" << endl;
- seStatus( KMMsgStatusHasNoAttach );
+ setqStatus( KMMsgStatusHasNoAttach );
return;
}
@@ -4404,7 +4404,7 @@ void KMMessage::updateAttachmentState( DwBodyPart* part )
part->Headers().ContentType().Subtype() != DwMime::kSubtypePgpSignature &&
part->Headers().ContentType().Subtype() != DwMime::kSubtypePkcs7Signature ) )
{
- seStatus( KMMsgStatusHasAttach );
+ setqStatus( KMMsgStatusHasAttach );
}
return;
}
@@ -4429,7 +4429,7 @@ void KMMessage::updateAttachmentState( DwBodyPart* part )
if ( part->Next() )
updateAttachmentState( part->Next() );
else if ( attachmentState() == KMMsgAttachmentUnknown )
- seStatus( KMMsgStatusHasNoAttach );
+ setqStatus( KMMsgStatusHasNoAttach );
}
void KMMessage::setBodyFromUnicode( const TQString &str, DwEntity *entity )