summaryrefslogtreecommitdiffstats
path: root/kmail/kmmessage.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
commit3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch)
tree89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /kmail/kmmessage.cpp
parent1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff)
downloadtdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz
tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip
Rename a number of old tq methods that are no longer tq specific
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 1e666701..aeb4beb4 100644
--- a/kmail/kmmessage.cpp
+++ b/kmail/kmmessage.cpp
@@ -44,7 +44,7 @@ using KMail::HeaderStrategy;
#include <kasciistricmp.h>
#include <tqcursor.h>
-#include <tqtextcodec.h>
+#include <textcodec.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();
- mtqStatus = msgInfo.status();
+ mStatus = 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;
- mtqStatus = KMMsgStatusNew;
+ mStatus = 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;
- mtqStatus = other.mtqStatus;
+ mStatus = other.mStatus;
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::tqfromLatin1( header.AsString().c_str() );
+ return TQString::fromLatin1( header.AsString().c_str() );
}
@@ -394,26 +394,26 @@ DwMediaType& KMMessage::dwContentType()
return mMsg->Headers().ContentType();
}
-void KMMessage::fromByteArray( const TQByteArray & ba, bool setqStatus ) {
- return fromDwString( DwString( ba.data(), ba.size() ), setqStatus );
+void KMMessage::fromByteArray( const TQByteArray & ba, bool seStatus ) {
+ return fromDwString( DwString( ba.data(), ba.size() ), seStatus );
}
-void KMMessage::fromString( const TQCString & str, bool aSetqStatus ) {
- return fromDwString( KMail::Util::dwString( str ), aSetqStatus );
+void KMMessage::fromString( const TQCString & str, bool aSeStatus ) {
+ return fromDwString( KMail::Util::dwString( str ), aSeStatus );
}
-void KMMessage::fromDwString(const DwString& str, bool aSetqStatus)
+void KMMessage::fromDwString(const DwString& str, bool aSeStatus)
{
delete mMsg;
mMsg = new DwMessage;
mMsg->FromString( str );
mMsg->Parse();
- if (aSetqStatus) {
- setqStatus(headerField("Status").latin1(), headerField("X-Status").latin1());
+ if (aSeStatus) {
+ seStatus(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").tqat(0).latin1() ) );
+ setMDNSentState( static_cast<KMMsgMDNSentState>( headerField("X-KMail-MDN-Sent").at(0).latin1() ) );
}
if ( invitationState() == KMMsgInvitationUnknown && readyToShow() )
updateInvitationState();
@@ -1081,7 +1081,7 @@ KMMessage* KMMessage::createReply( KMail::ReplyStrategy replyStrategy,
parser.process( this );
}
}
- // setqStatus(KMMsgStatusReplied);
+ // seStatus(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>)")
- .tqarg( from() )
- .tqarg( ident.fullName() )
- .tqarg( ident.primaryEmailAddress() );
+ .arg( from() )
+ .arg( ident.fullName() )
+ .arg( ident.primaryEmailAddress() );
// Resent-From: content
TQString strFrom = TQString("%1 <%2>")
- .tqarg( ident.fullName() )
- .tqarg( ident.primaryEmailAddress() );
+ .arg( ident.fullName() )
+ .arg( 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::tqfromLatin1( field->FieldNameStr().c_str() ) ) )
+ && !whiteList.contains( TQString::fromLatin1( 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").tqarg( aIdx ) );
+ aPart->setName( i18n("Attachment: %1").arg( 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." ).tqarg( part.fileName() );
+ comment = i18n( "The attachment '%1' has been deleted." ).arg( 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::tqcurrentDateTime();
+ TQDateTime datetime = TQDateTime::currentDateTime();
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::tqfromLatin1( KMMsgBase::encodeRFC2047String( str,
+ result = TQString::fromLatin1( 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").tqarg(languageNr));
+ KConfigGroupSaver saver(config, TQString("KMMessage #%1").arg(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::setqStatus(const KMMsgtqStatus atqStatus, int idx)
+void KMMessage::seStatus(const KMMsgStatus aStatus, int idx)
{
- if (mtqStatus == atqStatus)
+ if (mStatus == aStatus)
return;
- KMMsgBase::setqStatus(atqStatus, idx);
+ KMMsgBase::seStatus(aStatus, 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, KMMsgtqStatus atqStatus )
+void KMMessage::link( const KMMessage *aMsg, KMMsgStatus aStatus )
{
- Q_ASSERT( atqStatus == KMMsgStatusReplied
- || atqStatus == KMMsgStatusForwarded
- || atqStatus == KMMsgStatusDeleted );
+ Q_ASSERT( aStatus == KMMsgStatusReplied
+ || aStatus == KMMsgStatusForwarded
+ || aStatus == KMMsgStatusDeleted );
TQString message = headerField( "X-KMail-Link-Message" );
if ( !message.isEmpty() )
@@ -4196,11 +4196,11 @@ void KMMessage::link( const KMMessage *aMsg, KMMsgtqStatus atqStatus )
type += ',';
message += TQString::number( aMsg->getMsgSerNum() );
- if ( atqStatus == KMMsgStatusReplied )
+ if ( aStatus == KMMsgStatusReplied )
type += "reply";
- else if ( atqStatus == KMMsgStatusForwarded )
+ else if ( aStatus == KMMsgStatusForwarded )
type += "forward";
- else if ( atqStatus == KMMsgStatusDeleted )
+ else if ( aStatus == KMMsgStatusDeleted )
type += "deleted";
setHeaderField( "X-KMail-Link-Message", message );
@@ -4208,10 +4208,10 @@ void KMMessage::link( const KMMessage *aMsg, KMMsgtqStatus atqStatus )
}
//-----------------------------------------------------------------------------
-void KMMessage::getLink(int n, ulong *retMsgSerNum, KMMsgtqStatus *retqStatus) const
+void KMMessage::getLink(int n, ulong *retMsgSerNum, KMMsgStatus *reStatus) const
{
*retMsgSerNum = 0;
- *retqStatus = KMMsgStatusUnknown;
+ *reStatus = 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, KMMsgtqStatus *retqStatus) c
if ( !message.isEmpty() && !type.isEmpty() ) {
*retMsgSerNum = message.toULong();
if ( type == "reply" )
- *retqStatus = KMMsgStatusReplied;
+ *reStatus = KMMsgStatusReplied;
else if ( type == "forward" )
- *retqStatus = KMMsgStatusForwarded;
+ *reStatus = KMMsgStatusForwarded;
else if ( type == "deleted" )
- *retqStatus = KMMsgStatusDeleted;
+ *reStatus = KMMsgStatusDeleted;
}
}
@@ -4347,11 +4347,11 @@ void KMMessage::updateInvitationState()
cntType += '/';
cntType += mMsg->Headers().ContentType().SubtypeStr().c_str();
if ( cntType.lower() == "text/calendar" ) {
- setqStatus( KMMsgStatusHasInvitation );
+ seStatus( KMMsgStatusHasInvitation );
return;
}
}
- setqStatus( KMMsgStatusHasNoInvitation );
+ seStatus( KMMsgStatusHasNoInvitation );
return;
}
@@ -4364,7 +4364,7 @@ void KMMessage::updateAttachmentState( DwBodyPart* part )
if ( !part )
{
// kdDebug(5006) << "updateAttachmentState - no part!" << endl;
- setqStatus( KMMsgStatusHasNoAttach );
+ seStatus( KMMsgStatusHasNoAttach );
return;
}
@@ -4404,7 +4404,7 @@ void KMMessage::updateAttachmentState( DwBodyPart* part )
part->Headers().ContentType().Subtype() != DwMime::kSubtypePgpSignature &&
part->Headers().ContentType().Subtype() != DwMime::kSubtypePkcs7Signature ) )
{
- setqStatus( KMMsgStatusHasAttach );
+ seStatus( KMMsgStatusHasAttach );
}
return;
}
@@ -4429,7 +4429,7 @@ void KMMessage::updateAttachmentState( DwBodyPart* part )
if ( part->Next() )
updateAttachmentState( part->Next() );
else if ( attachmentState() == KMMsgAttachmentUnknown )
- setqStatus( KMMsgStatusHasNoAttach );
+ seStatus( KMMsgStatusHasNoAttach );
}
void KMMessage::setBodyFromUnicode( const TQString &str, DwEntity *entity )