summaryrefslogtreecommitdiffstats
path: root/kmail/kmmessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmmessage.cpp')
-rw-r--r--kmail/kmmessage.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/kmail/kmmessage.cpp b/kmail/kmmessage.cpp
index aeb4beb46..1e666701d 100644
--- a/kmail/kmmessage.cpp
+++ b/kmail/kmmessage.cpp
@@ -44,7 +44,7 @@ using KMail::HeaderStrategy;
#include <kasciistricmp.h>
#include <tqcursor.h>
-#include <textcodec.h>
+#include <tqtextcodec.h>
#include <tqmessagebox.h>
#include <kmime_util.h>
#include <kmime_charfreq.h>
@@ -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;
@@ -384,7 +384,7 @@ TQString KMMessage::headerAsString() const
header.Assemble();
if ( header.AsString().empty() )
return TQString();
- return TQString::fromLatin1( header.AsString().c_str() );
+ return TQString::tqfromLatin1( header.AsString().c_str() );
}
@@ -394,26 +394,26 @@ 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("Status").latin1(), headerField("X-Status").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() ) );
+ setMDNSentState( static_cast<KMMsgMDNSentState>( headerField("X-KMail-MDN-Sent").tqat(0).latin1() ) );
}
if ( invitationState() == KMMsgInvitationUnknown && readyToShow() )
updateInvitationState();
@@ -1081,7 +1081,7 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
parser.process( this );
}
}
- // seStatus(KMMsgStatusReplied);
+ // setqStatus(KMMsgStatusReplied);
msg->link(this, KMMsgStatusReplied);
if ( parent() && parent()->putRepliesInSameFolder() )
@@ -1141,14 +1141,14 @@ KMMessage* KMMessage::createRedirect( const TQString &toStr )
// X-KMail-Redirect-From: content
TQString strByWayOf = TQString("%1 (by way of %2 <%3>)")
- .arg( from() )
- .arg( ident.fullName() )
- .arg( ident.primaryEmailAddress() );
+ .tqarg( from() )
+ .tqarg( ident.fullName() )
+ .tqarg( ident.primaryEmailAddress() );
// Resent-From: content
TQString strFrom = TQString("%1 <%2>")
- .arg( ident.fullName() )
- .arg( ident.primaryEmailAddress() );
+ .tqarg( ident.fullName() )
+ .tqarg( ident.primaryEmailAddress() );
// format the current date to be used in Resent-Date:
TQString origDate = msg->headerField( "Date" );
@@ -1216,7 +1216,7 @@ void KMMessage::sanitizeHeaders( const TQStringList& whiteList )
{
nextField = field->Next();
if ( field->FieldNameStr().find( "ontent" ) == DwString::npos
- && !whiteList.contains( TQString::fromLatin1( field->FieldNameStr().c_str() ) ) )
+ && !whiteList.contains( TQString::tqfromLatin1( field->FieldNameStr().c_str() ) ) )
header.RemoveField(field);
field = nextField;
}
@@ -3160,7 +3160,7 @@ void KMMessage::bodyPart(int aIdx, KMMessagePart* aPart) const
if ( DwBodyPart *part = dwBodyPart( aIdx ) ) {
KMMessage::bodyPart(part, aPart);
if( aPart->name().isEmpty() )
- aPart->setName( i18n("Attachment: %1").arg( aIdx ) );
+ aPart->setName( i18n("Attachment: %1").tqarg( aIdx ) );
}
}
@@ -3193,7 +3193,7 @@ bool KMMessage::deleteBodyPart( int partIndex )
dummyPart.duplicate( part );
TQString comment = i18n("This attachment has been deleted.");
if ( !part.fileName().isEmpty() )
- comment = i18n( "The attachment '%1' has been deleted." ).arg( part.fileName() );
+ comment = i18n( "The attachment '%1' has been deleted." ).tqarg( part.fileName() );
dummyPart.setContentDescription( comment );
dummyPart.setBodyEncodedBinary( TQByteArray() );
TQCString cd = dummyPart.contentDisposition();
@@ -3358,7 +3358,7 @@ void KMMessage::addBodyPart(const KMMessagePart* aPart)
//-----------------------------------------------------------------------------
TQString KMMessage::generateMessageId( const TQString& addr )
{
- TQDateTime datetime = TQDateTime::currentDateTime();
+ TQDateTime datetime = TQDateTime::tqcurrentDateTime();
TQString msgIdStr;
msgIdStr = '<' + datetime.toString( "yyyyMMddhhmm.sszzz" );
@@ -3457,7 +3457,7 @@ TQCString KMMessage::html2source( const TQCString & src )
TQString KMMessage::encodeMailtoUrl( const TQString& str )
{
TQString result;
- result = TQString::fromLatin1( KMMsgBase::encodeRFC2047String( str,
+ result = TQString::tqfromLatin1( KMMsgBase::encodeRFC2047String( str,
"utf-8" ) );
result = KURL::encode_string( result );
return result;
@@ -4037,7 +4037,7 @@ void KMMessage::readConfig()
int languageNr = config->readNumEntry("reply-current-language",0);
{ // area for config group "KMMessage #n"
- KConfigGroupSaver saver(config, TQString("KMMessage #%1").arg(languageNr));
+ KConfigGroupSaver saver(config, TQString("KMMessage #%1").tqarg(languageNr));
sReplyLanguage = config->readEntry("language",KGlobal::locale()->language());
sReplyStr = config->readEntry("phrase-reply",
i18n("On %D, you wrote:"));
@@ -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;
}
}
@@ -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 )