summaryrefslogtreecommitdiffstats
path: root/kmail/kmmessage.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-14 20:16:30 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-14 20:16:30 +0000
commit1c93fca14d9ce37499bcfdf994c660186a0b6f17 (patch)
treef2defe163a805a9e34a2142dfde4cdb5e49241e7 /kmail/kmmessage.cpp
parent67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (diff)
downloadtdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.tar.gz
tdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.zip
Enable kdepim compilation under Qt4
This will likely break Qt3 compilation temporarily, which is an unintended side effect. A third and final kdepim commit will repair Qt3 compilation shortly. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmmessage.cpp')
-rw-r--r--kmail/kmmessage.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kmail/kmmessage.cpp b/kmail/kmmessage.cpp
index 6501c9e5..04af3d65 100644
--- a/kmail/kmmessage.cpp
+++ b/kmail/kmmessage.cpp
@@ -201,7 +201,7 @@ KMMessage::~KMMessage()
//-----------------------------------------------------------------------------
void KMMessage::setReferences(const TQCString& aStr)
{
- if (!aStr) return;
+ if (aStr.isNull()) return;
mMsg->Headers().References().FromString(aStr);
mNeedsAssembly = true;
}
@@ -413,7 +413,7 @@ void KMMessage::fromDwString(const DwString& str, bool 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() ) );
+ setMDNSentState( static_cast<KMMsgMDNSentState>( headerField("X-KMail-MDN-Sent").tqat(0).latin1() ) );
}
if ( invitationState() == KMMsgInvitationUnknown && readyToShow() )
updateInvitationState();
@@ -641,9 +641,9 @@ static bool flushPart(TQString &msg, TQStringList &part,
static TQString stripSignature( const TQString & msg, bool clearSigned ) {
if ( clearSigned )
- return msg.left( msg.findRev( TQRegExp( "\n--\\s?\n" ) ) );
+ return msg.left( msg.tqfindRev( TQRegExp( "\n--\\s?\n" ) ) );
else
- return msg.left( msg.findRev( "\n-- \n" ) );
+ return msg.left( msg.tqfindRev( "\n-- \n" ) );
}
TQString KMMessage::smartQuote( const TQString & msg, int maxLineLength )
@@ -846,7 +846,7 @@ TQString KMMessage::asQuotedString( const TQString& aHeaderStr,
// Remove blank lines at the beginning:
const int firstNonWS = content.tqfind( TQRegExp( "\\S" ) );
- const int lineStart = content.findRev( '\n', firstNonWS );
+ const int lineStart = content.tqfindRev( '\n', firstNonWS );
if ( lineStart >= 0 )
content.remove( 0, static_cast<unsigned int>( lineStart ) );
@@ -1114,8 +1114,8 @@ TQCString KMMessage::getRefStr() const
if (!firstRef.isEmpty())
retRefStr = firstRef + ' ';
- i = refStr.findRev('<');
- j = refStr.findRev('>');
+ i = refStr.tqfindRev('<');
+ j = refStr.tqfindRev('>');
lastRef = refStr.mid(i, j-i+1);
if (!lastRef.isEmpty() && lastRef != firstRef)
@@ -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" );
@@ -1623,7 +1623,7 @@ TQString KMMessage::replaceHeadersInString( const TQString & s ) const {
idx = 0;
while ( ( idx = rx.search( result, idx ) ) != -1 ) {
- TQString replacement = headerField( rx.cap(1).latin1() );
+ TQString replacement = headerField( TQString(rx.cap(1)).latin1() );
result.tqreplace( idx, rx.matchedLength(), replacement );
idx += replacement.length();
}
@@ -2085,7 +2085,7 @@ TQString KMMessage::replyToId() const
if (rightAngle != -1)
replyTo.truncate( rightAngle + 1 );
// now search the start of the message id
- leftAngle = replyTo.findRev( '<' );
+ leftAngle = replyTo.tqfindRev( '<' );
if (leftAngle != -1)
replyTo = replyTo.mid( leftAngle );
@@ -2098,7 +2098,7 @@ TQString KMMessage::replyToId() const
return replyTo;
references = headerField("References");
- leftAngle = references.findRev( '<' );
+ leftAngle = references.tqfindRev( '<' );
if (leftAngle != -1)
references = references.mid( leftAngle );
rightAngle = references.tqfind( '>' );
@@ -2126,11 +2126,11 @@ TQString KMMessage::references() const
TQString references = headerField( "References" );
// keep the last two entries for threading
- leftAngle = references.findRev( '<' );
- leftAngle = references.findRev( '<', leftAngle - 1 );
+ leftAngle = references.tqfindRev( '<' );
+ leftAngle = references.tqfindRev( '<', leftAngle - 1 );
if( leftAngle != -1 )
references = references.mid( leftAngle );
- rightAngle = references.findRev( '>' );
+ rightAngle = references.tqfindRev( '>' );
if( rightAngle != -1 )
references.truncate( rightAngle + 1 );
@@ -2186,7 +2186,7 @@ TQString KMMessage::msgId() const
if (rightAngle != -1)
msgId.truncate( rightAngle + 1 );
// now search the start of the message id
- const int leftAngle = msgId.findRev( '<' );
+ const int leftAngle = msgId.tqfindRev( '<' );
if (leftAngle != -1)
msgId = msgId.mid( leftAngle );
return msgId;
@@ -2367,11 +2367,11 @@ void KMMessage::setHeaderField( const TQCString& aName, const TQString& bValue,
kdDebug(5006) << "aValue: \"" << aValue << "\"" << endl;
#endif
}
- str = aName;
+ str = TQString(aName);
if (str[str.length()-1] != ':') str += ": ";
else str += ' ';
if ( !aValue.isEmpty() )
- str += aValue;
+ str += TQString(aValue);
if (str[str.length()-1] != '\n') str += '\n';
field = new DwField(str, mMsg);
@@ -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();
@@ -3261,8 +3261,8 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart)
iM = parAV.tqfind('=');
if( -1 < iM )
{
- parA = parAV.left( iM );
- parV = parAV.right( parAV.length() - iM - 1 );
+ parA = TQString(parAV.left( iM ));
+ parV = TQString(parAV.right( parAV.length() - iM - 1 ));
if( ('"' == parV.at(0)) && ('"' == parV.at(parV.length()-1)) )
{
parV.erase( 0, 1);
@@ -3271,7 +3271,7 @@ DwBodyPart* KMMessage::createDWBodyPart(const KMMessagePart* aPart)
}
else
{
- parA = parAV;
+ parA = TQString(parAV);
parV = "";
}
DwParameter *param;
@@ -3495,7 +3495,7 @@ TQCString KMMessage::stripEmailAddr( const TQCString& aStr )
bool inQuotedString = false;
int commentLevel = 0;
- for ( char* p = aStr.data(); *p; ++p ) {
+ for ( const char* p = aStr.data(); *p; ++p ) {
switch ( context ) {
case TopLevel : {
switch ( *p ) {
@@ -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:"));