summaryrefslogtreecommitdiffstats
path: root/kmail/objecttreeparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/objecttreeparser.cpp')
-rw-r--r--kmail/objecttreeparser.cpp114
1 files changed, 57 insertions, 57 deletions
diff --git a/kmail/objecttreeparser.cpp b/kmail/objecttreeparser.cpp
index 80c182d98..2cb44ab9b 100644
--- a/kmail/objecttreeparser.cpp
+++ b/kmail/objecttreeparser.cpp
@@ -272,7 +272,7 @@ namespace KMail {
ProcessResult processResult;
if ( mReader ) {
- htmlWriter()->queue( TQString::tqfromLatin1("<a name=\"att%1\"/>").arg( node->nodeId() ) );
+ htmlWriter()->queue( TQString::tqfromLatin1("<a name=\"att%1\"/>").tqarg( node->nodeId() ) );
}
if ( const Interface::BodyPartFormatter * formatter
@@ -686,11 +686,11 @@ namespace KMail {
switch ( cryptPlugError ) {
case NOT_INITIALIZED:
errorMsg = i18n( "Crypto plug-in \"%1\" is not initialized." )
- .arg( cryptPlugLibName );
+ .tqarg( cryptPlugLibName );
break;
case CANT_VERIFY_SIGNATURES:
errorMsg = i18n( "Crypto plug-in \"%1\" cannot verify signatures." )
- .arg( cryptPlugLibName );
+ .tqarg( cryptPlugLibName );
break;
case NO_PLUGIN:
if ( cryptPlugDisplayName.isEmpty() )
@@ -698,14 +698,14 @@ namespace KMail {
else
errorMsg = i18n( "%1 is either 'OpenPGP' or 'S/MIME'",
"No %1 plug-in was found." )
- .arg( cryptPlugDisplayName );
+ .tqarg( cryptPlugDisplayName );
break;
}
messagePart.errorText = i18n( "The message is signed, but the "
"validity of the signature cannot be "
"verified.<br />"
"Reason: %1" )
- .arg( errorMsg );
+ .tqarg( errorMsg );
}
if ( mReader )
@@ -887,9 +887,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
+ "</div>";
if ( !passphraseError )
aErrorText = i18n("Crypto plug-in \"%1\" could not decrypt the data.")
- .arg( cryptPlugLibName )
+ .tqarg( cryptPlugLibName )
+ "<br />"
- + i18n("Error: %1").arg( aErrorText );
+ + i18n("Error: %1").tqarg( aErrorText );
}
}
}
@@ -901,11 +901,11 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
switch ( cryptPlugError ) {
case NOT_INITIALIZED:
aErrorText = i18n( "Crypto plug-in \"%1\" is not initialized." )
- .arg( cryptPlugLibName );
+ .tqarg( cryptPlugLibName );
break;
case CANT_DECRYPT:
aErrorText = i18n( "Crypto plug-in \"%1\" cannot decrypt messages." )
- .arg( cryptPlugLibName );
+ .tqarg( cryptPlugLibName );
break;
case NO_PLUGIN:
aErrorText = i18n( "No appropriate crypto plug-in was found." );
@@ -944,7 +944,7 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
while ( httpPos >= 0 ) {
// look backwards for "href"
if ( httpPos > 5 ) {
- int hrefPos = str.findRev( "href", httpPos - 5, true );
+ int hrefPos = str.tqfindRev( "href", httpPos - 5, true );
// if no 'href' is found or the distance between 'href' and '"http[s]:'
// is larger than 7 (7 is the distance in 'href = "http[s]:') then
// we assume that we have found an external reference
@@ -979,12 +979,12 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
// We must fo this, or else we will see only 1st inlined html
// attachment. It is IMHO enough to search only for </BODY> and
// put \0 there.
- int i = cstr.findRev("</body>", -1, false); //case insensitive
+ int i = cstr.tqfindRev("</body>", -1, false); //case insensitive
if ( 0 <= i )
cstr.truncate(i);
else // just in case - search for </html>
{
- i = cstr.findRev("</html>", -1, false); //case insensitive
+ i = cstr.tqfindRev("</html>", -1, false); //case insensitive
if ( 0 <= i ) cstr.truncate(i);
}
// ---Sven's strip </BODY> and </HTML> from end of attachment end-
@@ -1047,21 +1047,21 @@ namespace KMail {
const TQCString delimZ2("--__--__--\n\n_____________");
const TQCString delimZ1("--__--__--\r\n\r\n_____________");
TQCString partStr, digestHeaderStr;
- int thisDelim = cstr.tqfind(delim1, 0, false);
+ int thisDelim = cstr.tqfind(TQString(delim1), 0, false);
if ( thisDelim == -1 )
- thisDelim = cstr.tqfind(delim2, 0, false);
+ thisDelim = cstr.tqfind(TQString(delim2), 0, false);
if ( thisDelim == -1 ) {
kdDebug(5006) << " Sorry: Old style Mailman message but no delimiter found." << endl;
return false;
}
- int nextDelim = cstr.tqfind(delim1, thisDelim+1, false);
+ int nextDelim = cstr.tqfind(TQString(delim1), thisDelim+1, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delim2, thisDelim+1, false);
+ nextDelim = cstr.tqfind(TQString(delim2), thisDelim+1, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delimZ1, thisDelim+1, false);
+ nextDelim = cstr.tqfind(TQString(delimZ1), thisDelim+1, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delimZ2, thisDelim+1, false);
+ nextDelim = cstr.tqfind(TQString(delimZ2), thisDelim+1, false);
if ( nextDelim < 0)
return false;
@@ -1101,7 +1101,7 @@ namespace KMail {
partStr += cstr.mid( thisDelim, nextDelim-thisDelim );
TQCString subject("embedded message");
TQCString subSearch("\nSubject:");
- int subPos = partStr.tqfind(subSearch, 0, false);
+ int subPos = partStr.tqfind(TQString(subSearch), 0, false);
if ( -1 < subPos ){
subject = partStr.mid(subPos+subSearch.length());
thisEoL = subject.tqfind('\n');
@@ -1114,13 +1114,13 @@ namespace KMail {
subject, true );
//mReader->queueHtml("<br><hr><br>");
thisDelim = nextDelim+1;
- nextDelim = cstr.tqfind(delim1, thisDelim, false);
+ nextDelim = cstr.tqfind(TQString(delim1), thisDelim, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delim2, thisDelim, false);
+ nextDelim = cstr.tqfind(TQString(delim2), thisDelim, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delimZ1, thisDelim, false);
+ nextDelim = cstr.tqfind(TQString(delimZ1), thisDelim, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delimZ2, thisDelim, false);
+ nextDelim = cstr.tqfind(TQString(delimZ2), thisDelim, false);
}
// reset curent node's Content-Type
curNode->setType( DwMime::kTypeText );
@@ -1656,7 +1656,7 @@ namespace KMail {
const GpgME::ImportResult res = import->exec( certData );
if ( res.error() ) {
htmlWriter()->queue( i18n( "Sorry, certificate could not be imported.<br>"
- "Reason: %1").arg( TQString::fromLocal8Bit( res.error().asString() ) ) );
+ "Reason: %1").tqarg( TQString::fromLocal8Bit( res.error().asString() ) ) );
return true;
}
@@ -1696,14 +1696,14 @@ namespace KMail {
for ( std::vector<GpgME::Import>::const_iterator it = imports.begin() ; it != imports.end() ; ++it ) {
if ( (*it).error() )
htmlWriter()->queue( i18n( "Failed: %1 (%2)" )
- .arg( (*it).fingerprint(),
+ .tqarg( (*it).fingerprint(),
TQString::fromLocal8Bit( (*it).error().asString() ) ) );
else if ( (*it).status() & ~GpgME::Import::ContainedSecretKey ) {
if ( (*it).status() & GpgME::Import::ContainedSecretKey ) {
- htmlWriter()->queue( i18n( "New or changed: %1 (secret key available)" ).arg( (*it).fingerprint() ) );
+ htmlWriter()->queue( i18n( "New or changed: %1 (secret key available)" ).tqarg( (*it).fingerprint() ) );
}
else {
- htmlWriter()->queue( i18n( "New or changed: %1" ).arg( (*it).fingerprint() ) );
+ htmlWriter()->queue( i18n( "New or changed: %1" ).tqarg( (*it).fingerprint() ) );
}
}
htmlWriter()->queue( "<br>" );
@@ -2054,7 +2054,7 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
TQString fileName = mReader->writeMessagePartToTempFile( msgPart, partNum );
- TQString href = TQString( "attachment:%1?place=body" ).arg( partNum );
+ TQString href = TQString( "attachment:%1?place=body" ).tqarg( partNum );
TQString iconName;
if( inlineImage )
@@ -2280,7 +2280,7 @@ static TQString writeSimpleSigstatHeader( const PartMetaData &block )
if ( addr.isEmpty() ) {
html += i18n( "Signature is valid." );
} else {
- html += i18n( "Signed by <a href=\"mailto:%1\">%2</a>." ).arg( addr, name );
+ html += i18n( "Signed by <a href=\"mailto:%1\">%2</a>." ).tqarg( addr, name );
}
} else {
// should not happen
@@ -2307,7 +2307,7 @@ static TQString makeShowAuditLogLink( const GpgME::Error & err, const TQString &
//kdDebug(5006) << "makeShowAuditLogLink: not showing link (not available)" << endl;
return i18n("No Audit Log available");
} else {
- return i18n("Error Retrieving Audit Log: %1").arg( TQString::fromLocal8Bit( err.asString() ) );
+ return i18n("Error Retrieving Audit Log: %1").tqarg( TQString::fromLocal8Bit( err.asString() ) );
}
}
@@ -2371,7 +2371,7 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
else {
htmlStr += i18n("Encrypted message (decryption not possible)");
if( !block.errorText.isEmpty() )
- htmlStr += "<br />" + i18n("Reason: %1").arg( block.errorText );
+ htmlStr += "<br />" + i18n("Reason: %1").tqarg( block.errorText );
}
htmlStr += "</td></tr><tr class=\"encrB\"><td>";
}
@@ -2428,13 +2428,13 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
if( isSMIME )
startKeyHREF =
TQString("<a href=\"kmail:showCertificate#%1 ### %2 ### %3\">")
- .arg( cryptProto->displayName(),
+ .tqarg( cryptProto->displayName(),
cryptProto->name(),
block.keyId );
TQString keyWithWithoutURL
= isSMIME
? TQString("%1%2</a>")
- .arg( startKeyHREF,
+ .tqarg( startKeyHREF,
cannotCheckSignature ? i18n("[Details]") : ("0x" + block.keyId) )
: "0x" + TQString::fromUtf8( block.keyId );
@@ -2486,7 +2486,7 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
i18n("Warning:") +
"</u> " +
i18n("Sender's mail address is not stored "
- "in the %1 used for signing.").arg(certificate) +
+ "in the %1 used for signing.").tqarg(certificate) +
"<br />" +
i18n("sender: ") +
msgFrom +
@@ -2512,7 +2512,7 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
"</u> " +
i18n("No mail address is stored in the %1 used for signing, "
"so we cannot compare it to the sender's address %2.")
- .arg(certificate,msgFrom);
+ .tqarg(certificate,msgFrom);
}
if( !greenCaseWarning.isEmpty() ) {
if( !statusStr.isEmpty() )
@@ -2535,7 +2535,7 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
if( cannotCheckSignature ) {
htmlStr += i18n( "Not enough information to check "
"signature. %1" )
- .arg( keyWithWithoutURL );
+ .tqarg( keyWithWithoutURL );
}
else {
@@ -2553,26 +2553,26 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
htmlStr += i18n( "Message was signed with unknown key." );
else
htmlStr += i18n( "Message was signed by %1." )
- .arg( signer );
+ .tqarg( signer );
} else {
TQDateTime created = block.creationTime;
if( created.isValid() ) {
if( signer.isEmpty() ) {
if( onlyShowKeyURL )
htmlStr += i18n( "Message was signed with key %1." )
- .arg( keyWithWithoutURL );
+ .tqarg( keyWithWithoutURL );
else
htmlStr += i18n( "Message was signed on %1 with key %2." )
- .arg( KGlobal::locale()->formatDateTime( created ),
+ .tqarg( KGlobal::locale()->formatDateTime( created ),
keyWithWithoutURL );
}
else {
if( onlyShowKeyURL )
htmlStr += i18n( "Message was signed with key %1." )
- .arg( keyWithWithoutURL );
+ .tqarg( keyWithWithoutURL );
else
htmlStr += i18n( "Message was signed by %3 on %1 with key %2" )
- .arg( KGlobal::locale()->formatDateTime( created ),
+ .tqarg( KGlobal::locale()->formatDateTime( created ),
keyWithWithoutURL,
signer );
}
@@ -2580,10 +2580,10 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
else {
if( signer.isEmpty() || onlyShowKeyURL )
htmlStr += i18n( "Message was signed with key %1." )
- .arg( keyWithWithoutURL );
+ .tqarg( keyWithWithoutURL );
else
htmlStr += i18n( "Message was signed by %2 with key %1." )
- .arg( keyWithWithoutURL,
+ .tqarg( keyWithWithoutURL,
signer );
}
}
@@ -2621,11 +2621,11 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
TQDateTime created = block.creationTime;
if ( created.isValid() )
htmlStr += i18n( "Message was signed on %1 with unknown key %2." )
- .arg( KGlobal::locale()->formatDateTime( created ),
+ .tqarg( KGlobal::locale()->formatDateTime( created ),
keyWithWithoutURL );
else
htmlStr += i18n( "Message was signed with unknown key %1." )
- .arg( keyWithWithoutURL );
+ .tqarg( keyWithWithoutURL );
}
else
htmlStr += i18n( "Message was signed with unknown key." );
@@ -2663,10 +2663,10 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
simpleHtmlStr += writeSimpleSigstatHeader( block );
if( !block.keyId.isEmpty() )
htmlStr += i18n( "Message was signed by %2 (Key ID: %1)." )
- .arg( keyWithWithoutURL,
+ .tqarg( keyWithWithoutURL,
signer );
else
- htmlStr += i18n( "Message was signed by %1." ).arg( signer );
+ htmlStr += i18n( "Message was signed by %1." ).tqarg( signer );
htmlStr += "<br />";
switch( block.keyTrust )
@@ -2707,10 +2707,10 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
simpleHtmlStr += writeSimpleSigstatHeader( block );
if( !block.keyId.isEmpty() )
htmlStr += i18n( "Message was signed by %2 (Key ID: %1)." )
- .arg( keyWithWithoutURL,
+ .tqarg( keyWithWithoutURL,
signer );
else
- htmlStr += i18n( "Message was signed by %1." ).arg( signer );
+ htmlStr += i18n( "Message was signed by %1." ).tqarg( signer );
htmlStr += "<br />";
htmlStr += i18n("Warning: The signature is bad.");
frame = "</td></tr>"
@@ -2763,7 +2763,7 @@ void ObjectTreeParser::writeAttachmentMarkHeader( partNode *node )
if ( !mReader )
return;
- htmlWriter()->queue( TQString( "<div id=\"attachmentDiv%1\">\n" ).arg( node->nodeId() ) );
+ htmlWriter()->queue( TQString( "<div id=\"attachmentDiv%1\">\n" ).tqarg( node->nodeId() ) );
}
//-----------------------------------------------------------------------------
@@ -2798,7 +2798,7 @@ void ObjectTreeParser::writeBodyStr( const TQCString& aStr, const TQTextCodec *a
bool isPgpMessage = false; // true if the message contains at least one
// PGP MESSAGE or one PGP SIGNED MESSAGE block
TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" );
- TQString headerStr = TQString("<div dir=\"%1\">").arg(dir);
+ TQString headerStr = TQString("<div dir=\"%1\">").tqarg(dir);
inlineSignatureState = KMMsgNotSigned;
inlineEncryptionState = KMMsgNotEncrypted;
@@ -2970,7 +2970,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate )
const unsigned int length = s.length();
// skip leading empty lines
- for ( pos = 0; pos < length && s[pos] <= ' '; pos++ ) { ; }
+ for ( pos = 0; pos < length && s.tqat(pos) <= TQChar(' '); pos++ ) { ; }
while (pos > 0 && (s[pos-1] == ' ' || s[pos-1] == '\t')) pos--;
beg = pos;
@@ -3051,8 +3051,8 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate )
htmlStr += "<div class=\"quotelevelmark\" >" ;
htmlStr += TQString( "<a href=\"kmail:levelquote?%1 \">"
"<img src=\"%2\" alt=\"\" title=\"\"/></a>" )
- .arg(-1)
- .arg( mExpandIcon );
+ .tqarg(-1)
+ .tqarg( mExpandIcon );
htmlStr += "</div><br/>";
htmlStr += quoteEnd;
}
@@ -3060,8 +3060,8 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate )
htmlStr += "<div class=\"quotelevelmark\" >" ;
htmlStr += TQString( "<a href=\"kmail:levelquote?%1 \">"
"<img src=\"%2\" alt=\"\" title=\"\"/></a>" )
- .arg(actQuoteLevel)
- .arg( mCollapseIcon);
+ .tqarg(actQuoteLevel)
+ .tqarg( mCollapseIcon);
htmlStr += "</div>";
if ( actQuoteLevel < 3 )
htmlStr += quoteFontTag[actQuoteLevel];
@@ -3085,7 +3085,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate )
// ignore ^M DOS linebreaks
if( !line.tqreplace('\015', "").isEmpty() )
{
- htmlStr +=TQString( "<div dir=\"%1\">" ).arg( line.isRightToLeft() ? "rtl":"ltr" );
+ htmlStr +=TQString( "<div dir=\"%1\">" ).tqarg( line.isRightToLeft() ? "rtl":"ltr" );
htmlStr += LinkLocator::convertToHtml( line, convertFlags );
htmlStr += TQString( "</div>" );
}